Changeset 10542


Ignore:
Timestamp:
Aug 22, 2008, 9:40:51 PM (11 years ago)
Author:
gb
Message:

Add missing vinsns MEM-SET-C-BIT-VARIABLE-VALUE, MEM-REF-C-BIT-FIXNUM.
Might be a CISCier way to do one or both.

File:
1 edited

Legend:

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

    r10497 r10542  
    31353135  (btsl (:$ub (:apply %hard-regspec-value temp))
    31363136        (:@ (:%seg :rcontext) x8632::tcr.node-regs-mask)))
     3137
     3138
     3139(define-x8632-vinsn mem-set-c-bit-variable-value (()
     3140                                                  ((src :address)
     3141                                                   (offset :s32const)
     3142                                                   (value :lisp)))
     3143  (testl (:%l value) (:%l value))
     3144  (jne :set)
     3145  ((:pred = 0 (:apply ash offset -5))
     3146   (btrl (:$ub (:apply logand 31 offset))
     3147        (:@  (:%q src))))
     3148  ((:not (:pred = 0 (:apply ash offset -5)))
     3149   (btrl (:$ub (:apply logand 31 offset))
     3150         (:@ (:apply ash (:apply ash offset -5) 4) (:%q src))))
     3151  (jmp :done)
     3152  :set
     3153  ((:pred = 0 (:apply ash offset -5))
     3154   (btsl (:$ub (:apply logand 31 offset))
     3155         (:@  (:%q src))))
     3156  ((:not (:pred = 0 (:apply ash offset -5)))
     3157   (btsl (:$ub (:apply logand 31 offset))
     3158         (:@ (:apply ash (:apply ash offset -5) 2) (:%q src))))
     3159  :done)
    31373160
    31383161(define-x8632-vinsn %natural+  (((result :u32))
     
    37613784              (:%l src)) (:%l dest)))
    37623785
     3786(define-x8632-vinsn mem-ref-c-bit-fixnum (((dest :lisp))
     3787                                          ((src :address)
     3788                                           (offset :s32const))
     3789                                          ((temp :imm)))
     3790  ((:pred = 0 (:apply ash offset -5))
     3791   (btl (:$ub (:apply logand 31 offset))
     3792        (:@  (:%l src))))
     3793  ((:not (:pred = 0 (:apply ash offset -5)))
     3794   (btl (:$ub (:apply logand 31 offset))
     3795        (:@ (:apply ash (:apply ash offset -5) 2) (:%q src))))
     3796  (movl (:$l x8664::fixnumone) (:%l temp))
     3797  (movl (:$l 0) (:%l dest))
     3798  (cmovbl (:%l temp) (:%l dest)))
     3799
    37633800(define-x8632-vinsn mem-ref-bit-fixnum (((dest :lisp)
    37643801                                         (src :address))
Note: See TracChangeset for help on using the changeset viewer.