summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2019-05-11 02:24:15 +0300
committerVineet Gupta <vgupta@synopsys.com>2019-07-01 21:02:22 +0300
commitab854bfcd310b5872fe12eb8d3f2c30fe427f8f7 (patch)
tree9603e87b60aef272e54f4f501f2c1966446e764d /arch
parent23c0cbd0c75c3b564850294427fd2be2bc2a015b (diff)
downloadlinux-ab854bfcd310b5872fe12eb8d3f2c30fe427f8f7.tar.xz
ARCv2: entry: avoid a branch
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arc/include/asm/entry-arcv2.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arc/include/asm/entry-arcv2.h b/arch/arc/include/asm/entry-arcv2.h
index 3209a6762960..beaf655666cb 100644
--- a/arch/arc/include/asm/entry-arcv2.h
+++ b/arch/arc/include/asm/entry-arcv2.h
@@ -100,12 +100,11 @@
; 2. Upon entry SP is always saved (for any inspection, unwinding etc),
; but on return, restored only if U mode
+ lr r9, [AUX_USER_SP] ; U mode SP
+
mov.nz r9, sp
add.nz r9, r9, SZ_PT_REGS - PT_sp - 4 ; K mode SP
- bnz 1f
- lr r9, [AUX_USER_SP] ; U mode SP
-1:
PUSH r9 ; SP (pt_regs->sp)
PUSH fp