Changeset 15173


Ignore:
Timestamp:
Jan 23, 2012, 8:56:50 PM (8 years ago)
Author:
gb
Message:

Back out of the previous change, and try to fix the problem the
way I was trying to talk myself into in the last commit's log.

Make X862-REGMAP-NOTE-STORE accept a null GPR arg (and just invalidate
any GPR that references the location.) If X862-FORM is going to push
its result, use X862-REGMAP-NOTE-STORE to invalidate regmap entries
that reference the top of stack. (If a register is pushed via
X862-VPUSH-REGISTER, those entries will just be invalidated again.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/X86/x862.lisp

    r15172 r15173  
    851851
    852852(defun x862-regmap-note-store (gpr loc)
    853   (let* ((gpr (%hard-regspec-value gpr)))
     853  (let* ((gpr (if gpr (%hard-regspec-value gpr))))
    854854    ;; Any other GPRs that had contained loc no longer do so.
    855855    (dotimes (i 16)
     
    861861            (setq *x862-gpr-locations-valid-mask*
    862862                  (logandc2 *x862-gpr-locations-valid-mask* (ash 1 i)))))))
    863     (if (logbitp gpr *x862-gpr-locations-valid-mask*)
    864       (push loc (svref *x862-gpr-locations* gpr))
    865       (setf (svref *x862-gpr-locations* gpr) (list loc)))
    866     (setq *x862-gpr-locations-valid-mask*
    867           (logior *x862-gpr-locations-valid-mask* (ash 1 gpr)))))
     863    (when gpr
     864      (if (logbitp gpr *x862-gpr-locations-valid-mask*)
     865        (push loc (svref *x862-gpr-locations* gpr))
     866        (setf (svref *x862-gpr-locations* gpr) (list loc)))
     867      (setq *x862-gpr-locations-valid-mask*
     868            (logior *x862-gpr-locations-valid-mask* (ash 1 gpr))))))
    868869 
    869870;;; For vpush: nothing else should claim to contain loc.
     
    13681369    (apply (x862-acode-operator-function form) seg vreg xfer args)))
    13691370
     1371
    13701372(defun x862-form (seg vreg xfer form)
     1373  (when (eq vreg :push)
     1374    (x862-regmap-note-store nil *x862-vstack*))
    13711375  (with-note (form seg)
    13721376    (if (nx-null form)
     
    32903294      (dolist (arg stkargs)
    32913295        (let* ((pushform (x862-acode-operator-supports-push arg)))
    3292           (if pushform
     3296en          (if pushformne
    32933297            (progn
    32943298              (x862-form seg :push nil pushform)
     
    54235427      (dolist (f initforms) (x862-form seg nil nil f))
    54245428      (let* ((*x862-vstack* *x862-vstack*)
    5425              (entry-vstack *x862-vstack*)
    54265429             (*x862-top-vstack-lcell* *x862-top-vstack-lcell*)
    54275430             (arch (backend-target-arch *target-backend*))
     
    54825485                         (! misc-set-c-node reg target index)))))
    54835486                 (! vstack-discard nntriv))
    5484                ))
    5485         (x862-regmap-note-vstack-delta entry-vstack *x862-vstack*)))
     5487               ))))
    54865488     (^)))
    54875489
Note: See TracChangeset for help on using the changeset viewer.