1 /* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
3 This file is part of GNU CC.
5 GNU CC is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2, or (at your option)
10 GNU CC is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNU CC; see the file COPYING. If not, write to
17 the Free Software Foundation, 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
36 addxcc %o1,%o1,%o1 ! shift n1n0 and a q-bit in lsb
37 sub %i0,%o3,%i0 ! this kills msb of n
38 addx %i0,%i0,%i0 ! so this cannot give carry
43 addxcc %o1,%o1,%o1 ! shift n1n0 and a q-bit in lsb
45 sub %i0,%o3,%i0 ! this kills msb of n
50 ! Got carry from n. Subtract next step to cancel this carry.
52 addcc %o1,%o1,%o1 ! shift n1n0 and a 0-bit in lsb
55 ! End of inline udiv_qrnnd
74 addxcc %o2,%o2,%o2 ! shift n1n0 and a q-bit in lsb
75 sub %o4,%o3,%o4 ! this kills msb of n
76 addx %o4,%o4,%o4 ! so this cannot give carry
81 addxcc %o2,%o2,%o2 ! shift n1n0 and a q-bit in lsb
83 sub %o4,%o3,%o4 ! this kills msb of n
88 ! Got carry from n. Subtract next step to cancel this carry.
90 addcc %o2,%o2,%o2 ! shift n1n0 and a 0-bit in lsb
93 ! End of inline udiv_qrnnd
100 addxcc %o1,%o1,%o1 ! shift n1n0 and a q-bit in lsb
101 sub %i0,%o3,%i0 ! this kills msb of n
102 addx %i0,%i0,%i0 ! so this cannot give carry
107 addxcc %o1,%o1,%o1 ! shift n1n0 and a q-bit in lsb
109 sub %i0,%o3,%i0 ! this kills msb of n
111 5: addxcc %i0,%i0,%i0
114 ! Got carry from n. Subtract next step to cancel this carry.
116 addcc %o1,%o1,%o1 ! shift n1n0 and a 0-bit in lsb
119 ! End of inline udiv_qrnnd
129 or %o0,%lo(65535),%o0
138 sethi %hi(16777215),%o0
139 or %o0,%lo(16777215),%o0
146 sethi %hi(__clz_tab),%o0
147 or %o0,%lo(__clz_tab),%o0
179 addxcc %o5,%o5,%o5 ! shift n1n0 and a q-bit in lsb
180 sub %o4,%i2,%o4 ! this kills msb of n
181 addx %o4,%o4,%o4 ! so this cannot give carry
186 addxcc %o5,%o5,%o5 ! shift n1n0 and a q-bit in lsb
188 sub %o4,%i2,%o4 ! this kills msb of n
190 5: addxcc %o4,%o4,%o4
193 ! Got carry from n. Subtract next step to cancel this carry.
195 addcc %o5,%o5,%o5 ! shift n1n0 and a 0-bit in lsb
198 ! End of inline udiv_qrnnd
202 wr %g0,%o1,%y ! SPARC has 0-3 delay insn after a wr
203 sra %o3,31,%g2 ! Do not move this insn
204 and %o1,%g2,%g2 ! Do not move this insn
205 andcc %g0,0,%g1 ! Do not move this insn