Changeset 14374


Ignore:
Timestamp:
Oct 25, 2010, 10:51:13 AM (9 years ago)
Author:
gb
Message:

Try to generate better code in some cases in the 64-bit LRI/LRIU vinsns.

Try harder to use those vinsns in the 64-bit code in X862-IMMEDIATE.
Don't expect (member integer quoted-list-of-symbols) to be true in
either the 32/64-bit X862-IMMEDIATE integer-case code.

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

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/X86/X8664/x8664-vinsns.lisp

    r14338 r14374  
    633633  ((:and (:pred /= intval 0)
    634634         (:pred >= intval  -2147483648)
    635          (:pred <= intval 2147483647))
    636    (movq (:$l intval) (:%q dest)))
     635         (:pred <= intval #xffffffff))
     636   ((:pred > intval 0)
     637    (movl (:$l intval) (:%l dest)))
     638   ((:pred < intval 0)
     639    (movq (:$l intval) (:%q dest))))
    637640  ((:or (:pred < intval  -2147483648)
    638         (:pred > intval 2147483647))
     641        (:pred > intval #xffffffff))
    639642   (movq (:$q (:apply logand #xffffffffffffffff intval)) (:%q dest))))
    640643
     
    644647  ((:pred = intval 0)
    645648   (xorl (:%l dest) (:%l dest)))
    646   ((:and (:pred /= intval 0)
    647          (:pred >= intval  -2147483648)
    648          (:pred <= intval 2147483647))
    649    (movq (:$l intval) (:%q dest)))
    650   ((:or (:pred < intval  -2147483648)
    651         (:pred > intval 2147483647))
     649  ((:and (:pred > intval 0)
     650         (:pred <= intval #xffffffff))
     651   (movl (:$l intval) (:%l dest)))
     652  ((:pred > intval #xffffffff)
    652653   (movq (:$q (:apply logand #xffffffffffffffff intval)) (:%q dest))))
    653654
  • trunk/source/compiler/X86/x862.lisp

    r14348 r14374  
    15541554            (if (and (= (hard-regspec-class vreg) hard-reg-class-gpr)
    15551555                     (member (get-regspec-mode vreg)
    1556                              '(hard-reg-class-gpr-mode-u32
    1557                                hard-reg-class-gpr-mode-s32
    1558                                hard-reg-class-gpr-mode-address))
     1556                             '(#.hard-reg-class-gpr-mode-u32
     1557                               #.hard-reg-class-gpr-mode-s32
     1558                               #.hard-reg-class-gpr-mode-address))
    15591559                     (or (typep form '(unsigned-byte 32))
    15601560                         (typep form '(signed-byte 32))))
     
    15681568                  (x862-store-immediate seg form target)))))
    15691569           (:x8664
    1570             (if (and (typep form '(unsigned-byte 32))
    1571                      (= (hard-regspec-class vreg) hard-reg-class-gpr)
    1572                      (= (get-regspec-mode vreg)
    1573                         hard-reg-class-gpr-mode-u32))
    1574               (x862-lri seg vreg form)
    1575               (ensuring-node-target
    1576                   (target vreg)
    1577                 (if (characterp form)
    1578                   (! load-character-constant target (char-code form))
    1579                   (x862-store-immediate seg form target)))))))
     1570            (let* ((mode (if (= (hard-regspec-class vreg) hard-reg-class-gpr)
     1571                           (get-regspec-mode vreg))))
     1572           
     1573              (if (and (eql mode hard-reg-class-gpr-mode-s64)
     1574                       (typep form '(signed-byte 64)))
     1575                (x862-lri seg vreg form)
     1576                (if (and (or (eql mode hard-reg-class-gpr-mode-u64)
     1577                                 (eql mode hard-reg-class-gpr-mode-address))
     1578                             (typep form '(unsigned-byte 64)))
     1579                  (x862-lriu seg vreg form)
     1580                  (ensuring-node-target
     1581                      (target vreg)
     1582                    (if (characterp form)
     1583                      (! load-character-constant target (char-code form))
     1584                      (x862-store-immediate seg form target)))))))))
    15801585        (if (and (listp form) *load-time-eval-token* (eq (car form) *load-time-eval-token*))
    15811586          (x862-store-immediate seg form ($ *x862-temp0*))))
Note: See TracChangeset for help on using the changeset viewer.