when noticing alignment troubles when assembling a branch instruction, give a more descriptive error
Sun Oct 28 07:01:01 PDT 2007 Ties Stuij <ties@stuij.se>
* when noticing alignment troubles when assembling a branch instruction, give a more descriptive error
diff -rN -u old-armish/src/arm-instructions.lisp new-armish/src/arm-instructions.lisp
--- old-armish/src/arm-instructions.lisp 2014-07-24 18:34:51.000000000 -0700
+++ new-armish/src/arm-instructions.lisp 2014-07-24 18:34:51.000000000 -0700
@@ -482,7 +482,8 @@
(offset (if l-addr
(- l-addr (+ *here* 8))
(error "label :~A in (b :~A) was never defined" label label))))
- (assert (zerop (logand offset 3))) ; 4-byte aligned offset
+ (unless (zerop (logand offset 3))
+ (error "when assembling (b :~A), i noticed your instructions aren't four byte aligned" label)) ; 4-byte aligned offset
(+ (ash #b101 25)
(encode-twos-complement (ash offset -2) 24))))
(make-and-install-condition-fns (enhance-instr-fn 'b 'l (ash #b1 24)))