1 /* SPDX-License-Identifier: GPL-2.0+ WITH GCC- 2 3 Copyright (C) 1994, 1995, 1997, 1998, 1999, 4 2004, 2005, 2006 5 Free Software Foundation, Inc. 6 */ 7 8 !! libgcc routines for the Renesas / SuperH SH 9 !! Contributed by Steve Chamberlain. 10 !! sac@cygnus.com 11 12 !! ashiftrt_r4_x, ___ashrsi3, ___ashlsi3, ___l 13 !! recoded in assembly by Toshiyasu Morita 14 !! tm@netcom.com 15 16 /* SH2 optimizations for ___ashrsi3, ___ashlsi 17 ELF local label prefixes by J"orn Rennecke 18 amylaar@cygnus.com */ 19 20 ! 21 ! __lshrsi3 22 ! 23 ! Entry: 24 ! 25 ! r4: Value to shift 26 ! r5: Shifts 27 ! 28 ! Exit: 29 ! 30 ! r0: Result 31 ! 32 ! Destroys: 33 ! 34 ! (none) 35 ! 36 ! __lshrsi3_r0 37 ! 38 ! Entry: 39 ! 40 ! r0: Value to shift 41 ! r5: Shifts 42 ! 43 ! Exit: 44 ! 45 ! r0: Result 46 ! 47 ! Destroys: 48 ! 49 ! (none) 50 ! 51 .global __lshrsi3 52 .global __lshrsi3_r0 53 54 .align 2 55 __lshrsi3: 56 mov r5,r0 57 .align 2 58 __lshrsi3_r0: 59 and #31,r0 60 mov.l r4,@-r15 61 mov r0,r4 62 mova lshrsi3_table,r0 63 mov.b @(r0,r4),r4 64 add r4,r0 65 jmp @r0 66 mov.l @r15+,r0 67 68 .align 2 69 lshrsi3_table: 70 .byte lshrsi3_0-lshrsi3_tabl 71 .byte lshrsi3_1-lshrsi3_tabl 72 .byte lshrsi3_2-lshrsi3_tabl 73 .byte lshrsi3_3-lshrsi3_tabl 74 .byte lshrsi3_4-lshrsi3_tabl 75 .byte lshrsi3_5-lshrsi3_tabl 76 .byte lshrsi3_6-lshrsi3_tabl 77 .byte lshrsi3_7-lshrsi3_tabl 78 .byte lshrsi3_8-lshrsi3_tabl 79 .byte lshrsi3_9-lshrsi3_tabl 80 .byte lshrsi3_10-lshrsi3_tab 81 .byte lshrsi3_11-lshrsi3_tab 82 .byte lshrsi3_12-lshrsi3_tab 83 .byte lshrsi3_13-lshrsi3_tab 84 .byte lshrsi3_14-lshrsi3_tab 85 .byte lshrsi3_15-lshrsi3_tab 86 .byte lshrsi3_16-lshrsi3_tab 87 .byte lshrsi3_17-lshrsi3_tab 88 .byte lshrsi3_18-lshrsi3_tab 89 .byte lshrsi3_19-lshrsi3_tab 90 .byte lshrsi3_20-lshrsi3_tab 91 .byte lshrsi3_21-lshrsi3_tab 92 .byte lshrsi3_22-lshrsi3_tab 93 .byte lshrsi3_23-lshrsi3_tab 94 .byte lshrsi3_24-lshrsi3_tab 95 .byte lshrsi3_25-lshrsi3_tab 96 .byte lshrsi3_26-lshrsi3_tab 97 .byte lshrsi3_27-lshrsi3_tab 98 .byte lshrsi3_28-lshrsi3_tab 99 .byte lshrsi3_29-lshrsi3_tab 100 .byte lshrsi3_30-lshrsi3_tab 101 .byte lshrsi3_31-lshrsi3_tab 102 103 lshrsi3_6: 104 shlr2 r0 105 lshrsi3_4: 106 shlr2 r0 107 lshrsi3_2: 108 rts 109 shlr2 r0 110 111 lshrsi3_7: 112 shlr2 r0 113 lshrsi3_5: 114 shlr2 r0 115 lshrsi3_3: 116 shlr2 r0 117 lshrsi3_1: 118 rts 119 shlr r0 120 121 lshrsi3_14: 122 shlr2 r0 123 lshrsi3_12: 124 shlr2 r0 125 lshrsi3_10: 126 shlr2 r0 127 lshrsi3_8: 128 rts 129 shlr8 r0 130 131 lshrsi3_15: 132 shlr2 r0 133 lshrsi3_13: 134 shlr2 r0 135 lshrsi3_11: 136 shlr2 r0 137 lshrsi3_9: 138 shlr8 r0 139 rts 140 shlr r0 141 142 lshrsi3_22: 143 shlr2 r0 144 lshrsi3_20: 145 shlr2 r0 146 lshrsi3_18: 147 shlr2 r0 148 lshrsi3_16: 149 rts 150 shlr16 r0 151 152 lshrsi3_23: 153 shlr2 r0 154 lshrsi3_21: 155 shlr2 r0 156 lshrsi3_19: 157 shlr2 r0 158 lshrsi3_17: 159 shlr16 r0 160 rts 161 shlr r0 162 163 lshrsi3_30: 164 shlr2 r0 165 lshrsi3_28: 166 shlr2 r0 167 lshrsi3_26: 168 shlr2 r0 169 lshrsi3_24: 170 shlr16 r0 171 rts 172 shlr8 r0 173 174 lshrsi3_31: 175 shlr2 r0 176 lshrsi3_29: 177 shlr2 r0 178 lshrsi3_27: 179 shlr2 r0 180 lshrsi3_25: 181 shlr16 r0 182 shlr8 r0 183 rts 184 shlr r0 185 186 lshrsi3_0: 187 rts 188 nop
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.