Skip to content

Commit

Permalink
ARC: entry: EV_Trap expects r10 (vs. r9) to have exception cause
Browse files Browse the repository at this point in the history
avoids 1 MOV instruction in light of double load/store code

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
  • Loading branch information
Vineet Gupta committed Jul 8, 2019
1 parent a488080 commit 68e5c6f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions arch/arc/include/asm/entry-arcv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@
lr r10, [ecr]
lr r11, [erbta]
ST2 r10, r11, PT_event
mov r9, r10

; OUTPUT: r9 has ECR
; OUTPUT: r10 has ECR expected by EV_Trap
.endm

/*------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions arch/arc/include/asm/entry-compact.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@
PUSHAX CTOP_AUX_EFLAGS
#endif

lr r9, [ecr]
st r9, [sp, PT_event] /* EV_Trap expects r9 to have ECR */
lr r10, [ecr]
st r10, [sp, PT_event] /* EV_Trap expects r10 to have ECR */
.endm

/*--------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion arch/arc/kernel/entry-compact.S
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ ENTRY(EV_TLBProtV)

EXCEPTION_PROLOGUE

mov r2, r9 ; ECR set into r9 already
mov r2, r10 ; ECR set into r10 already
lr r0, [efa] ; Faulting Data address (not part of pt_regs saved above)

; Exception auto-disables further Intr/exceptions.
Expand Down
4 changes: 2 additions & 2 deletions arch/arc/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ ENTRY(EV_Trap)
EXCEPTION_PROLOGUE

;============ TRAP 1 :breakpoints
; Check ECR for trap with arg (PROLOGUE ensures r9 has ECR)
bmsk.f 0, r9, 7
; Check ECR for trap with arg (PROLOGUE ensures r10 has ECR)
bmsk.f 0, r10, 7
bnz trap_with_param

;============ TRAP (no param): syscall top level
Expand Down

0 comments on commit 68e5c6f

Please sign in to comment.