Revision f44c9960

b/tcg/sparc/tcg-target.c
693 693
/* Generate global QEMU prologue and epilogue code */
694 694
static void tcg_target_qemu_prologue(TCGContext *s)
695 695
{
696
    tcg_set_frame(s, TCG_REG_I6, TCG_TARGET_CALL_STACK_OFFSET,
697
                  CPU_TEMP_BUF_NLONGS * (int)sizeof(long));
696 698
    tcg_out32(s, SAVE | INSN_RD(TCG_REG_O6) | INSN_RS1(TCG_REG_O6) |
697
              INSN_IMM13(-TCG_TARGET_STACK_MINFRAME));
699
              INSN_IMM13(-(TCG_TARGET_STACK_MINFRAME +
700
                           CPU_TEMP_BUF_NLONGS * (int)sizeof(long))));
698 701
    tcg_out32(s, JMPL | INSN_RD(TCG_REG_G0) | INSN_RS1(TCG_REG_I1) |
699 702
              INSN_RS2(TCG_REG_G0));
700 703
    tcg_out_mov(s, TCG_TYPE_PTR, TCG_AREG0, TCG_REG_I0);
......
1566 1569
    tcg_regset_set_reg(s->reserved_regs, TCG_REG_O6);
1567 1570
    tcg_regset_set_reg(s->reserved_regs, TCG_REG_O7);
1568 1571
    tcg_add_target_add_op_defs(sparc_op_defs);
1569
    tcg_set_frame(s, TCG_AREG0, offsetof(CPUState, temp_buf),
1570
                  CPU_TEMP_BUF_NLONGS * sizeof(long));
1571 1572
}
b/tcg/tcg.c
1439 1439
{
1440 1440
    TCGTemp *ts;
1441 1441
    ts = &s->temps[temp];
1442
#ifndef __sparc_v9__ /* Sparc64 stack is accessed with offset of 2047 */
1442 1443
    s->current_frame_offset = (s->current_frame_offset +
1443 1444
                               (tcg_target_long)sizeof(tcg_target_long) - 1) &
1444 1445
        ~(sizeof(tcg_target_long) - 1);
1446
#endif
1445 1447
    if (s->current_frame_offset + (tcg_target_long)sizeof(tcg_target_long) >
1446 1448
        s->frame_end) {
1447 1449
        tcg_abort();

Also available in: Unified diff