Changeset 10200


Ignore:
Timestamp:
Jul 25, 2008, 1:47:50 AM (11 years ago)
Author:
rme
Message:

Encode :$self type in vinsns. Also add various :%acc operand types
for use in vinsns.

There is sometimes a shorter encoding for instructions which use the
accumulator (EAX/RAX) as an operand, so provide a way to get at these
instructions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/X86/x86-backend.lisp

    r10181 r10200  
    3636              (8 (x86::encode-operand-type :reg64))
    3737              (4 (x86::encode-operand-type :reg32))))
     38        (:%acc (ecase (arch::target-lisp-node-size (backend-target-arch backend))
     39              (8 (x86::encode-operand-type :reg64 :acc))
     40              (4 (x86::encode-operand-type :reg32 :acc))))
    3841        (:%q (x86::encode-operand-type :reg64))
     42        (:%accq (x86::encode-operand-type :reg64 :acc))
    3943        (:%l (x86::encode-operand-type :reg32))
     44        (:%accl (x86::encode-operand-type :reg32 :acc))
    4045        (:%w (x86::encode-operand-type :reg16))
     46        (:%accw (x86::encode-operand-type :reg16 :acc))
    4147        (:%b (x86::encode-operand-type :reg8))
     48        (:%accb (x86::encode-operand-type :reg8 :acc))
    4249        (:%xmm (x86::encode-operand-type :regxmm))
    4350        (:%mmx (x86::encode-operand-type :regmmx))
     
    5057        (:$ul  (x86::encode-operand-type :imm32))
    5158        (:$q (x86::encode-operand-type :imm64))
    52         (:%shift (x86::encode-operand-type :shiftcount :reg8))))))
     59        (:%shift (x86::encode-operand-type :shiftcount :reg8))
     60        (:$self (x86::encode-operand-type :self))))))
    5361
    5462(defun lookup-x86-opcode (form backend)
     
    271279                                    (simplify-memory-operand (cdr op))))
    272280                             ((member (car op)
    273                                       '(:% :%q :%l :%w :%b :$ :$1 :$b :$ub :$w :$l
    274                                         :$ul :$q :%mmx :%xmm :%shift))
     281                                      '(:% :%q :%l :%w :%b
     282                                        :%acc :%accq :%accl :%accw :%accb
     283                                        :$ :$1 :$b :$ub :$w :$l
     284                                        :$ul :$q :%mmx :%xmm :%shift :$self))
    275285                              (simplify-simple-operand (cadr op)))
    276286                             (t
Note: See TracChangeset for help on using the changeset viewer.