[Openmcl-cvs-notifications] r11862 - /trunk/source/compiler/X86/X8632/x8632-vinsns.lisp

rme at clozure.com rme at clozure.com
Mon Mar 30 13:11:36 EDT 2009


Author: rme
Date: Mon Mar 30 13:11:36 2009
New Revision: 11862

Log:
Add heretofore unimplemented vinsn get-double?.

Modified:
    trunk/source/compiler/X86/X8632/x8632-vinsns.lisp

Modified: trunk/source/compiler/X86/X8632/x8632-vinsns.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/compiler/X86/X8632/x8632-vinsns.lisp (original)
+++ trunk/source/compiler/X86/X8632/x8632-vinsns.lisp Mon Mar 30 13:11:36 2=
009
@@ -1436,8 +1436,27 @@
 ;;; Extract a double-float value, typechecking in the process.
 ;;; IWBNI we could simply call the "trap-unless-typecode=3D" vinsn here,
 ;;; instead of replicating it ..
-;;; get-double?
-
+(define-x8632-vinsn get-double? (((target :double-float))
+				 ((source :lisp))
+				 ((tag :u8)))
+  :resume
+  (movl (:%l source) (:%l tag))
+  ((:pred =3D (:apply %hard-regspec-value tag) x8632::eax)
+   (andl (:$b x8632::tagmask) (:%accl tag))
+   (cmpl (:$b x8632::tag-misc) (:%accl tag)))
+  ((:pred > (:apply %hard-regspec-value tag) x8632::eax)
+   (andl (:$b x8632::tagmask) (:%l tag))
+   (cmpl (:$b x8632::tag-misc) (:%l tag)))
+  (jne :have-tag)
+  (movsbl (:@ x8632::misc-subtag-offset (:%l source)) (:%l tag))
+  :have-tag
+  (cmpl (:$b x8632::subtag-double-float) (:%l tag))
+  (jne :bad)
+  (movsd (:@  x8632::double-float.value (:%l source)) (:%xmm target))
+
+  (:anchored-uuo-section :resume)
+  :bad
+  (:anchored-uuo (uuo-error-reg-not-tag (:%q source) (:$ub x8632::subtag-d=
ouble-float))))
 =

 (define-x8632-vinsn copy-double-float (((dest :double-float))
                                        ((src :double-float)))



More information about the Openmcl-cvs-notifications mailing list