Skip to content

Commit 68e5c6f

Browse files
committed
ARC: entry: EV_Trap expects r10 (vs. r9) to have exception cause
avoids 1 MOV instruction in light of double load/store code Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
1 parent a488080 commit 68e5c6f

4 files changed

Lines changed: 6 additions & 7 deletions

File tree

‎arch/arc/include/asm/entry-arcv2.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,8 @@
9595
lr r10, [ecr]
9696
lr r11, [erbta]
9797
ST2 r10, r11, PT_event
98-
mov r9, r10
9998

100-
; OUTPUT: r9 has ECR
99+
; OUTPUT: r10 has ECR expected by EV_Trap
101100
.endm
102101

103102
/*------------------------------------------------------------------------

‎arch/arc/include/asm/entry-compact.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@
195195
PUSHAX CTOP_AUX_EFLAGS
196196
#endif
197197

198-
lr r9, [ecr]
199-
st r9, [sp, PT_event] /* EV_Trap expects r9 to have ECR */
198+
lr r10, [ecr]
199+
st r10, [sp, PT_event] /* EV_Trap expects r10 to have ECR */
200200
.endm
201201

202202
/*--------------------------------------------------------------

‎arch/arc/kernel/entry-compact.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ ENTRY(EV_TLBProtV)
256256

257257
EXCEPTION_PROLOGUE
258258

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

262262
; Exception auto-disables further Intr/exceptions.

‎arch/arc/kernel/entry.S‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ ENTRY(EV_Trap)
232232
EXCEPTION_PROLOGUE
233233

234234
;============ TRAP 1 :breakpoints
235-
; Check ECR for trap with arg (PROLOGUE ensures r9 has ECR)
236-
bmsk.f 0, r9, 7
235+
; Check ECR for trap with arg (PROLOGUE ensures r10 has ECR)
236+
bmsk.f 0, r10, 7
237237
bnz trap_with_param
238238

239239
;============ TRAP (no param): syscall top level

0 commit comments

Comments
 (0)