Linux Audio

Check our new training course

Loading...
v5.4
  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! __ashrsi3
 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! __ashrsi3_r0
 37!
 38! Entry:
 39!
 40! r4: Value to shift
 41! r0: Shifts
 42!
 43! Exit:
 44!
 45! r0: Result
 46!
 47! Destroys:
 48!
 49! (none)
 50
 51	.global	__ashrsi3
 52	.global	__ashrsi3_r0
 53	
 54	.align	2
 55__ashrsi3:
 56	mov	r5,r0
 57	.align	2
 58__ashrsi3_r0:
 59	and	#31,r0
 60	mov.l	r4,@-r15
 61	mov	r0,r4
 62	mova	ashrsi3_table,r0
 63	mov.b	@(r0,r4),r4
 64	add	r4,r0
 65	jmp	@r0
 66	mov.l	@r15+,r0
 67
 68	.align	2
 69ashrsi3_table:
 70	.byte		ashrsi3_0-ashrsi3_table
 71	.byte		ashrsi3_1-ashrsi3_table
 72	.byte		ashrsi3_2-ashrsi3_table
 73	.byte		ashrsi3_3-ashrsi3_table
 74	.byte		ashrsi3_4-ashrsi3_table
 75	.byte		ashrsi3_5-ashrsi3_table
 76	.byte		ashrsi3_6-ashrsi3_table
 77	.byte		ashrsi3_7-ashrsi3_table
 78	.byte		ashrsi3_8-ashrsi3_table
 79	.byte		ashrsi3_9-ashrsi3_table
 80	.byte		ashrsi3_10-ashrsi3_table
 81	.byte		ashrsi3_11-ashrsi3_table
 82	.byte		ashrsi3_12-ashrsi3_table
 83	.byte		ashrsi3_13-ashrsi3_table
 84	.byte		ashrsi3_14-ashrsi3_table
 85	.byte		ashrsi3_15-ashrsi3_table
 86	.byte		ashrsi3_16-ashrsi3_table
 87	.byte		ashrsi3_17-ashrsi3_table
 88	.byte		ashrsi3_18-ashrsi3_table
 89	.byte		ashrsi3_19-ashrsi3_table
 90	.byte		ashrsi3_20-ashrsi3_table
 91	.byte		ashrsi3_21-ashrsi3_table
 92	.byte		ashrsi3_22-ashrsi3_table
 93	.byte		ashrsi3_23-ashrsi3_table
 94	.byte		ashrsi3_24-ashrsi3_table
 95	.byte		ashrsi3_25-ashrsi3_table
 96	.byte		ashrsi3_26-ashrsi3_table
 97	.byte		ashrsi3_27-ashrsi3_table
 98	.byte		ashrsi3_28-ashrsi3_table
 99	.byte		ashrsi3_29-ashrsi3_table
100	.byte		ashrsi3_30-ashrsi3_table
101	.byte		ashrsi3_31-ashrsi3_table
102
103ashrsi3_31:
104	rotcl	r0
105	rts
106	subc	r0,r0
107
108ashrsi3_30:
109	shar	r0
110ashrsi3_29:
111	shar	r0
112ashrsi3_28:
113	shar	r0
114ashrsi3_27:
115	shar	r0
116ashrsi3_26:
117	shar	r0
118ashrsi3_25:
119	shar	r0
120ashrsi3_24:
121	shlr16	r0
122	shlr8	r0
123	rts
124	exts.b	r0,r0
125
126ashrsi3_23:
127	shar	r0
128ashrsi3_22:
129	shar	r0
130ashrsi3_21:
131	shar	r0
132ashrsi3_20:
133	shar	r0
134ashrsi3_19:
135	shar	r0
136ashrsi3_18:
137	shar	r0
138ashrsi3_17:
139	shar	r0
140ashrsi3_16:
141	shlr16	r0
142	rts
143	exts.w	r0,r0
144
145ashrsi3_15:
146	shar	r0
147ashrsi3_14:
148	shar	r0
149ashrsi3_13:
150	shar	r0
151ashrsi3_12:
152	shar	r0
153ashrsi3_11:
154	shar	r0
155ashrsi3_10:
156	shar	r0
157ashrsi3_9:
158	shar	r0
159ashrsi3_8:
160	shar	r0
161ashrsi3_7:
162	shar	r0
163ashrsi3_6:
164	shar	r0
165ashrsi3_5:
166	shar	r0
167ashrsi3_4:
168	shar	r0
169ashrsi3_3:
170	shar	r0
171ashrsi3_2:
172	shar	r0
173ashrsi3_1:
174	rts
175	shar	r0
176
177ashrsi3_0:
178	rts
179	nop
v4.17
  1/* Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
 
 
  2   2004, 2005, 2006
  3   Free Software Foundation, Inc.
  4
  5This file is free software; you can redistribute it and/or modify it
  6under the terms of the GNU General Public License as published by the
  7Free Software Foundation; either version 2, or (at your option) any
  8later version.
  9
 10In addition to the permissions in the GNU General Public License, the
 11Free Software Foundation gives you unlimited permission to link the
 12compiled version of this file into combinations with other programs,
 13and to distribute those combinations without any restriction coming
 14from the use of this file.  (The General Public License restrictions
 15do apply in other respects; for example, they cover modification of
 16the file, and distribution when not linked into a combine
 17executable.)
 18
 19This file is distributed in the hope that it will be useful, but
 20WITHOUT ANY WARRANTY; without even the implied warranty of
 21MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 22General Public License for more details.
 23
 24You should have received a copy of the GNU General Public License
 25along with this program; see the file COPYING.  If not, write to
 26the Free Software Foundation, 51 Franklin Street, Fifth Floor,
 27Boston, MA 02110-1301, USA.  */
 28
 29!! libgcc routines for the Renesas / SuperH SH CPUs.
 30!! Contributed by Steve Chamberlain.
 31!! sac@cygnus.com
 32
 33!! ashiftrt_r4_x, ___ashrsi3, ___ashlsi3, ___lshrsi3 routines
 34!! recoded in assembly by Toshiyasu Morita
 35!! tm@netcom.com
 36
 37/* SH2 optimizations for ___ashrsi3, ___ashlsi3, ___lshrsi3 and
 38   ELF local label prefixes by J"orn Rennecke
 39   amylaar@cygnus.com  */
 40
 41!
 42! __ashrsi3
 43!
 44! Entry:
 45!
 46! r4: Value to shift
 47! r5: Shifts
 48!
 49! Exit:
 50!
 51! r0: Result
 52!
 53! Destroys:
 54!
 55! (none)
 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)
 71
 72	.global	__ashrsi3
 73	.global	__ashrsi3_r0
 74	
 75	.align	2
 76__ashrsi3:
 77	mov	r5,r0
 78	.align	2
 79__ashrsi3_r0:
 80	and	#31,r0
 81	mov.l	r4,@-r15
 82	mov	r0,r4
 83	mova	ashrsi3_table,r0
 84	mov.b	@(r0,r4),r4
 85	add	r4,r0
 86	jmp	@r0
 87	mov.l	@r15+,r0
 88
 89	.align	2
 90ashrsi3_table:
 91	.byte		ashrsi3_0-ashrsi3_table
 92	.byte		ashrsi3_1-ashrsi3_table
 93	.byte		ashrsi3_2-ashrsi3_table
 94	.byte		ashrsi3_3-ashrsi3_table
 95	.byte		ashrsi3_4-ashrsi3_table
 96	.byte		ashrsi3_5-ashrsi3_table
 97	.byte		ashrsi3_6-ashrsi3_table
 98	.byte		ashrsi3_7-ashrsi3_table
 99	.byte		ashrsi3_8-ashrsi3_table
