From 7a4e6f7c23f79bda524059aa50a0f8c7b304947f Mon Sep 17 00:00:00 2001 From: SarahW Date: Sun, 11 Dec 2016 12:47:48 +0000 Subject: [PATCH] Codeblocks must end on hitting LSS, as it can cause stack size to change dynamically. Fixes LBA2. --- src/codegen_ops_mov.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/codegen_ops_mov.h b/src/codegen_ops_mov.h index 21d8057..23dfb4e 100644 --- a/src/codegen_ops_mov.h +++ b/src/codegen_ops_mov.h @@ -643,6 +643,8 @@ static uint32_t ropL ## seg(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, u STORE_REG_TARGET_W_RELEASE(host_reg, dest_reg); \ } \ \ + if (&rseg == &_ss) \ + CPU_BLOCK_END(); /*Instruction might change stack size, so end block here*/ \ return op_pc + 1; \ }