Some cleanup in compilation of IR-IF to asm
This commit is contained in:
parent
4c3a25d5e6
commit
e302493800
1 changed files with 15 additions and 15 deletions
|
@ -208,15 +208,15 @@ is the responsibility of the pre-assembly compilation step."
|
||||||
(emit-load-data (input inst))
|
(emit-load-data (input inst))
|
||||||
(let ((prev-is-test-p (eql (strategy (allocation-details (input inst)))
|
(let ((prev-is-test-p (eql (strategy (allocation-details (input inst)))
|
||||||
:branch)))
|
:branch)))
|
||||||
(if prev-is-test-p
|
(cond (prev-is-test-p
|
||||||
;; If previous was a test, this instruction will be skipped if the
|
;; If previous was a test, this instruction will be skipped if the
|
||||||
;; test succeeds and we fall through to the THEN case. If it fails,
|
;; test succeeds and we fall through to the THEN case. If it fails,
|
||||||
;; this instruction executes, which jumps to the ELSE case.
|
;; this instruction executes, which jumps to the ELSE case.
|
||||||
(emit-asm-instruction :opcode #x4C
|
(emit-asm-instruction :opcode #x4C
|
||||||
:operand else-iblock
|
:operand else-iblock
|
||||||
:byte-length 3)
|
:byte-length 3))
|
||||||
|
(t
|
||||||
;; If the input is a bool value, we have to actually do some work.
|
;; If the input is a bool value, we have to actually do some work.
|
||||||
(progn
|
|
||||||
;; BNE +3, if it's Not Equal (zero), then it's true, so we skip...
|
;; BNE +3, if it's Not Equal (zero), then it's true, so we skip...
|
||||||
(emit-asm-instruction :opcode #xD0 :operand 3 :byte-length 2)
|
(emit-asm-instruction :opcode #xD0 :operand 3 :byte-length 2)
|
||||||
;; ...the jump to the ELSE case.
|
;; ...the jump to the ELSE case.
|
||||||
|
|
Loading…
Add table
Reference in a new issue