100	.byte		ashrsi3_9-ashrsi3_table
101	.byte		ashrsi3_10-ashrsi3_table
102	.byte		ashrsi3_11-ashrsi3_table
103	.byte		ashrsi3_12-ashrsi3_table
104	.byte		ashrsi3_13-ashrsi3_table
105	.byte		ashrsi3_14-ashrsi3_table
106	.byte		ashrsi3_15-ashrsi3_table
107	.byte		ashrsi3_16-ashrsi3_table
108	.byte		ashrsi3_17-ashrsi3_table
109	.byte		ashrsi3_18-ashrsi3_table
110	.byte		ashrsi3_19-ashrsi3_table
111	.byte		ashrsi3_20-ashrsi3_table
112	.byte		ashrsi3_21-ashrsi3_table
113	.byte		ashrsi3_22-ashrsi3_table
114	.byte		ashrsi3_23-ashrsi3_table
115	.byte		ashrsi3_24-ashrsi3_table
116	.byte		ashrsi3_25-ashrsi3_table
117	.byte		ashrsi3_26-ashrsi3_table
118	.byte		ashrsi3_27-ashrsi3_table
119	.byte		ashrsi3_28-ashrsi3_table
120	.byte		ashrsi3_29-ashrsi3_table
121	.byte		ashrsi3_30-ashrsi3_table
122	.byte		ashrsi3_31-ashrsi3_table
123
124ashrsi3_31:
125	rotcl	r0
126	rts
127	subc	r0,r0
128
129ashrsi3_30:
130	shar	r0
131ashrsi3_29:
132	shar	r0
133ashrsi3_28:
134	shar	r0
135ashrsi3_27:
136	shar	r0
137ashrsi3_26:
138	shar	r0
139ashrsi3_25:
140	shar	r0
141ashrsi3_24:
142	shlr16	r0
143	shlr8	r0
144	rts
145	exts.b	r0,r0
146
147ashrsi3_23:
148	shar	r0
149ashrsi3_22:
150	shar	r0
151ashrsi3_21:
152	shar	r0
153ashrsi3_20:
154	shar	r0
155ashrsi3_19:
156	shar	r0
157ashrsi3_18:
158	shar	r0
159ashrsi3_17:
160	shar	r0
161ashrsi3_16:
162	shlr16	r0
163	rts
164	exts.w	r0,r0
165
166ashrsi3_15:
167	shar	r0
168ashrsi3_14:
169	shar	r0
170ashrsi3_13:
171	shar	r0
172ashrsi3_12:
173	shar	r0
174ashrsi3_11:
175	shar	r0
176ashrsi3_10:
177	shar	r0
178ashrsi3_9:
179	shar	r0
180ashrsi3_8:
181	shar	r0
182ashrsi3_7:
183	shar	r0
184ashrsi3_6:
185	shar	r0
186ashrsi3_5:
187	shar	r0
188ashrsi3_4:
189	shar	r0
190ashrsi3_3:
191	shar	r0
192ashrsi3_2:
193	shar	r0
194ashrsi3_1:
195	rts
196	shar	r0
197
198ashrsi3_0:
199	rts
200	nop