summaryrefslogtreecommitdiffstats
path: root/arch/sh/lib/ashrsi3.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-03-20 00:09:43 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-20 00:09:43 +0100
commitb31a3bc3dbd2f42b61674d37de7f46022e1f6846 (patch)
treef497661f34009eff1455df8729ce750fdddad7e5 /arch/sh/lib/ashrsi3.S
parentMerge tag 'powerpc-4.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/po... (diff)
parentsched/preempt, sh: kmap_coherent relies on disabled preemption (diff)
downloadlinux-b31a3bc3dbd2f42b61674d37de7f46022e1f6846.tar.xz
linux-b31a3bc3dbd2f42b61674d37de7f46022e1f6846.zip
Merge tag 'tag-sh-for-4.6' of git://git.libc.org/linux-sh
Pull arch/sh updates from Rich Felker: "This includes minor cleanups, a fix for a crash that likely affects all sh models with MMU, and introduction of a framework for boards described by device tree, which sets the stage for future J2 support" * tag 'tag-sh-for-4.6' of git://git.libc.org/linux-sh: sched/preempt, sh: kmap_coherent relies on disabled preemption sh: add SMP method selection to device tree pseudo-board sh: add device tree support and generic board using device tree sh: remove arch-specific localtimer and use generic one sh: make MMU-specific SMP code conditional on CONFIG_MMU sh: provide unified syscall trap compatible with all SH models sh: New gcc support sh: Disable trace for kernel uncompressing. sh: Use generic clkdev.h header
Diffstat (limited to 'arch/sh/lib/ashrsi3.S')
-rw-r--r--arch/sh/lib/ashrsi3.S33
1 files changed, 24 insertions, 9 deletions
diff --git a/arch/sh/lib/ashrsi3.S b/arch/sh/lib/ashrsi3.S
index 6f3cf46b77c2..602599d80209 100644
--- a/arch/sh/lib/ashrsi3.S
+++ b/arch/sh/lib/ashrsi3.S
@@ -54,22 +54,37 @@ Boston, MA 02110-1301, USA. */
!
! (none)
!
+! __ashrsi3_r0
+!
+! Entry:
+!
+! r4: Value to shift
+! r0: Shifts
+!
+! Exit:
+!
+! r0: Result
+!
+! Destroys:
+!
+! (none)
.global __ashrsi3
+ .global __ashrsi3_r0
.align 2
__ashrsi3:
- mov #31,r0
- and r0,r5
+ mov r5,r0
+ .align 2
+__ashrsi3_r0:
+ and #31,r0
+ mov.l r4,@-r15
+ mov r0,r4
mova ashrsi3_table,r0
- mov.b @(r0,r5),r5
-#ifdef __sh1__
- add r5,r0
+ mov.b @(r0,r4),r4
+ add r4,r0
jmp @r0
-#else
- braf r5
-#endif
- mov r4,r0
+ mov.l @r15+,r0
.align 2
ashrsi3_table: