Changeset 14557


Ignore:
Timestamp:
Jan 6, 2011, 10:40:44 AM (14 years ago)
Author:
Gary Byers
Message:

%fixnum-to-double: make the single-float temp an arg, as a a short-term
approach.

(Because of the way that ARM FPRs are aliased - d0 maps to both s0 and s1 -
any code that deals with both single and doubles needs to be more careful
about aliasing than it likely is.)

Fixes ticket:804.

Location:
trunk/source/compiler/ARM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/ARM/arm-vinsns.lisp

    r14518 r14557  
    12781278(define-arm-vinsn (fixnum->double :predicatable)
    12791279    (((dest :double-float))
    1280      ((src :lisp))
    1281      ((imm :s32)
    1282       (temp :single-float)))
     1280     ((src :lisp)
     1281      (temp :single-float))
     1282     ((imm :s32)))
    12831283  (mov imm (:asr src (:$ arm::fixnumshift)))
    12841284  (fmsr temp imm)
  • trunk/source/compiler/ARM/arm2.lisp

    r14507 r14557  
    85458545(defarm2 arm2-%fixnum-to-double %fixnum-to-double (seg vreg xfer arg)
    85468546  (with-fp-target () (dreg :double-float)
    8547     (let* ((r (arm2-one-untargeted-reg-form seg arg arm::arg_z)))
     8547    (let* ((sreg (make-wired-lreg (* (hard-regspec-value dreg) 2) :mode hard-reg-class-fpr-mode-single))
     8548           (r (arm2-one-untargeted-reg-form seg arg arm::arg_z)))
    85488549      (unless (or (acode-fixnum-form-p arg)
    85498550                  *arm2-reckless*)
    85508551        (! trap-unless-fixnum r))
    8551       (! fixnum->double dreg r)
     8552      (! fixnum->double dreg r sreg)
    85528553      (<- dreg)
    85538554      (^))))
Note: See TracChangeset for help on using the changeset viewer.