Changeset 10984


Ignore:
Timestamp:
Oct 5, 2008, 3:28:36 AM (11 years ago)
Author:
gb
Message:

Need to :apply target-nil/t-value in x86 vinsn-templates, too.
(Same bootstrapping issue, more new images. Sorry.)

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

Legend:

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

    r10959 r10984  
    316316  ((:pred >= min 1)
    317317   (movl (:%l x8632::arg_z) (:%l x8632::arg_y)))
    318   (movl (:$l (target-nil-value)) (:%l x8632::arg_z))
     318  (movl (:$l (:apply target-nil-value)) (:%l x8632::arg_z))
    319319  :done)
    320320
     
    332332  ((:pred >= min 1)
    333333   (pushl (:%l x8632::arg_z)))
    334   (movl (:$l (target-nil-value)) (:%l x8632::arg_y))
     334  (movl (:$l (:apply target-nil-value)) (:%l x8632::arg_y))
    335335  (jmp :last)
    336336  :one
     
    340340  (movl (:%l x8632::arg_z) (:%l x8632::arg_y))
    341341  :last
    342   (movl (:$l (target-nil-value)) (:%l x8632::arg_z))
     342  (movl (:$l (:apply target-nil-value)) (:%l x8632::arg_z))
    343343  :done)
    344344
     
    355355  :loop
    356356  (addl (:$b x8632::fixnumone) (:%l temp))
    357   (pushl (:$l (target-nil-value)))
     357  (pushl (:$l (:apply target-nil-value)))
    358358  ((:pred < n 32)
    359359   (cmpl (:$b (:apply ash n x8632::fixnumshift)) (:%l temp)))
     
    423423                                                  ((frame-offset :u16const)
    424424                                                   (cur-vsp :u16const)))
    425   (cmpl (:$l (target-nil-value)) (:@ (:apply - (:apply + frame-offset x8632::word-size-in-bytes)) (:%l x8632::ebp))))
     425  (cmpl (:$l (:apply target-nil-value)) (:@ (:apply - (:apply + frame-offset x8632::word-size-in-bytes)) (:%l x8632::ebp))))
    426426
    427427(define-x8632-vinsn compare-value-cell-to-nil (()
    428428                                               ((vcell :lisp)))
    429   (cmpl (:$l (target-nil-value)) (:@ x8632::value-cell.value (:%l vcell))))
     429  (cmpl (:$l (:apply target-nil-value)) (:@ x8632::value-cell.value (:%l vcell))))
    430430
    431431(define-x8632-vinsn lcell-load (((dest :lisp))
     
    465465(define-x8632-vinsn compare-to-nil (()
    466466                                    ((arg0 t)))
    467   (cmpl (:$l (target-nil-value)) (:%l arg0)))
     467  (cmpl (:$l (:apply target-nil-value)) (:%l arg0)))
    468468
    469469(define-x8632-vinsn compare-to-t (()
    470470                                  ((arg0 t)))
    471   (cmpl (:$l (target-t-value)) (:%l arg0)))
     471  (cmpl (:$l (:apply target-t-value)) (:%l arg0)))
    472472
    473473(define-x8632-vinsn ref-constant (((dest :lisp))
     
    551551  ;; special check for NIL (which is a distinguished CONS on x8632)
    552552  :resume
    553   (cmpl (:$l (target-nil-value)) (:%l object))
     553  (cmpl (:$l (:apply target-nil-value)) (:%l object))
    554554  (je :bad)
    555555  (movl (:%l object) (:%l tag))
     
    569569  (cmpb (:$b x8632::fulltag-cons) (:%accb tag))
    570570  (setne (:%b x8632::ah))
    571   (cmpl (:$l (target-nil-value)) (:% object))
     571  (cmpl (:$l (:apply target-nil-value)) (:% object))
    572572  (sete (:%b x8632::al))
    573573  (orb (:%b x8632::ah) (:%b x8632::al)))
     
    736736(define-x8632-vinsn (load-nil :constant-ref) (((dest t))
    737737                                              ())
    738   (movl (:$l (target-nil-value)) (:%l dest)))
     738  (movl (:$l (:apply target-nil-value)) (:%l dest)))
    739739
    740740
    741741(define-x8632-vinsn (load-t :constant-ref) (((dest t))
    742742                                            ())
    743   (movl (:$l (target-t-value)) (:%l dest)))
     743  (movl (:$l (:apply target-t-value)) (:%l dest)))
    744744
    745745;;; use something like this for the other extract-whatevers, too,
     
    824824                                     ((crbit :u8const))
    825825                                     ((temp :u32)))
    826   (movl (:$l (target-t-value)) (:%l temp))
     826  (movl (:$l (:apply target-t-value)) (:%l temp))
    827827  (leal (:@ (- x8632::t-offset) (:%l temp)) (:%l dest))
    828828  (cmovccl (:$ub crbit) (:%l temp) (:%l dest)))
     
    15051505  (jmp :done)
    15061506  :push-loop
    1507   (pushl (:$l (target-nil-value)))
     1507  (pushl (:$l (:apply target-nil-value)))
    15081508  (addl (:$b x8632::node-size) (:%l x8632::nargs))
    15091509  (subl (:$b x8632::node-size) (:%l imm))
     
    15481548(define-x8632-vinsn pass-multiple-values-symbol (()
    15491549                                                 ())
    1550   (pushl (:@ (+ (target-nil-value) (x8632::%kernel-global 'x86::ret1valaddr))))
     1550  (pushl (:@ (:apply + (:apply target-nil-value) (x8632::%kernel-global 'x86::ret1valaddr))))
    15511551  (jmp (:@ x8632::symbol.fcell (:% x8632::fname))))
    15521552
     
    15691569  (jne :bad)
    15701570  :go
    1571   (pushl (:@ (+ (target-nil-value) (x8632::%kernel-global 'x86::ret1valaddr))))
     1571  (pushl (:@ (:apply + (:apply target-nil-value) (x8632::%kernel-global 'x86::ret1valaddr))))
    15721572  (jmp (:%l x8632::fn))
    15731573  (:anchored-uuo-section :resume)
     
    24642464                                    ((tag :u8)))
    24652465  :again
    2466   (cmpl (:$l (target-nil-value)) (:%l object))
     2466  (cmpl (:$l (:apply target-nil-value)) (:%l object))
    24672467  (je :got-it)
    24682468  (movl (:%l object) (:%l tag))
     
    27752775                                     ((tag :u8)))
    27762776  :resume
    2777   (cmpl (:$l (target-nil-value)) (:%l src))
     2777  (cmpl (:$l (:apply target-nil-value)) (:%l src))
    27782778  (je :nilsym)
    27792779  (movl (:%l src) (:%l tag))
     
    27902790  (jmp :ok)
    27912791  :nilsym
    2792   (movl (:$l (+ (target-nil-value) x8632::nilsym-offset)) (:%l dest))
     2792  (movl (:$l (:apply + (:apply target-nil-value) x8632::nilsym-offset)) (:%l dest))
    27932793  :ok
    27942794 
     
    34553455                                       ((temp :imm)
    34563456                                        (ra0 (:lisp #.x8632::ra0))))
    3457   (movl (:@ (+ (target-nil-value) (x8632::%kernel-global 'x86::ret1valaddr)))
     3457  (movl (:@ (:apply + (:apply target-nil-value) (x8632::%kernel-global 'x86::ret1valaddr)))
    34583458        (:%l temp))
    34593459  (cmpl (:%l temp) (:%l ra0))
    34603460  (je :multiple)
    3461   (pushl (:@ (+ (target-nil-value) (x8632::%kernel-global 'x86::lexpr-return1v))))
     3461  (pushl (:@ (:apply + (:apply target-nil-value) (x8632::%kernel-global 'x86::lexpr-return1v))))
    34623462  (jmp :finish)
    34633463  :multiple
    3464   (pushl (:@ (+ (target-nil-value) (x8632::%kernel-global 'x86::lexpr-return))))
     3464  (pushl (:@ (:apply + (:apply target-nil-value) (x8632::%kernel-global 'x86::lexpr-return))))
    34653465  (pushl (:%l temp))
    34663466  :finish
     
    36333633  (cmpl (:$b (ash #xd800 -11))(:%l temp))
    36343634  :bad-if-eq
    3635   (movl (:$l (target-nil-value)) (:%l temp))
     3635  (movl (:$l (:apply target-nil-value)) (:%l temp))
    36363636  (cmovel (:%l temp) (:%l dest))
    36373637  (je :done)
     
    36843684  (leal (:@ (:%l x8632::esp) (:%l x8632::nargs)) (:%l temp))
    36853685  (subl (:@ (:%l temp)) (:%l x8632::nargs))
    3686   (movl (:$l (target-nil-value)) (:%l result))
     3686  (movl (:$l (:apply target-nil-value)) (:%l result))
    36873687  (jle :done)
    36883688  ;; I -think- that a CMOV would be safe here, assuming that N wasn't
     
    37533753  (movl (:@ (+ (ash 1 x8632::word-shift) x8632::misc-data-offset) (:%l src))
    37543754        (:%l dest))
    3755   (cmpl (:$l (target-nil-value)) (:%l dest))
     3755  (cmpl (:$l (:apply target-nil-value)) (:%l dest))
    37563756  (je :bad)
    37573757
     
    38613861                                     (imm :imm)))
    38623862  (xorl (:%l imm) (:%l imm))
    3863   (movl (:$l (target-nil-value)) (:%l x8632::arg_y))
     3863  (movl (:$l (:apply target-nil-value)) (:%l x8632::arg_y))
    38643864  :loop
    38653865  (rcmpl (:%l imm) (:%l nargs))
     
    38783878  (negb (:%b temp))
    38793879  (andl (:$b x8632::t-offset) (:%l temp))
    3880   (addl (:$l (target-nil-value)) (:%l temp))
     3880  (addl (:$l (:apply target-nil-value)) (:%l temp))
    38813881  (pushl (:%l temp)))
    38823882
     
    38893889  (je :one)
    38903890  ;; none
    3891   (pushl (:$l (target-nil-value)))
    3892   (pushl (:$l (target-nil-value)))
     3891  (pushl (:$l (:apply target-nil-value)))
     3892  (pushl (:$l (:apply target-nil-value)))
    38933893  (jmp :done)
    38943894  :one
    3895   (pushl (:$l (target-t-value)))
    3896   (pushl (:$l (target-nil-value)))
     3895  (pushl (:$l (:apply target-t-value)))
     3896  (pushl (:$l (:apply target-nil-value)))
    38973897  (jmp :done)
    38983898  :two
    3899   (pushl (:$l (target-t-value)))
    3900   (pushl (:$l (target-t-value)))
     3899  (pushl (:$l (:apply target-t-value)))
     3900  (pushl (:$l (:apply target-t-value)))
    39013901  :done)
    39023902
  • trunk/source/compiler/X86/X8664/x8664-vinsns.lisp

    r10959 r10984  
    389389  ((:pred >= min 1)
    390390   (movq (:%q x8664::arg_z) (:%q x8664::arg_y)))
    391   (movq (:$l (target-nil-value)) (:%q x8664::arg_z))
     391  (movq (:$l (:apply target-nil-value)) (:%q x8664::arg_z))
    392392  :done)
    393393
     
    408408  ((:pred >= min 1)
    409409   (movq (:%q x8664::arg_z) (:%q x8664::arg_x)))
    410   (movl (:$l (target-nil-value)) (:%l x8664::arg_y))
     410  (movl (:$l (:apply target-nil-value)) (:%l x8664::arg_y))
    411411  (jmp :last)
    412412  :one
     
    418418  (movq (:%q x8664::arg_z) (:%q x8664::arg_y))
    419419  :last
    420   (movq (:$l (target-nil-value)) (:%q x8664::arg_z))
     420  (movq (:$l (:apply target-nil-value)) (:%q x8664::arg_z))
    421421  :done)
    422422
     
    456456  ((:pred >= min 1)
    457457   (pushq (:%q x8664::arg_z)))
    458   (movl (:$l (target-nil-value)) (:%l x8664::arg_x))
     458  (movl (:$l (:apply target-nil-value)) (:%l x8664::arg_x))
    459459  :last-2
    460   (movl (:$l (target-nil-value)) (:%l x8664::arg_y))
     460  (movl (:$l (:apply target-nil-value)) (:%l x8664::arg_y))
    461461  :last-1
    462   (movl (:$l (target-nil-value)) (:%l x8664::arg_z))
     462  (movl (:$l (:apply target-nil-value)) (:%l x8664::arg_z))
    463463  :done)
    464464
     
    479479  ((:pred >= n 16)
    480480   (cmpl (:$l (:apply ash n x8664::word-shift)) (:%l temp))) 
    481   (pushq (:$l (target-nil-value)))
     481  (pushq (:$l (:apply target-nil-value)))
    482482  (jne :loop)
    483483  :done)
     
    593593(define-x8664-vinsn compare-to-t (()
    594594                                    ((arg0 t)))
    595   (cmpq (:$l (target-t-value)) (:%q arg0)))
     595  (cmpq (:$l (:apply target-t-value)) (:%q arg0)))
    596596
    597597(define-x8664-vinsn ref-constant (((dest :lisp))
     
    846846(define-x8664-vinsn (load-nil :constant-ref) (((dest t))
    847847                                              ())
    848   (movl (:$l (target-nil-value)) (:%l dest)))
     848  (movl (:$l (:apply target-nil-value)) (:%l dest)))
    849849
    850850
    851851(define-x8664-vinsn (load-t :constant-ref) (((dest t))
    852852                                            ())
    853   (movl(:$l (target-t-value)) (:%l dest)))
     853  (movl(:$l (:apply target-t-value)) (:%l dest)))
    854854
    855855
     
    919919(define-x8664-vinsn cr-bit->boolean (((dest :lisp))
    920920                                     ((crbit :u8const)))
    921   (movl (:$l (target-nil-value)) (:%l dest))
     921  (movl (:$l (:apply target-nil-value)) (:%l dest))
    922922  (cmovccl (:$ub crbit) (:@ (+ x8664::t-offset x8664::symbol.vcell) (:%l dest)) (:%l dest)))
    923923
     
    17101710  (jmp :done)
    17111711  :push-loop
    1712   (pushq (:$l (target-nil-value)))
     1712  (pushq (:$l (:apply target-nil-value)))
    17131713  (addl (:$b x8664::node-size) (:%l x8664::nargs))
    17141714  (subl (:$b x8664::node-size) (:%l imm))
     
    17521752(define-x8664-vinsn pass-multiple-values-symbol (()
    17531753                                                 ())
    1754   (pushq (:@ (+ (target-nil-value) (x8664::%kernel-global 'x86::ret1valaddr))))
     1754  (pushq (:@ (:apply + (:apply target-nil-value) (x8664::%kernel-global 'x86::ret1valaddr))))
    17551755  (jmp (:@ x8664::symbol.fcell (:% x8664::fname))))
    17561756
     
    17671767  (jl :bad)
    17681768  (cmoveq (:@ x8664::symbol.fcell (:%q x8664::fname)) (:%q x8664::fn))
    1769   (pushq (:@ (+ (target-nil-value) (x8664::%kernel-global 'x86::ret1valaddr))))
     1769  (pushq (:@ (:apply + (:apply target-nil-value) (x8664::%kernel-global 'x86::ret1valaddr))))
    17701770  (jmp (:%q x8664::fn))
    17711771
     
    32583258                                     (imm :imm)))
    32593259  (xorl (:%l imm) (:%l imm))
    3260   (movl (:$l (target-nil-value)) (:%l x8664::arg_y))
     3260  (movl (:$l (:apply target-nil-value)) (:%l x8664::arg_y))
    32613261  :loop
    32623262  (rcmpl (:%l imm) (:%l nargs))
     
    32723272                                        ((temp :u64)))
    32733273  (testl (:%l x8664::nargs) (:%l x8664::nargs))
    3274   (movl (:$l (target-nil-value)) (:%l temp))
     3274  (movl (:$l (:apply target-nil-value)) (:%l temp))
    32753275  (cmovnel (:@ (+ x8664::t-offset x8664::symbol.vcell) (:%l temp)) (:%l temp))
    32763276  (pushq (:%q temp)))
     
    32813281                                         (temp1 :u64)))
    32823282  (rcmpl (:%l x8664::nargs) (:$b x8664::node-size))
    3283   (movl (:$l (target-nil-value)) (:%l temp0))
     3283  (movl (:$l (:apply target-nil-value)) (:%l temp0))
    32843284  (movl (:%l temp0) (:%l temp1))
    32853285  (cmovael (:@ (+ x8664::t-offset x8664::symbol.vcell) (:%l temp0)) (:%l temp0))
     
    34083408                                       ()
    34093409                                       ((temp :imm)))
    3410   (movq (:@ (+ (target-nil-value) (x8664::%kernel-global 'x86::ret1valaddr)))
     3410  (movq (:@ (:apply + (:apply target-nil-value) (x8664::%kernel-global 'x86::ret1valaddr)))
    34113411        (:%q temp))
    34123412  (cmpq (:%q temp)
    34133413        (:%q x8664::ra0))
    34143414  (je :multiple)
    3415   (pushq (:@ (+ (target-nil-value) (x8664::%kernel-global 'x86::lexpr-return1v))))
     3415  (pushq (:@ (:apply + (:apply target-nil-value) (x8664::%kernel-global 'x86::lexpr-return1v))))
    34163416  (jmp :finish)
    34173417  :multiple
    3418   (pushq (:@ (+ (target-nil-value) (x8664::%kernel-global 'x86::lexpr-return))))
     3418  (pushq (:@ (:apply + (:apply target-nil-value) (x8664::%kernel-global 'x86::lexpr-return))))
    34193419  (pushq (:%q temp))
    34203420  :finish
     
    35333533                                     ((tag :u8)))
    35343534  :begin
    3535   (movl (:$l (+ (target-nil-value) x8664::nilsym-offset)) (:%l tag))
     3535  (movl (:$l (:apply + (:apply target-nil-value) x8664::nilsym-offset)) (:%l tag))
    35363536  (cmpb (:$b x8664::fulltag-nil) (:%b src))
    35373537  (cmoveq (:%q tag) (:%q dest))
     
    36393639  (cmpl (:$b (ash #xd800 -11))(:%l temp))
    36403640  :bad-if-eq
    3641   (movl (:$l (target-nil-value)) (:%l temp))
     3641  (movl (:$l (:apply target-nil-value)) (:%l temp))
    36423642  (cmovel (:%l temp) (:%l dest))
    36433643  (je :done)
     
    36943694  (leaq (:@ (:%q x8664::rsp) (:%q x8664::nargs)) (:%q imm0))
    36953695  (subq (:@ (:%q imm0)) (:%q x8664::nargs))
    3696   (movl (:$l (target-nil-value)) (:%l result))
     3696  (movl (:$l (:apply target-nil-value)) (:%l result))
    36973697  (jle :done)
    36983698  ;; I -think- that a CMOV would be safe here, assuming that N wasn't
Note: See TracChangeset for help on using the changeset viewer.