diff options
author | Yoshinori Sato <ysato@users.sourceforge.jp> | 2015-06-20 01:02:19 -0400 |
---|---|---|
committer | Rich Felker <dalias@libc.org> | 2016-03-17 15:45:44 -0400 |
commit | 940d4113f3306e07a1f86541489b686d1a979d54 (patch) | |
tree | c1d78d1ae7991db8f0cd4ec2c20e7fd71fa6fb04 | |
parent | 2af7967a8c1cfe647d6a222be2d2e393025dcd6e (diff) |
sh: New gcc support
New gcc (4.8 or later) used new shift helper functions.
So we need added new helper to private libgcc.
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Rich Felker <dalias@libc.org>
-rw-r--r-- | arch/sh/kernel/sh_ksyms_32.c | 3 | ||||
-rw-r--r-- | arch/sh/lib/ashlsi3.S | 35 | ||||
-rw-r--r-- | arch/sh/lib/ashrsi3.S | 33 | ||||
-rw-r--r-- | arch/sh/lib/lshrsi3.S | 34 |
4 files changed, 78 insertions, 27 deletions
diff --git a/arch/sh/kernel/sh_ksyms_32.c b/arch/sh/kernel/sh_ksyms_32.c index d77f2f6c7ff0..0b30b9dfc87f 100644 --- a/arch/sh/kernel/sh_ksyms_32.c +++ b/arch/sh/kernel/sh_ksyms_32.c | |||
@@ -34,6 +34,9 @@ DECLARE_EXPORT(__sdivsi3); | |||
34 | DECLARE_EXPORT(__lshrsi3); | 34 | DECLARE_EXPORT(__lshrsi3); |
35 | DECLARE_EXPORT(__ashrsi3); | 35 | DECLARE_EXPORT(__ashrsi3); |
36 | DECLARE_EXPORT(__ashlsi3); | 36 | DECLARE_EXPORT(__ashlsi3); |
37 | DECLARE_EXPORT(__lshrsi3_r0); | ||
38 | DECLARE_EXPORT(__ashrsi3_r0); | ||
39 | DECLARE_EXPORT(__ashlsi3_r0); | ||
37 | DECLARE_EXPORT(__ashiftrt_r4_6); | 40 | DECLARE_EXPORT(__ashiftrt_r4_6); |
38 | DECLARE_EXPORT(__ashiftrt_r4_7); | 41 | DECLARE_EXPORT(__ashiftrt_r4_7); |
39 | DECLARE_EXPORT(__ashiftrt_r4_8); | 42 | DECLARE_EXPORT(__ashiftrt_r4_8); |
diff --git a/arch/sh/lib/ashlsi3.S b/arch/sh/lib/ashlsi3.S index bd47e9b403a5..70a6434945ab 100644 --- a/arch/sh/lib/ashlsi3.S +++ b/arch/sh/lib/ashlsi3.S | |||
@@ -54,21 +54,38 @@ Boston, MA 02110-1301, USA. */ | |||
54 | ! | 54 | ! |
55 | ! (none) | 55 | ! (none) |
56 | ! | 56 | ! |
57 | ! __ashlsi3_r0 | ||
58 | ! | ||
59 | ! Entry: | ||
60 | ! | ||
61 | ! r4: Value to shift | ||
62 | ! r0: Shifts | ||
63 | ! | ||
64 | ! Exit: | ||
65 | ! | ||
66 | ! r0: Result | ||
67 | ! | ||
68 | ! Destroys: | ||
69 | ! | ||
70 | ! (none) | ||
71 | |||
72 | |||
57 | .global __ashlsi3 | 73 | .global __ashlsi3 |
74 | .global __ashlsi3_r0 | ||
58 | 75 | ||
59 | .align 2 | 76 | .align 2 |
60 | __ashlsi3: | 77 | __ashlsi3: |
61 | mov #31,r0 | 78 | mov r5,r0 |
62 | and r0,r5 | 79 | .align 2 |
80 | __ashlsi3_r0: | ||
81 | and #31,r0 | ||
82 | mov.l r4,@-r15 | ||
83 | mov r0,r4 | ||
63 | mova ashlsi3_table,r0 | 84 | mova ashlsi3_table,r0 |
64 | mov.b @(r0,r5),r5 | 85 | mov.b @(r0,r4),r4 |
65 | #ifdef __sh1__ | 86 | add r4,r0 |
66 | add r5,r0 | ||
67 | jmp @r0 | 87 | jmp @r0 |
68 | #else | 88 | mov.l @r15+,r0 |
69 | braf r5 | ||
70 | #endif | ||
71 | mov r4,r0 | ||
72 | 89 | ||
73 | .align 2 | 90 | .align 2 |
74 | ashlsi3_table: | 91 | ashlsi3_table: |
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. */ | |||
54 | ! | 54 | ! |
55 | ! (none) | 55 | ! (none) |
56 | ! | 56 | ! |
57 | ! __ashrsi3_r0 | ||
58 | ! | ||
59 | ! Entry: | ||
60 | ! | ||
61 | ! r4: Value to shift | ||
62 | ! r0: Shifts | ||
63 | ! | ||
64 | ! Exit: | ||
65 | ! | ||
66 | ! r0: Result | ||
67 | ! | ||
68 | ! Destroys: | ||
69 | ! | ||
70 | ! (none) | ||
57 | 71 | ||
58 | .global __ashrsi3 | 72 | .global __ashrsi3 |
73 | .global __ashrsi3_r0 | ||
59 | 74 | ||
60 | .align 2 | 75 | .align 2 |
61 | __ashrsi3: | 76 | __ashrsi3: |
62 | mov #31,r0 | 77 | mov r5,r0 |
63 | and r0,r5 | 78 | .align 2 |
79 | __ashrsi3_r0: | ||
80 | and #31,r0 | ||
81 | mov.l r4,@-r15 | ||
82 | mov r0,r4 | ||
64 | mova ashrsi3_table,r0 | 83 | mova ashrsi3_table,r0 |
65 | mov.b @(r0,r5),r5 | 84 | mov.b @(r0,r4),r4 |
66 | #ifdef __sh1__ | 85 | add r4,r0 |
67 | add r5,r0 | ||
68 | jmp @r0 | 86 | jmp @r0 |
69 | #else | 87 | mov.l @r15+,r0 |
70 | braf r5 | ||
71 | #endif | ||
72 | mov r4,r0 | ||
73 | 88 | ||
74 | .align 2 | 89 | .align 2 |
75 | ashrsi3_table: | 90 | ashrsi3_table: |
diff --git a/arch/sh/lib/lshrsi3.S b/arch/sh/lib/lshrsi3.S index 1e7aaa557130..f2a6959f526d 100644 --- a/arch/sh/lib/lshrsi3.S +++ b/arch/sh/lib/lshrsi3.S | |||
@@ -54,21 +54,37 @@ Boston, MA 02110-1301, USA. */ | |||
54 | ! | 54 | ! |
55 | ! (none) | 55 | ! (none) |
56 | ! | 56 | ! |
57 | ! __lshrsi3_r0 | ||
58 | ! | ||
59 | ! Entry: | ||
60 | ! | ||
61 | ! r0: Value to shift | ||
62 | ! r5: Shifts | ||
63 | ! | ||
64 | ! Exit: | ||
65 | ! | ||
66 | ! r0: Result | ||
67 | ! | ||
68 | ! Destroys: | ||
69 | ! | ||
70 | ! (none) | ||
71 | ! | ||
57 | .global __lshrsi3 | 72 | .global __lshrsi3 |
73 | .global __lshrsi3_r0 | ||
58 | 74 | ||
59 | .align 2 | 75 | .align 2 |
60 | __lshrsi3: | 76 | __lshrsi3: |
61 | mov #31,r0 | 77 | mov r5,r0 |
62 | and r0,r5 | 78 | .align 2 |
79 | __lshrsi3_r0: | ||
80 | and #31,r0 | ||
81 | mov.l r4,@-r15 | ||
82 | mov r0,r4 | ||
63 | mova lshrsi3_table,r0 | 83 | mova lshrsi3_table,r0 |
64 | mov.b @(r0,r5),r5 | 84 | mov.b @(r0,r4),r4 |
65 | #ifdef __sh1__ | 85 | add r4,r0 |
66 | add r5,r0 | ||
67 | jmp @r0 | 86 | jmp @r0 |
68 | #else | 87 | mov.l @r15+,r0 |
69 | braf r5 | ||
70 | #endif | ||
71 | mov r4,r0 | ||
72 | 88 | ||
73 | .align 2 | 89 | .align 2 |
74 | lshrsi3_table: | 90 | lshrsi3_table: |