Revision 884d348b
b/tcg/hppa/tcg-target.c | ||
---|---|---|
34 | 34 |
/* This is an 8 byte temp slot in the stack frame. */ |
35 | 35 |
#define STACK_TEMP_OFS -16 |
36 | 36 |
|
37 |
#ifndef GUEST_BASE |
|
38 |
#define GUEST_BASE 0 |
|
39 |
#endif |
|
40 |
|
|
41 | 37 |
#ifdef CONFIG_USE_GUEST_BASE |
42 | 38 |
#define TCG_GUEST_BASE_REG TCG_REG_R16 |
43 | 39 |
#else |
... | ... | |
1649 | 1645 |
TCG_REG_SP, -frame_size + i * 4); |
1650 | 1646 |
} |
1651 | 1647 |
|
1652 |
if (GUEST_BASE != 0) { |
|
1653 |
tcg_out_movi(s, TCG_TYPE_PTR, TCG_GUEST_BASE_REG, GUEST_BASE); |
|
1654 |
} |
|
1648 |
#ifdef CONFIG_USE_GUEST_BASE |
|
1649 |
/* Note that GUEST_BASE can change after the prologue is generated. |
|
1650 |
To combat that, load the value from the variable instead of |
|
1651 |
embedding a constant here. */ |
|
1652 |
tcg_out_ld(s, TCG_TYPE_PTR, TCG_GUEST_BASE_REG, |
|
1653 |
TCG_REG_R0, (tcg_target_long)&guest_base); |
|
1654 |
#endif |
|
1655 | 1655 |
|
1656 | 1656 |
/* Jump to TB, and adjust R18 to be the return address. */ |
1657 | 1657 |
tcg_out32(s, INSN_BLE_SR4 | INSN_R2(TCG_REG_R26)); |
... | ... | |
1696 | 1696 |
tcg_regset_set_reg(s->reserved_regs, TCG_REG_DP); /* data pointer */ |
1697 | 1697 |
tcg_regset_set_reg(s->reserved_regs, TCG_REG_SP); /* stack pointer */ |
1698 | 1698 |
tcg_regset_set_reg(s->reserved_regs, TCG_REG_R31); /* ble link reg */ |
1699 |
if (GUEST_BASE != 0) {
|
|
1700 |
tcg_regset_set_reg(s->reserved_regs, TCG_GUEST_BASE_REG);
|
|
1701 |
}
|
|
1699 |
#ifdef CONFIG_USE_GUEST_BASE
|
|
1700 |
tcg_regset_set_reg(s->reserved_regs, TCG_GUEST_BASE_REG); |
|
1701 |
#endif
|
|
1702 | 1702 |
|
1703 | 1703 |
tcg_add_target_add_op_defs(hppa_op_defs); |
1704 | 1704 |
} |
Also available in: Unified diff