Skip to content
Snippets Groups Projects
Commit 4d70c330 authored by wlott's avatar wlott
Browse files

Changed FIND-LOAD-FUNCTIONS to ignore alternate SCs that are listed in

the ops SC restrictions.  Also, in MAKE-GENERATOR-FUNCTION, don't bind
the load-tn unless we are going to use it.
parent 4d23fe3c
No related branches found
No related tags found
No related merge requests found
......@@ -1058,31 +1058,31 @@
(cond
(load-scs
(dolist (alt load-scs)
(let* ((altn (sc-number alt))
(name (if load-p
(svref (sc-move-functions sc) altn)
(svref (sc-move-functions alt) scn)))
(found (or (assoc alt (funs) :test #'member)
(rassoc name (funs)))))
(unless name
(error "No move function defined to ~:[save~;load~] SC ~S~
~:[to~;from~] from SC ~S."
load-p sc-name load-p (sc-name alt)))
(cond (found
(unless (eq (cdr found) name)
(error "Can't tell whether to ~:[save~;load~] with ~S~@
or ~S when operand is in SC ~S."
load-p name (cdr found) (sc-name alt)))
(pushnew alt (car found)))
(t
(funs (cons (list alt) name)))))))
(unless (member (sc-name alt) (operand-parse-scs op) :test #'eq)
(let* ((altn (sc-number alt))
(name (if load-p
(svref (sc-move-functions sc) altn)
(svref (sc-move-functions alt) scn)))
(found (or (assoc alt (funs) :test #'member)
(rassoc name (funs)))))
(unless name
(error "No move function defined to ~:[save~;load~] SC ~S~
~:[to~;from~] from SC ~S."
load-p sc-name load-p (sc-name alt)))
(cond (found
(unless (eq (cdr found) name)
(error "Can't tell whether to ~:[save~;load~] with ~S~@
or ~S when operand is in SC ~S."
load-p name (cdr found) (sc-name alt)))
(pushnew alt (car found)))
(t
(funs (cons (list alt) name))))))))
((eq (sb-kind (sc-sb sc)) :non-packed))
(t
(error "SC ~S has no alternate~:[~; or constant~] SCs, yet it is~@
mentioned in the restriction for operand ~S."
sc-name load-p (operand-parse-name op))))))
(funs)))
......@@ -1171,8 +1171,9 @@
((:argument :result)
(let ((temp (operand-parse-temp op))
(name (operand-parse-name op)))
(binds `(,(operand-parse-load-tn op) (tn-ref-load-tn ,temp)))
(cond ((and (operand-parse-load op) (operand-parse-scs op))
(binds `(,(operand-parse-load-tn op)
(tn-ref-load-tn ,temp)))
(binds `(,name ,(decide-to-load parse op)))
(if (eq (operand-parse-kind op) :argument)
(loads (call-move-function parse op t))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment