Branch: Tag:

2015-07-07

2015-07-07 13:46:37 by Arne Goedeke <el@laramies.com>

Compiler [amd64]: reload sp_reg after call into c code

The stack pointer needs to be reloaded after calling F_LOOP. Otherwise,
since the F_LOOP opcode function changes the stack pointer, it might be
overwritten with the wrong value before calling a subsequent opcode
function.

2864:    LABEL_A; /* Not an integer. */    amd64_call_c_opcode(instrs[F_LOOP-F_OFFSET].address,    instrs[F_LOOP-F_OFFSET].flags ); +  amd64_load_sp_reg();    jmp( &label_C );       /* result in RAX */