Revision 4b31713d tcg/hppa/tcg-target.c

b/tcg/hppa/tcg-target.c
1629 1629
    }
1630 1630

  
1631 1631
#ifdef CONFIG_USE_GUEST_BASE
1632
    /* Note that GUEST_BASE can change after the prologue is generated.
1633
       To combat that, load the value from the variable instead of
1634
       embedding a constant here.  */
1635
    tcg_out_ld(s, TCG_TYPE_PTR, TCG_GUEST_BASE_REG,
1636
               TCG_REG_R0, (tcg_target_long)&guest_base);
1632
    if (GUEST_BASE != 0) {
1633
        tcg_out_movi(s, TCG_TYPE_PTR, TCG_GUEST_BASE_REG, GUEST_BASE);
1634
        tcg_regset_set_reg(s->reserved_regs, TCG_GUEST_BASE_REG);
1635
    }
1637 1636
#endif
1638 1637

  
1639 1638
    /* Jump to TB, and adjust R18 to be the return address.  */
......
1679 1678
    tcg_regset_set_reg(s->reserved_regs, TCG_REG_DP);  /* data pointer */
1680 1679
    tcg_regset_set_reg(s->reserved_regs, TCG_REG_SP);  /* stack pointer */
1681 1680
    tcg_regset_set_reg(s->reserved_regs, TCG_REG_R31); /* ble link reg */
1682
#ifdef CONFIG_USE_GUEST_BASE
1683
    tcg_regset_set_reg(s->reserved_regs, TCG_GUEST_BASE_REG);
1684
#endif
1685 1681

  
1686 1682
    tcg_add_target_add_op_defs(hppa_op_defs);
1687 1683
}

Also available in: Unified diff