1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
4 This file is part of GNU CC.
8 #include <asm/export.h>
48 addxcc %o1,%o1,%o1 ! shift n1n0 and a q-bit in lsb
49 sub %i0,%o4,%i0 ! this kills msb of n
50 addx %i0,%i0,%i0 ! so this cannot give carry
55 addxcc %o1,%o1,%o1 ! shift n1n0 and a q-bit in lsb
57 sub %i0,%o4,%i0 ! this kills msb of n
62 ! Got carry from n. Subtract next step to cancel this carry.
64 addcc %o1,%o1,%o1 ! shift n1n0 and a 0-bit in lsb
84 addxcc %o2,%o2,%o2 ! shift n1n0 and a q-bit in lsb
85 sub %g3,%o4,%g3 ! this kills msb of n
86 addx %g3,%g3,%g3 ! so this cannot give carry
91 addxcc %o2,%o2,%o2 ! shift n1n0 and a q-bit in lsb
93 sub %g3,%o4,%g3 ! this kills msb of n
98 ! Got carry from n. Subtract next step to cancel this carry.
100 addcc %o2,%o2,%o2 ! shift n1n0 and a 0-bit in lsb
108 addxcc %o1,%o1,%o1 ! shift n1n0 and a q-bit in lsb
109 sub %i0,%o4,%i0 ! this kills msb of n
110 addx %i0,%i0,%i0 ! so this cannot give carry
115 addxcc %o1,%o1,%o1 ! shift n1n0 and a q-bit in lsb
117 sub %i0,%o4,%i0 ! this kills msb of n
119 5: addxcc %i0,%i0,%i0
122 ! Got carry from n. Subtract next step to cancel this carry.
124 addcc %o1,%o1,%o1 ! shift n1n0 and a 0-bit in lsb
136 or %o0,%lo(65535),%o0
145 sethi %hi(16777215),%o0
146 or %o0,%lo(16777215),%o0
153 sethi %hi(__clz_tab),%o1
154 or %o1,%lo(__clz_tab),%o1
183 addxcc %o1,%o1,%o1 ! shift n1n0 and a q-bit in lsb
184 sub %o2,%i2,%o2 ! this kills msb of n
185 addx %o2,%o2,%o2 ! so this cannot give carry
190 addxcc %o1,%o1,%o1 ! shift n1n0 and a q-bit in lsb
192 sub %o2,%i2,%o2 ! this kills msb of n
194 5: addxcc %o2,%o2,%o2
197 ! Got carry from n. Subtract next step to cancel this carry.
199 addcc %o1,%o1,%o1 ! shift n1n0 and a 0-bit in lsb
203 wr %g0,%o1,%y ! SPARC has 0-3 delay insn after a wr
204 sra %o4,31,%g2 ! Do not move this insn
205 and %o1,%g2,%g2 ! Do not move this insn
206 andcc %g0,0,%g1 ! Do not move this insn
271 EXPORT_SYMBOL(__divdi3)