~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/sh/lib/lshrsi3.S

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0+ WITH GCC-exception-2.0
  2 
  3    Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
  4    2004, 2005, 2006
  5    Free Software Foundation, Inc.
  6 */
  7 
  8 !! libgcc routines for the Renesas / SuperH SH CPUs.
  9 !! Contributed by Steve Chamberlain.
 10 !! sac@cygnus.com
 11 
 12 !! ashiftrt_r4_x, ___ashrsi3, ___ashlsi3, ___lshrsi3 routines
 13 !! recoded in assembly by Toshiyasu Morita
 14 !! tm@netcom.com
 15 
 16 /* SH2 optimizations for ___ashrsi3, ___ashlsi3, ___lshrsi3 and
 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_table
 71         .byte           lshrsi3_1-lshrsi3_table
 72         .byte           lshrsi3_2-lshrsi3_table
 73         .byte           lshrsi3_3-lshrsi3_table
 74         .byte           lshrsi3_4-lshrsi3_table
 75         .byte           lshrsi3_5-lshrsi3_table
 76         .byte           lshrsi3_6-lshrsi3_table
 77         .byte           lshrsi3_7-lshrsi3_table
 78         .byte           lshrsi3_8-lshrsi3_table
 79         .byte           lshrsi3_9-lshrsi3_table
 80         .byte           lshrsi3_10-lshrsi3_table
 81         .byte           lshrsi3_11-lshrsi3_table
 82         .byte           lshrsi3_12-lshrsi3_table
 83         .byte           lshrsi3_13-lshrsi3_table
 84         .byte           lshrsi3_14-lshrsi3_table
 85         .byte           lshrsi3_15-lshrsi3_table
 86         .byte           lshrsi3_16-lshrsi3_table
 87         .byte           lshrsi3_17-lshrsi3_table
 88         .byte           lshrsi3_18-lshrsi3_table
 89         .byte           lshrsi3_19-lshrsi3_table
 90         .byte           lshrsi3_20-lshrsi3_table
 91         .byte           lshrsi3_21-lshrsi3_table
 92         .byte           lshrsi3_22-lshrsi3_table
 93         .byte           lshrsi3_23-lshrsi3_table
 94         .byte           lshrsi3_24-lshrsi3_table
 95         .byte           lshrsi3_25-lshrsi3_table
 96         .byte           lshrsi3_26-lshrsi3_table
 97         .byte           lshrsi3_27-lshrsi3_table
 98         .byte           lshrsi3_28-lshrsi3_table
 99         .byte           lshrsi3_29-lshrsi3_table
100         .byte           lshrsi3_30-lshrsi3_table
101         .byte           lshrsi3_31-lshrsi3_table
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

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php