Update of /cvsroot/sbcl/sbcl/src/compiler/x86
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22620/src/compiler/x86
Modified Files:
move.lisp
Log Message:
1.0.30.3: deal with load-time-value constants more aggressively
* Revert 1.0.29.54.rc5 to allow constant moves from LTV TNs.
* Modify the relevant VOPs to handle LTV constants correctly.
While this mostly results in duplicated code, VOPs can generate
better code even for unknown values in the constant vector.
Index: move.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/compiler/x86/move.lisp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- move.lisp 24 Apr 2008 04:08:48 -0000 1.18
+++ move.lisp 18 Jul 2009 17:53:00 -0000 1.19
@@ -150,7 +150,7 @@
(:note "fixnum untagging")
(:generator 1
(move y x)
- (inst sar y 2)))
+ (inst sar y n-fixnum-tag-bits)))
(define-move-vop move-to-word/fixnum :move
(any-reg descriptor-reg) (signed-reg unsigned-reg))
@@ -160,7 +160,11 @@
(:results (y :scs (signed-reg unsigned-reg)))
(:note "constant load")
(:generator 1
- (inst mov y (tn-value x))))
+ (cond ((sb!c::tn-leaf x)
+ (inst mov y (tn-value x)))
+ (t
+ (inst mov y x)
+ (inst sar y n-fixnum-tag-bits)))))
(define-move-vop move-to-word-c :move
(constant) (signed-reg unsigned-reg))
|