diff --git a/ChangeLog b/ChangeLog index f8f6cfdc3..936106b46 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-04-05 Paulo Andrade + + lib/jit_arm-cpu.c: Only adjust stack pointer in prolog if + need stack space, that is, do not emit a nop instruction + subtracting zero from the stack pointer. + 2014-04-04 Paulo Andrade * lib/jit_disasm.c: Correct a crash in the doc/printf example diff --git a/lib/jit_arm-cpu.c b/lib/jit_arm-cpu.c index c0419c317..08db89310 100644 --- a/lib/jit_arm-cpu.c +++ b/lib/jit_arm-cpu.c @@ -3725,7 +3725,8 @@ _prolog(jit_state_t *_jit, jit_node_t *node) PUSH(0x3ff|(1<<_FP_REGNO)|(1<<_LR_REGNO)); } movr(_FP_REGNO, _SP_REGNO); - subi(_SP_REGNO, _SP_REGNO, _jitc->function->stack); + if (_jitc->function->stack) + subi(_SP_REGNO, _SP_REGNO, _jitc->function->stack); } static void