mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 02:31:03 -08:00
fix comp-emit-cond-jump
This commit is contained in:
parent
6e1e1bdc2c
commit
e25cf44115
1 changed files with 14 additions and 14 deletions
|
|
@ -338,24 +338,24 @@ If DST-N is specified use it otherwise assume it to be the current slot."
|
|||
(comp-emit `(block ,block-name))
|
||||
(setf (comp-limplify-block-name comp-pass) block-name)))
|
||||
|
||||
(defun comp-emit-cond-jump (discard-n lap-label negated)
|
||||
(defun comp-emit-cond-jump (target-offset lap-label negated)
|
||||
"Emit a conditional jump to LAP-LABEL.
|
||||
Discard DISCARD-N slots afterward.
|
||||
TARGET-OFFSET is the positive offset on the SP when branching to the target
|
||||
block.
|
||||
If NEGATED non nil negate the test condition."
|
||||
(let ((bb (comp-new-block-sym))
|
||||
(blocks (comp-func-blocks comp-func)))
|
||||
(let ((blocks (comp-func-blocks comp-func))
|
||||
(bb (comp-new-block-sym))) ;; Fall through block
|
||||
(puthash bb
|
||||
(make-comp-block :sp (- (comp-sp) discard-n))
|
||||
(make-comp-block :sp (comp-sp))
|
||||
blocks)
|
||||
(progn
|
||||
(let ((target (comp-lap-to-limple-bb lap-label)))
|
||||
(comp-emit (if negated
|
||||
(list 'cond-jump (comp-slot-next) target bb)
|
||||
(list 'cond-jump (comp-slot-next) bb target)))
|
||||
(puthash target
|
||||
(make-comp-block :sp (comp-sp))
|
||||
blocks)
|
||||
(comp-mark-block-closed)))
|
||||
(let ((target (comp-lap-to-limple-bb lap-label)))
|
||||
(comp-emit (if negated
|
||||
(list 'cond-jump (comp-slot-next) target bb)
|
||||
(list 'cond-jump (comp-slot-next) bb target)))
|
||||
(puthash target
|
||||
(make-comp-block :sp (+ target-offset (comp-sp)))
|
||||
blocks)
|
||||
(comp-mark-block-closed))
|
||||
(comp-emit-block bb)))
|
||||
|
||||
(defun comp-stack-adjust (n)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue