Update of /cvsroot/sbcl/sbcl/src/compiler/x86
In directory sc8-pr-cvs1:/tmp/cvs-serv15452/src/compiler/x86
Modified Files:
arith.lisp
Log Message:
0.8.2.32:
* Provide cross-compiler versions of several internal
functions;
* BIGNUM-LOGNOT VOP is the same as LOGNOT-MOD32.
Index: arith.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/compiler/x86/arith.lisp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- arith.lisp 15 Aug 2003 08:21:07 -0000 1.13
+++ arith.lisp 16 Aug 2003 06:48:39 -0000 1.14
@@ -1037,6 +1037,41 @@
(move ecx amount)
(inst shl r :cl)))
+;;;; Modular functions
+
+(define-modular-fun +-mod32 (x y) + 32)
+(define-vop (fast-+-mod32/unsigned=>unsigned fast-+/unsigned=>unsigned)
+ (:translate +-mod32))
+(define-vop (fast-+-mod32-c/unsigned=>unsigned fast-+-c/unsigned=>unsigned)
+ (:translate +-mod32))
+
+;;; logical operations
+(define-modular-fun lognot-mod32 (x) lognot 32)
+(define-vop (lognot-mod32/unsigned=>unsigned)
+ (:translate lognot-mod32)
+ (:args (x :scs (unsigned-reg unsigned-stack) :target r
+ :load-if (not (and (sc-is x unsigned-stack)
+ (sc-is r unsigned-stack)
+ (location= x r)))))
+ (:arg-types unsigned-num)
+ (:results (r :scs (unsigned-reg)
+ :load-if (not (and (sc-is x unsigned-stack)
+ (sc-is r unsigned-stack)
+ (location= x r)))))
+ (:result-types unsigned-num)
+ (:policy :fast-safe)
+ (:generator 1
+ (move r x)
+ (inst not r)))
+
+(define-modular-fun logxor-mod32 (x y) logxor 32)
+(define-vop (fast-logxor-mod32/unsigned=>unsigned
+ fast-logxor/unsigned=>unsigned)
+ (:translate logxor-mod32))
+(define-vop (fast-logxor-mod32-c/unsigned=>unsigned
+ fast-logxor-c/unsigned=>unsigned)
+ (:translate logxor-mod32))
+
;;;; bignum stuff
(define-vop (bignum-length get-header-data)
@@ -1176,17 +1211,8 @@
(move hi edx)
(move lo eax)))
-(define-vop (bignum-lognot)
- (:translate sb!bignum::%lognot)
- (:policy :fast-safe)
- (:args (x :scs (unsigned-reg unsigned-stack) :target r))
- (:arg-types unsigned-num)
- (:results (r :scs (unsigned-reg)
- :load-if (not (location= x r))))
- (:result-types unsigned-num)
- (:generator 1
- (move r x)
- (inst not r)))
+(define-vop (bignum-lognot lognot-mod32/unsigned=>unsigned)
+ (:translate sb!bignum::%lognot))
(define-vop (fixnum-to-digit)
(:translate sb!bignum::%fixnum-to-digit)
@@ -1347,37 +1373,3 @@
(inst mov tmp y)
(inst shr tmp 18)
(inst xor y tmp)))
-
-;;;; Modular functions
-(define-modular-fun +-mod32 (x y) + 32)
-(define-vop (fast-+-mod32/unsigned=>unsigned fast-+/unsigned=>unsigned)
- (:translate +-mod32))
-(define-vop (fast-+-mod32-c/unsigned=>unsigned fast-+-c/unsigned=>unsigned)
- (:translate +-mod32))
-
-;;; logical operations
-(define-modular-fun lognot-mod32 (x) lognot 32)
-(define-vop (lognot-mod32/unsigned=>unsigned)
- (:translate lognot-mod32)
- (:args (x :scs (unsigned-reg) :target r
- :load-if (not (and (sc-is x unsigned-stack)
- (sc-is r unsigned-stack)
- (location= x r)))))
- (:arg-types unsigned-num)
- (:results (r :scs (unsigned-reg)
- :load-if (not (and (sc-is x unsigned-stack)
- (sc-is r unsigned-stack)
- (location= x r)))))
- (:result-types unsigned-num)
- (:policy :fast-safe)
- (:generator 1
- (move r x)
- (inst not r)))
-
-(define-modular-fun logxor-mod32 (x y) logxor 32)
-(define-vop (fast-logxor-mod32/unsigned=>unsigned
- fast-logxor/unsigned=>unsigned)
- (:translate logxor-mod32))
-(define-vop (fast-logxor-mod32-c/unsigned=>unsigned
- fast-logxor-c/unsigned=>unsigned)
- (:translate logxor-mod32))
|