Changeset 15903


Ignore:
Timestamp:
Sep 19, 2013, 3:04:49 PM (8 years ago)
Author:
gb
Message:

Convert to new acode accessors through comment ";;; this far".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/acode-rewrite/source/compiler/ARM/arm2.lisp

    r15898 r15903  
    328328
    329329(defun acode-condition-to-arm-cr-bit (cond)
    330   (condition-to-arm-cr-bit (cadr cond)))
     330  (condition-to-arm-cr-bit (car (acode-operands cond))))
    331331
    332332(defun condition-to-arm-cr-bit (cond)
     
    10741074(defun arm2-toplevel-form (seg vreg xfer form)
    10751075  (let* ((code-note (acode-note form))
    1076          (args (if code-note `(,@(%cdr form) ,code-note) (%cdr form))))
     1076         (args (if code-note `(,@(acode-operands form) ,code-note) (acode-operands form))))
    10771077    (apply (arm2-acode-operator-function form) seg vreg xfer args)))
    10781078
     
    10881088                   (%ilogbitp operator-acode-subforms-bit op)
    10891089                   (%ilogbitp operator-assignment-free-bit op))
    1090             (dolist (f (%cdr form) (arm2-branch seg xfer nil))
     1090            (dolist (f (acode-operands form) (arm2-branch seg xfer nil))
    10911091              (arm2-form seg nil nil f ))
    1092             (apply fn seg vreg xfer (%cdr form))))))))
     1092            (apply fn seg vreg xfer (acode-operands form))))))))
    10931093
    10941094;;; dest is a float reg - form is acode
     
    11021102      (set-node-regspec-type-modes freg hard-reg-class-fpr-type-double))
    11031103    (let* ((fn (arm2-acode-operator-function form)))
    1104       (apply fn seg freg nil (%cdr form)))))
     1104      (apply fn seg freg nil (acode-operands form)))))
    11051105
    11061106
     
    13921392    (while (and (acode-p form) (or (eq (acode-operator form) (%nx1-operator progn))
    13931393                                   (eq (acode-operator form) (%nx1-operator local-tagbody))))
    1394       (setq form (caadr form)))
     1394      (setq form (caar  (acode-operands form))))
    13951395    (when (acode-p form)
    13961396      (let ((op (acode-operator form)))
    13971397        (if (and (eq op (%nx1-operator local-go))
    1398                  (arm2-equal-encodings-p (%caddr (%cadr form)) current-stack))
    1399           (%cadr (%cadr form))
     1398                 (arm2-equal-encodings-p (%caddr (car (acode-operands form))) current-stack))
     1399          (%cadr (car (acode-operands form)))
    14001400          (if (and (eq op (%nx1-operator local-return-from))
    1401                    (nx-null (caddr form)))
    1402             (let ((tagdata (car (cadr form))))
     1401                   (nx-null (cadr (acode-operands form))))
     1402            (let ((tagdata (car (car (acode-operands form)))))
    14031403              (and (arm2-equal-encodings-p (cdr tagdata) current-stack)
    14041404                   (null (caar tagdata))
     
    14141414          (or (%ilogbitp operator-single-valued-bit op)
    14151415              (and (eql op (%nx1-operator values))
    1416                    (let ((values (cadr form)))
     1416                   (let ((values (car (acode-operands form))))
    14171417                     (and values (null (cdr values)))))
    14181418              nil                       ; Learn about functions someday
     
    19851985           (or (eq (acode-operator form) (%nx1-operator immediate))
    19861986               (eq (acode-operator form) (%nx1-operator fixnum))))
    1987     (let* ((val (%cadr form))
     1987    (let* ((val (car (acode-operands form)))
    19881988           (typep (cond ((eq type-keyword :signed-32-bit-vector)
    19891989                         (typep val '(signed-byte 32)))
     
    24602460                 (acode-p fn)
    24612461                 (eq (acode-operator fn) (%nx1-operator immediate))
    2462                  (symbolp (cadr fn)))
    2463         (setq fn (arm2-tail-call-alias fn (%cadr fn) arglist)))
     2462                 (symbolp (car (acode-operands fn))))
     2463        (setq fn (arm2-tail-call-alias fn (car (acode-operands fn)) arglist)))
    24642464     
    24652465      (if (and (eq xfer $backend-return) (not (arm2-tailcallok xfer)))
     
    25182518  (with-arm-local-vinsn-macros (seg)
    25192519    (let* ((f-op (acode-unwrapped-form-value fn))
    2520            (immp (and (consp f-op)
    2521                       (eq (%car f-op) (%nx1-operator immediate))))
    2522            (symp (and immp (symbolp (%cadr f-op))))
     2520           (immp (and (acode-p f-op)
     2521                      (eq (acode-operator f-op) (%nx1-operator immediate))))
     2522           (symp (and immp (symbolp (car (acode-operands f-op)))))
    25232523           (label-p (and (fixnump fn)
    25242524                         (locally (declare (fixnum fn))
    25252525                           (and (= fn -1) (- fn)))))
    25262526           (tail-p (eq xfer $backend-return))
    2527            (func (if (consp f-op) (%cadr f-op)))
     2527           (func (if (acode-p f-op) (car (acode-operands f-op))))
    25282528           (a-reg nil)
    25292529           (lfunp (and (acode-p f-op)
     
    27682768  (setq f (acode-unwrapped-form-value f))
    27692769  (and (acode-p f)
    2770        (or (eq (%car f) (%nx1-operator immediate))
    2771            (eq (%car f) (%nx1-operator simple-function)))))
     2770       (or (eq (acode-operator f) (%nx1-operator immediate))
     2771           (eq (acode-operator f) (%nx1-operator simple-function)))))
    27722772
    27732773(defun arm-constant-form-p (form)
     
    27762776    (or (nx-null form)
    27772777        (nx-t form)
    2778         (and (consp form)
     2778        (and (acode-p form)
    27792779             (or (eq (acode-operator form) (%nx1-operator immediate))
    27802780                 (eq (acode-operator form) (%nx1-operator fixnum))
     
    27882788             (and (acode-p form)
    27892789                  (eq (acode-operator form) (%nx1-operator immediate))
    2790                   (setq form (%cadr form))
     2790                  (setq form (car (acode-operands form)))
    27912791                  (if (typep form 'integer)
    27922792                    form)))))
     
    27992799        ;(eq (acode-operator form) (%nx1-operator bound-special-ref))
    28002800        (if (eq (acode-operator form) (%nx1-operator lexical-reference))
    2801           (not (%ilogbitp $vbitsetq (nx-var-bits (%cadr form))))))))
     2801          (not (%ilogbitp $vbitsetq (nx-var-bits (car (acode-operands form)))))))))
    28022802
    28032803(defun arm2-formlist (seg stkargs &optional revregargs)
     
    37363736  (when (acode-p (setq form (acode-unwrapped-form-value form)))
    37373737    (if (eq (acode-operator form) (%nx1-operator lexical-reference))
    3738       (let* ((addr (var-ea (%cadr form))))
     3738      (let* ((addr (var-ea (car (acode-operands form)))))
    37393739        (if (typep addr 'lreg)
    37403740          addr
     
    39563956    (with-note (form seg curstack) ; note this rebinds form/seg/curstack so can't setq
    39573957      (with-arm-local-vinsn-macros (seg)
    3958         (let* ((op (acode-operator form)))
     3958        (let* ((op (acode-operator form))
     3959               (operands (acode-operands form)))
    39593960          (cond ((eq op (%nx1-operator list))
    39603961                 (let* ((*arm2-vstack* *arm2-vstack*)
    39613962                        (*arm2-top-vstack-lcell* *arm2-top-vstack-lcell*))
    3962                    (arm2-set-nargs seg (arm2-formlist seg (%cadr form) nil))
     3963                   (arm2-set-nargs seg (arm2-formlist seg (car operands) nil))
    39633964                   (arm2-open-undo $undostkblk curstack)
    39643965                   (! stack-cons-list))
    39653966                 (setq val arm::arg_z))
    39663967                ((eq op (%nx1-operator list*))
    3967                  (let* ((arglist (%cadr form)))                   
     3968                 (let* ((arglist (car operands)))
    39683969                   (let* ((*arm2-vstack* *arm2-vstack*)
    39693970                          (*arm2-top-vstack-lcell* *arm2-top-vstack-lcell*))
     
    39753976                   (setq val arm::arg_z)))
    39763977                ((eq op (%nx1-operator multiple-value-list))
    3977                  (arm2-multiple-value-body seg (%cadr form))
     3978                 (arm2-multiple-value-body seg (car operands))
    39783979                 (arm2-open-undo $undostkblk curstack)
    39793980                 (! stack-cons-list)
     
    39833984                        (z ($ arm::arg_z))
    39843985                        (result ($ arm::arg_z)))
    3985                    (arm2-two-targeted-reg-forms seg (%cadr form) y (%caddr form) z)
     3986                   (arm2-two-targeted-reg-forms seg (car operands) y (cadr operands) z)
    39863987                   (arm2-open-undo $undostkblk )
    39873988                   (! make-stack-cons result y z)
     
    39953996                     (setq val node))))
    39963997                ((eq op (%nx1-operator %new-ptr))
    3997                  (let* ((clear-form (caddr form))
     3998                 (let* ((clear-form (cadr operands))
    39983999                        (cval (nx2-constant-form-value clear-form)))
    39994000                   (if cval
    40004001                       (progn
    4001                          (arm2-one-targeted-reg-form seg (%cadr form) ($ arm::arg_z))
     4002                         (arm2-one-targeted-reg-form seg (car operands) ($ arm::arg_z))
    40024003                         (if (nx-null cval)
    40034004                             (! make-stack-block)
     
    40084009                               (rval ($ arm::arg_z))
    40094010                               (rclear ($ arm::arg_y)))
    4010                            (arm2-two-targeted-reg-forms seg (%cadr form) rval clear-form rclear)
     4011                           (arm2-two-targeted-reg-forms seg (car operands) rval clear-form rclear)
    40114012                           (! compare-to-nil crf rclear)
    40124013                           (! cbranch-false (aref *backend-labels* stack-block-0-label) crf arm::arm-cond-eq)
     
    40264027                 (let* ((*arm2-vstack* *arm2-vstack*)
    40274028                        (*arm2-top-vstack-lcell* *arm2-top-vstack-lcell*))
    4028                    (arm2-set-nargs seg (arm2-formlist seg (%cadr form) nil))
     4029                   (arm2-set-nargs seg (arm2-formlist seg (car operands) nil))
    40294030                   (! make-stack-vector))
    40304031                 (arm2-open-undo $undostkblk)
     
    40394040                 (setq val arm::arg_z))
    40404041                ((eq op (%nx1-operator closed-function))
    4041                  (setq val (arm2-make-closure seg (cadr form) t))) ; can't error
     4042                 (setq val (arm2-make-closure seg (car operands) t))) ; can't error
    40424043                ((eq op (%nx1-operator %make-uvector))
    4043                  (destructuring-bind (element-count subtag &optional (init 0 init-p)) (%cdr form)
     4044                 (destructuring-bind (element-count subtag &optional (init 0 init-p)) operands
    40444045                   (if init-p
    40454046                       (progn
     
    40524053                   (setq val ($ arm::arg_z)))))))))
    40534054  val)
    4054 
     4055;;; this far
    40554056(defun arm2-addrspec-to-reg (seg addrspec reg)
    40564057  (if (memory-spec-p addrspec)
Note: See TracChangeset for help on using the changeset viewer.