Changeset 11355


Ignore:
Timestamp:
Nov 12, 2008, 5:00:13 AM (11 years ago)
Author:
rme
Message:

In {sign,zero}-extend-{u,s}8 vinsns, assume that the src operand will
be in a register we can access as a byte. (The compiler always uses
imm0 as both the src and dest operands.)

sign-extend-halfword: We use 32-bit words in this house, young man.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/X86/X8632/x8632-vinsns.lisp

    r11297 r11355  
    989989  (:anchored-uuo (uuo-error-reg-not-type (:%l src) (:$ub arch::error-object-not-signed-byte-32))))
    990990
    991 
    992 ;;; xxx -- sigh...
    993991(define-x8632-vinsn sign-extend-s8 (((dest :s32))
    994992                                    ((src :s8)))
    995   ;; (movsbl (:%b temp) (:%l dest))
    996   (movl (:%l src) (:%l dest))
    997   (shll (:$ub 24) (:%l dest))
    998   (sarl (:$ub 24) (:%l dest)))
     993  (movsbl (:%b src) (:%l dest)))
    999994
    1000995(define-x8632-vinsn sign-extend-s16 (((dest :s32))
     
    1002997  (movswl (:%w src) (:%l dest)))
    1003998
    1004 ;;; xxx -- sigh...
    1005999(define-x8632-vinsn zero-extend-u8 (((dest :s32))
    10061000                                    ((src :u8)))
    1007   ;;(movzbl (:%b src) (:%l dest))
    1008   (movl (:%l src) (:%l dest))
    1009   (andl (:$l #xff) (:%l dest)))
     1001  (movzbl (:%b src) (:%l dest)))
    10101002
    10111003(define-x8632-vinsn zero-extend-u16 (((dest :s32))
     
    36403632                                          ((src :imm)))
    36413633  (movl (:%l src ) (:%l dest))
    3642   (shll (:$ub (- 48 x8632::fixnumshift)) (:%l dest))
    3643   (sarl (:$ub (- 48 x8632::fixnumshift)) (:%l dest)))
     3634  (shll (:$ub (- 16 x8632::fixnumshift)) (:%l dest))
     3635  (sarl (:$ub (- 16 x8632::fixnumshift)) (:%l dest)))
    36443636
    36453637(define-x8632-subprim-jump-vinsn (tail-funcall-gen) .SPtfuncallgen)
Note: See TracChangeset for help on using the changeset viewer.