ev6-divide.S (e5451c8f8330e03ad3cfa16048b4daf961af434f) ev6-divide.S (00fc0e0dda6286407f3854cd71a125f519a5689c)
1/*
2 * arch/alpha/lib/ev6-divide.S
3 *
4 * 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
5 *
6 * Alpha division..
7 */
8

--- 41 unchanged lines hidden (view full) ---

50 * ftp.digital.com/pub/Digital/info/semiconductor/literature/dsc-library.html
51 * Scheduling notation:
52 * E - either cluster
53 * U - upper subcluster; U0 - subcluster U0; U1 - subcluster U1
54 * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1
55 * Try not to change the actual algorithm if possible for consistency.
56 */
57
1/*
2 * arch/alpha/lib/ev6-divide.S
3 *
4 * 21264 version contributed by Rick Gorton <rick.gorton@alpha-processor.com>
5 *
6 * Alpha division..
7 */
8

--- 41 unchanged lines hidden (view full) ---

50 * ftp.digital.com/pub/Digital/info/semiconductor/literature/dsc-library.html
51 * Scheduling notation:
52 * E - either cluster
53 * U - upper subcluster; U0 - subcluster U0; U1 - subcluster U1
54 * L - lower subcluster; L0 - subcluster L0; L1 - subcluster L1
55 * Try not to change the actual algorithm if possible for consistency.
56 */
57
58#include <asm/export.h>
58#define halt .long 0
59
60/*
61 * Select function type and registers
62 */
63#define mask $0
64#define divisor $1
65#define compare $28

--- 134 unchanged lines hidden (view full) ---

200#ifdef DIV
201 DIV_ONLY(ldq tmp2,32($30)) # L :
202#else
203 nop # E :
204#endif
205 addq $30,STACK,$30 # E :
206 ret $31,($23),1 # L0 : L U U L
207 .end ufunction
59#define halt .long 0
60
61/*
62 * Select function type and registers
63 */
64#define mask $0
65#define divisor $1
66#define compare $28

--- 134 unchanged lines hidden (view full) ---

201#ifdef DIV
202 DIV_ONLY(ldq tmp2,32($30)) # L :
203#else
204 nop # E :
205#endif
206 addq $30,STACK,$30 # E :
207 ret $31,($23),1 # L0 : L U U L
208 .end ufunction
209EXPORT_SYMBOL(ufunction)
208
209/*
210 * Uhh.. Ugly signed division. I'd rather not have it at all, but
211 * it's needed in some circumstances. There are different ways to
212 * handle this, really. This does:
213 * -a / b = a / -b = -(a / b)
214 * -a % b = -(a % b)
215 * a % -b = a % b

--- 36 unchanged lines hidden (view full) ---

252 cmovlt $28,tmp1,$27 # E : Latency 2, extra map slot
253 nop # E : U L L U : as part of the cmov
254
255 ldq tmp1,24($30) # L :
256 nop # E : as part of the cmov
257 addq $30,STACK,$30 # E :
258 ret $31,($23),1 # L0 : L U U L
259 .end sfunction
210
211/*
212 * Uhh.. Ugly signed division. I'd rather not have it at all, but
213 * it's needed in some circumstances. There are different ways to
214 * handle this, really. This does:
215 * -a / b = a / -b = -(a / b)
216 * -a % b = -(a % b)
217 * a % -b = a % b

--- 36 unchanged lines hidden (view full) ---

254 cmovlt $28,tmp1,$27 # E : Latency 2, extra map slot
255 nop # E : U L L U : as part of the cmov
256
257 ldq tmp1,24($30) # L :
258 nop # E : as part of the cmov
259 addq $30,STACK,$30 # E :
260 ret $31,($23),1 # L0 : L U U L
261 .end sfunction
262EXPORT_SYMBOL(sfunction)