summaryrefslogtreecommitdiffstatshomepage
path: root/py/asmarm.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/asmarm.c')
-rw-r--r--py/asmarm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/py/asmarm.c b/py/asmarm.c
index 663f861563..63963d2c0d 100644
--- a/py/asmarm.c
+++ b/py/asmarm.c
@@ -55,7 +55,10 @@ void asm_arm_end_pass(asm_arm_t *as) {
// Insert word into instruction flow
STATIC void emit(asm_arm_t *as, uint op) {
- *(uint*)asm_arm_get_cur_to_write_bytes(as, 4) = op;
+ uint8_t *c = mp_asm_base_get_cur_to_write_bytes(&as->base, 4);
+ if (c != NULL) {
+ *(uint32_t*)c = op;
+ }
}
// Insert word into instruction flow, add "ALWAYS" condition code