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
73 addxcc %o2,%o2,%o2 ! shift n1n0 and a q-bit in lsb
74 sub %o4,%o3,%o4 ! this kills msb of n
75 addx %o4,%o4,%o4 ! so this cannot give carry
80 addxcc %o2,%o2,%o2 ! shift n1n0 and a q-bit in lsb
82 sub %o4,%o3,%o4 ! this kills msb of n
87 ! Got carry from n. Subtract next step to cancel this carry.
89 addcc %o2,%o2,%o2 ! shift n1n0 and a 0-bit in lsb
92 ! End of inline udiv_qrnnd
99 addxcc %o1,%o1,%o1 ! shift n1n0 and a q-bit in lsb
100 sub %i0,%o3,%i0 ! this kills msb of n
101 addx %i0,%i0,%i0 ! so this cannot give carry
106 addxcc %o1,%o1,%o1 ! shift n1n0 and a q-bit in lsb
108 sub %i0,%o3,%i0 ! this kills msb of n
110 5: addxcc %i0,%i0,%i0
113 ! Got carry from n. Subtract next step to cancel this carry.
115 addcc %o1,%o1,%o1 ! shift n1n0 and a 0-bit in lsb
118 ! End of inline udiv_qrnnd
128 or %o0,%lo(65535),%o0
137 sethi %hi(16777215),%o0
138 or %o0,%lo(16777215),%o0
145 sethi %hi(__clz_tab),%o0
146 or %o0,%lo(__clz_tab),%o0
178 addxcc %o5,%o5,%o5 ! shift n1n0 and a q-bit in lsb
179 sub %o4,%i2,%o4 ! this kills msb of n
180 addx %o4,%o4,%o4 ! so this cannot give carry
185 addxcc %o5,%o5,%o5 ! shift n1n0 and a q-bit in lsb
187 sub %o4,%i2,%o4 ! this kills msb of n
189 5: addxcc %o4,%o4,%o4
192 ! Got carry from n. Subtract next step to cancel this carry.
194 addcc %o5,%o5,%o5 ! shift n1n0 and a 0-bit in lsb
197 ! End of inline udiv_qrnnd
201 wr %g0,%o1,%y ! SPARC has 0-3 delay insn after a wr
202 sra %o3,31,%g2 ! Do not move this insn
203 and %o1,%g2,%g2 ! Do not move this insn
204 andcc %g0,0,%g1 ! Do not move this insn