Skip to content

Commit

Permalink
Fix push/pop eliding. Fixes ARM compiler bugs in ironclad (and probab…
Browse files Browse the repository at this point in the history
…ly insidious others)
  • Loading branch information
jesseoff committed Jun 16, 2020
1 parent 595a5cf commit efe29fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/ARM/arm2.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -3370,6 +3370,7 @@ v idx-reg constidx val-reg (arm2-unboxed-reg-for-aset seg type-keyword val-reg s
(vinsn-sequence-refs-reg-p
push-vinsn pop-vinsn popped-reg))))
(cond ((and (not (and pushed-reg-is-set popped-reg-is-set))
(not (vinsn-sequence-has-some-attribute-p push-vinsn pop-vinsn :branch :jump))
(or (null popped-reg-is-reffed)
(null pushed-reg-is-set)
;; If the popped register is
Expand All @@ -3384,8 +3385,7 @@ v idx-reg constidx val-reg (arm2-unboxed-reg-for-aset seg type-keyword val-reg s
;; be sure of the order in which
;; they might happen if the sequence
;; contains jumps or branches.
(vinsn-in-sequence-p pushed-reg-is-set popped-reg-is-reffed pop-vinsn)
(not (vinsn-sequence-has-some-attribute-p push-vinsn pop-vinsn :branch :jump))))
(vinsn-in-sequence-p pushed-reg-is-set popped-reg-is-reffed pop-vinsn)))
;; We don't try this if anything's pushed on
;; or popped from the vstack in the
;; sequence, but there can be references to
Expand Down

0 comments on commit efe29fe

Please sign in to comment.