On 05/14/2011 12:38 PM, Blue Swirl wrote: > - frame_size = push_size + TCG_STATIC_CALL_ARGS_SIZE; > + frame_size = push_size + TCG_STATIC_CALL_ARGS_SIZE + > + CPU_TEMP_BUF_NLONGS * sizeof(long); > frame_size = (frame_size + TCG_TARGET_STACK_ALIGN - 1) & > ~(TCG_TARGET_STACK_ALIGN - 1); > stack_addend = frame_size - push_size; > + tcg_set_frame(s, TCG_REG_ESP, 0, CPU_TEMP_BUF_NLONGS * sizeof(long)); > + > + /* Save all callee saved registers. */ > + for (i = 0; i < ARRAY_SIZE(tcg_target_callee_save_regs); i++) { > + tcg_out_push(s, tcg_target_callee_save_regs[i]); > + } > + > tcg_out_addi(s, TCG_REG_ESP, -stack_addend);
Wrong argument to tcg_set_frame. The temps need to be above the outgoing call arguments, i.e. offset TCG_STATIC_CALL_ARGS_SIZE. r~