diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-05-09 17:57:21 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-05-09 17:57:21 +0900 |
commit | 1031a3a57ed76f5cb8754a89ddb22f3d9ebe8861 (patch) | |
tree | d96fa7501dcf7c74837e43a2bec084aea877eaec /arch/sh/lib64 | |
parent | 2bcfffa42309b6f73042c62459bf5207762a271d (diff) | |
download | linux-1031a3a57ed76f5cb8754a89ddb22f3d9ebe8861.tar.gz linux-1031a3a57ed76f5cb8754a89ddb22f3d9ebe8861.tar.bz2 linux-1031a3a57ed76f5cb8754a89ddb22f3d9ebe8861.zip |
sh: Provide an __sdivsi3_2 export for sh64.
Newer code paths that are heavier in 64-bit math manage to get this
generated by newer compilers, provide a definition and export
accordingly. This is trivially wrapped around the existing __sdivsi3
code.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/lib64')
-rw-r--r-- | arch/sh/lib64/sdivsi3.S | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/sh/lib64/sdivsi3.S b/arch/sh/lib64/sdivsi3.S index 6a800c6a4904..1963bbd42288 100644 --- a/arch/sh/lib64/sdivsi3.S +++ b/arch/sh/lib64/sdivsi3.S @@ -1,4 +1,6 @@ .global __sdivsi3 + .global __sdivsi3_1 + .global __sdivsi3_2 .section .text..SHmedia32,"ax" .align 2 @@ -6,13 +8,15 @@ /* clobbered: r1,r18,r19,r20,r21,r25,tr0 */ /* result in r0 */ __sdivsi3: +__sdivsi3_1: ptb __div_table,tr0 + gettr tr0,r20 +__sdivsi3_2: nsb r5, r1 shlld r5, r1, r25 /* normalize; [-2 ..1, 1..2) in s2.62 */ shari r25, 58, r21 /* extract 5(6) bit index (s2.4 with hole -1..1) */ /* bubble */ - gettr tr0,r20 ldx.ub r20, r21, r19 /* u0.8 */ shari r25, 32, r25 /* normalize to s2.30 */ shlli r21, 1, r21 |