Replace unused code in code generation with assert
This commit is contained in:
parent
2331d15e11
commit
e717f49afc
1 changed files with 2 additions and 7 deletions
|
@ -311,13 +311,8 @@ is the responsibility of the pre-assembly compilation step."
|
||||||
:when (typep asm-obj 'asm-instruction)
|
:when (typep asm-obj 'asm-instruction)
|
||||||
:do (case (opcode asm-obj)
|
:do (case (opcode asm-obj)
|
||||||
((#x10 #x30 #x50 #x70 #x90 #xb0 #xd0 #xf0)
|
((#x10 #x30 #x50 #x70 #x90 #xb0 #xd0 #xf0)
|
||||||
;; Relative branches
|
;; Relative branches are all generated with hardcoded offsets
|
||||||
(when (typep (operand asm-obj) 'iblock)
|
(assert (typep (operand asm-obj) '(unsigned-byte 8))))
|
||||||
(resolve-iblock asm-obj))
|
|
||||||
;; - 2 is to offset for the branch instruction's length
|
|
||||||
(unless (typep (operand asm-obj) '(unsigned-byte 8))
|
|
||||||
(let* ((offset (- (address (operand asm-obj)) (address asm-obj) 2)))
|
|
||||||
(setf (operand asm-obj) (ldb (byte 8 0) (the (signed-byte 8) offset))))))
|
|
||||||
(t
|
(t
|
||||||
(when (typep (operand asm-obj) 'iblock)
|
(when (typep (operand asm-obj) 'iblock)
|
||||||
(resolve-iblock asm-obj))
|
(resolve-iblock asm-obj))
|
||||||
|
|
Loading…
Add table
Reference in a new issue