xref: /netbsd-src/sys/lib/libkern/arch/sh3/ashiftrt.S (revision 4472dbe5e3bd91ef2540bada7a7ca7384627ff9b)
1/*	$NetBSD: ashiftrt.S,v 1.1 1999/09/13 10:31:36 itojun Exp $	*/
2
3/*-
4 * Copyright (C) 1999 Tsubai Masanari.  All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 *    notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 *    notice, this list of conditions and the following disclaimer in the
13 *    documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote products
15 *    derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29	.globl	___ashiftrt_r4_0, ___ashiftrt_r4_1, ___ashiftrt_r4_2
30	.globl	___ashiftrt_r4_3, ___ashiftrt_r4_4, ___ashiftrt_r4_5
31	.globl	___ashiftrt_r4_6, ___ashiftrt_r4_7, ___ashiftrt_r4_8
32	.globl	___ashiftrt_r4_9, ___ashiftrt_r4_10, ___ashiftrt_r4_11
33	.globl	___ashiftrt_r4_12, ___ashiftrt_r4_13, ___ashiftrt_r4_14
34	.globl	___ashiftrt_r4_15, ___ashiftrt_r4_16, ___ashiftrt_r4_17
35	.globl	___ashiftrt_r4_18, ___ashiftrt_r4_19, ___ashiftrt_r4_20
36	.globl	___ashiftrt_r4_21, ___ashiftrt_r4_22, ___ashiftrt_r4_23
37	.globl	___ashiftrt_r4_24, ___ashiftrt_r4_25, ___ashiftrt_r4_26
38	.globl	___ashiftrt_r4_27, ___ashiftrt_r4_28, ___ashiftrt_r4_29
39	.globl	___ashiftrt_r4_30, ___ashiftrt_r4_31
40	.text
41
42___ashiftrt_r4_31:
43	shll	r4
44	rts
45	subc	r4, r4
46
47___ashiftrt_r4_30:
48	shar	r4
49
50___ashiftrt_r4_29:
51	shar	r4
52
53___ashiftrt_r4_28:
54	shar	r4
55
56___ashiftrt_r4_27:
57	shar	r4
58
59___ashiftrt_r4_26:
60	shar	r4
61
62___ashiftrt_r4_25:
63	shar	r4
64
65___ashiftrt_r4_24:
66	shlr16	r4
67	shlr8	r4
68	rts
69	exts.b	r4, r4
70
71___ashiftrt_r4_23:
72	shar	r4
73
74___ashiftrt_r4_22:
75	shar	r4
76
77___ashiftrt_r4_21:
78	shar	r4
79
80___ashiftrt_r4_20:
81	shar	r4
82
83___ashiftrt_r4_19:
84	shar	r4
85
86___ashiftrt_r4_18:
87	shar	r4
88
89___ashiftrt_r4_17:
90	shar	r4
91
92___ashiftrt_r4_16:
93	shlr16	r4
94	rts
95	exts.w	r4, r4
96
97___ashiftrt_r4_15:
98	swap.w	r4, r4
99	cmp/pz	r4
100	bf/s	1f
101	exts.w	r4, r4
102	rts
103	shll	r4
1041:
105	sett
106	rts
107	rotcl	r4
108
109___ashiftrt_r4_14:
110	shar	r4
111
112___ashiftrt_r4_13:
113	shar	r4
114
115___ashiftrt_r4_12:
116	shar	r4
117
118___ashiftrt_r4_11:
119	shar	r4
120
121___ashiftrt_r4_10:
122	shar	r4
123
124___ashiftrt_r4_9:
125	shar	r4
126
127___ashiftrt_r4_8:
128	shar	r4
129
130___ashiftrt_r4_7:
131	shar	r4
132
133___ashiftrt_r4_6:
134	shar	r4
135
136___ashiftrt_r4_5:
137	shar	r4
138
139___ashiftrt_r4_4:
140	shar	r4
141
142___ashiftrt_r4_3:
143	shar	r4
144
145___ashiftrt_r4_2:
146	shar	r4
147
148___ashiftrt_r4_1:
149	rts
150	shar	r4
151
152___ashiftrt_r4_0:
153	rts
154	nop
155