Changeset 16437


Ignore:
Timestamp:
Jun 28, 2015, 5:48:04 AM (4 years ago)
Author:
gb
Message:

support for WITH-IMM-TEMPS (etc) in the new allocator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/lscan/source/compiler/backend.lisp

    r16433 r16437  
    289289      (ash 1 (hard-regspec-value reg))))
    290290
     291(defun imm-reg-mask-for-reg (reg)
     292    (if *backend-use-linear-scan*
     293      0
     294      (ash 1 (hard-regspec-value reg))))
     295
    291296(defun fpr-mask-for-vreg (vreg)
    292297  (target-fpr-mask (hard-regspec-value vreg) (get-regspec-mode vreg)))
     
    335340                            :type type
    336341                            :wired nil)))
    337     (when vinsns
    338       (vector-push-extend lreg (vinsn-list-lregs vinsns)))
     342        (if vinsns
     343      (vector-push-extend lreg (vinsn-list-lregs vinsns))
     344      (error "no vinsns"))
    339345    lreg))
    340346
     
    450456
    451457(defmacro with-node-temps ((&rest reserved) (&rest nodevars) &body body)
    452   `(let* ((*available-backend-node-temps* (logand *available-backend-node-temps* (lognot (logior ,@(mapcar #'(lambda (r) `(ash 1 (hard-regspec-value ,r))) reserved)))))
     458  `(let* ((*available-backend-node-temps* (logand *available-backend-node-temps* (lognot (logior ,@(mapcar #'(lambda (r) `(node-reg-mask-for-reg ,r)) reserved)))))
    453459          ,@(mapcar #'(lambda (v) `(,v (make-unwired-lreg (select-node-temp)))) nodevars))
    454460     ,@body))
    455461
    456462(defmacro with-imm-temps ((&rest reserved) (&rest immvars) &body body)
    457   `(let* ((*available-backend-imm-temps* (logand *available-backend-imm-temps* (lognot (logior ,@(mapcar #'(lambda (r) `(ash 1 (hard-regspec-value ,r))) reserved)))))
     463  `(let* ((*available-backend-imm-temps* (logand *available-backend-imm-temps* (lognot (logior ,@(mapcar #'(lambda (r) `(imm-reg-mask-for-reg ,r)) reserved)))))
    458464          ,@(mapcar #'(lambda (v) (let* ((var (if (atom v) v (car v)))
    459465                                         (mode-name (if (atom v) :u32 (cadr v))))
     
    503509                                         #'(lambda (r)
    504510                                             `(if ,r
    505                                                (ash 1 (hard-regspec-value ,r))
     511                                               (imm-reg-mask-for-reg  ,r)
    506512                                               0))
    507513                                         reserved))))
Note: See TracChangeset for help on using the changeset viewer.