Changeset 9451


Ignore:
Timestamp:
May 11, 2008, 2:12:14 AM (11 years ago)
Author:
rme
Message:

Modify vinsn set-c-flag-if-variable-logbitp not to require an
additional unboxed register, and don't use with-add'l-imm-reg
in x862-%ilogbitp.

%ilogbitp was broken because the process of marking a temporarily
unboxed register as a node again alters the flags that the vinsn
just got done setting.

Location:
branches/ia32/compiler/X86
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/compiler/X86/X8632/x8632-vinsns.lisp

    r9376 r9451  
    36363636  (btl (:$ub bit) (:%l int)))
    36373637
    3638 ;; might be able to use al/ah here
    36393638(define-x8632-vinsn set-c-flag-if-variable-logbitp (()
    36403639                                                    ((bit :imm)
    36413640                                                     (int :imm))
    3642                                                     ((temp0 :u8)
    3643                                                      (temp1 :u8)))
    3644   (movl (:$l 31) (:%l temp1))
    3645   (movl (:%l bit) (:%l temp0))
    3646   (sarl (:$ub x8632::fixnumshift) (:%l temp0))
    3647   (addl (:$b x8632::fixnumshift) (:%l temp0))
    3648   (rcmpl (:%l temp0) (:%l temp1))
    3649   (cmoval (:%l temp1) (:%l temp0))
    3650   (btl (:%l temp0) (:%l int)))
     3641                                                    ((temp :u32)))
     3642  (movl (:%l bit) (:%l temp))
     3643  (sarl (:$ub x8632::fixnumshift) (:%l temp))
     3644  (addl (:$b x8632::fixnumshift) (:%l temp))
     3645  ;; Would be nice to use a cmov here, but the branch is probably
     3646  ;; cheaper than trying to scare up an additional unboxed temporary.
     3647  (cmpb (:$ub 31) (:%b temp))
     3648  (jbe :test)
     3649  (movl (:$l 31) (:%l temp))
     3650  :test
     3651  (btl (:%l temp) (:%l int)))
    36513652
    36523653(define-x8632-vinsn multiply-immediate (((dest :imm))
  • branches/ia32/compiler/X86/x862.lisp

    r9302 r9451  
    15581558  (with-x86-local-vinsn-macros (seg)
    15591559    (if (target-arch-case
    1560          (:x8632 *x862-open-code-inline*)
     1560         (:x8632 nil)
    15611561         (:x8664 t))
    1562       (! box-fixnum node-dest s32-src)
     1562      (! box-fixnum node-dest s32-src)  ;xxx might overflow on x8632
    15631563      (let* ((arg_z ($ *x862-arg-z*))
    15641564             (imm0 ($ *x862-imm0* :mode :s32)))
     
    15881588  (with-x86-local-vinsn-macros (seg)
    15891589    (if (target-arch-case
    1590          (:x8632 *x862-open-code-inline*)
     1590         (:x8632 nil)
    15911591         (:x8664 t))
    1592       (! box-fixnum node-dest u32-src)
     1592      (! box-fixnum node-dest u32-src)  ;xxx might overflow on x8632
    15931593      (let* ((arg_z ($ *x862-arg-z*))
    15941594             (imm0 ($ *x862-imm0* :mode :u32)))
     
    65876587    (case (arch::target-char-code-limit (backend-target-arch *target-backend*))
    65886588      (256
    6589        (with-additional-imm-reg ()
    6590          (! %set-scharcode8 src unscaled-idx char)))
     6589       (! %set-scharcode8 src unscaled-idx char))
    65916590      (t
    6592        (with-additional-imm-reg ()
    6593          (! %set-scharcode32 src unscaled-idx char))))
     6591       (! %set-scharcode32 src unscaled-idx char)))
    65946592    (when vreg (<- char))
    65956593    (^)))
     
    67906788            (! set-c-flag-if-constant-logbitp x86-bit reg))
    67916789          (multiple-value-bind (rbit rform) (x862-two-untargeted-reg-forms seg bitnum *x862-arg-y* form *x862-arg-z*)
    6792             (with-additional-imm-reg ()
    6793               (! set-c-flag-if-variable-logbitp rbit rform))))
     6790            (! set-c-flag-if-variable-logbitp rbit rform)))
    67946791        (regspec-crf-gpr-case
    67956792         (vreg dest)
Note: See TracChangeset for help on using the changeset viewer.