mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
linux-user: remove useless macros GUEST_BASE and RESERVED_VA
As we have removed CONFIG_USE_GUEST_BASE, we always use a guest base and the macros GUEST_BASE and RESERVED_VA become useless: replace them by their values. Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <1440420834-8388-1-git-send-email-laurent@vivier.eu> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
4cbea59869
commit
b76f21a707
11 changed files with 64 additions and 78 deletions
|
@ -43,9 +43,6 @@ static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = {
|
|||
#ifndef CONFIG_SOFTMMU
|
||||
#define TCG_GUEST_BASE_REG TCG_REG_R55
|
||||
#endif
|
||||
#ifndef GUEST_BASE
|
||||
#define GUEST_BASE 0
|
||||
#endif
|
||||
|
||||
/* Branch registers */
|
||||
enum {
|
||||
|
@ -1763,7 +1760,7 @@ static inline void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args)
|
|||
bswap = opc & MO_BSWAP;
|
||||
|
||||
#if TARGET_LONG_BITS == 32
|
||||
if (GUEST_BASE != 0) {
|
||||
if (guest_base != 0) {
|
||||
tcg_out_bundle(s, mII,
|
||||
INSN_NOP_M,
|
||||
tcg_opc_i29(TCG_REG_P0, OPC_ZXT4_I29,
|
||||
|
@ -1827,7 +1824,7 @@ static inline void tcg_out_qemu_ld(TCGContext *s, const TCGArg *args)
|
|||
}
|
||||
}
|
||||
#else
|
||||
if (GUEST_BASE != 0) {
|
||||
if (guest_base != 0) {
|
||||
tcg_out_bundle(s, MmI,
|
||||
tcg_opc_a1 (TCG_REG_P0, OPC_ADD_A1, TCG_REG_R2,
|
||||
TCG_GUEST_BASE_REG, addr_reg),
|
||||
|
@ -1887,7 +1884,7 @@ static inline void tcg_out_qemu_st(TCGContext *s, const TCGArg *args)
|
|||
bswap = opc & MO_BSWAP;
|
||||
|
||||
#if TARGET_LONG_BITS == 32
|
||||
if (GUEST_BASE != 0) {
|
||||
if (guest_base != 0) {
|
||||
tcg_out_bundle(s, mII,
|
||||
INSN_NOP_M,
|
||||
tcg_opc_i29(TCG_REG_P0, OPC_ZXT4_I29,
|
||||
|
@ -1933,7 +1930,7 @@ static inline void tcg_out_qemu_st(TCGContext *s, const TCGArg *args)
|
|||
INSN_NOP_M,
|
||||
INSN_NOP_I);
|
||||
#else
|
||||
if (GUEST_BASE != 0) {
|
||||
if (guest_base != 0) {
|
||||
add_guest_base = tcg_opc_a1 (TCG_REG_P0, OPC_ADD_A1, TCG_REG_R2,
|
||||
TCG_GUEST_BASE_REG, addr_reg);
|
||||
addr_reg = TCG_REG_R2;
|
||||
|
@ -1942,7 +1939,7 @@ static inline void tcg_out_qemu_st(TCGContext *s, const TCGArg *args)
|
|||
}
|
||||
|
||||
if (!bswap) {
|
||||
tcg_out_bundle(s, (GUEST_BASE ? MmI : mmI),
|
||||
tcg_out_bundle(s, (guest_base ? MmI : mmI),
|
||||
add_guest_base,
|
||||
tcg_opc_m4 (TCG_REG_P0, opc_st_m4[s_bits],
|
||||
data_reg, addr_reg),
|
||||
|
@ -2351,14 +2348,14 @@ static void tcg_target_qemu_prologue(TCGContext *s)
|
|||
tcg_opc_i21(TCG_REG_P0, OPC_MOV_I21,
|
||||
TCG_REG_B6, TCG_REG_R33, 0));
|
||||
|
||||
/* ??? If GUEST_BASE < 0x200000, we could load the register via
|
||||
/* ??? If guest_base < 0x200000, we could load the register via
|
||||
an ADDL in the M slot of the next bundle. */
|
||||
if (GUEST_BASE != 0) {
|
||||
if (guest_base != 0) {
|
||||
tcg_out_bundle(s, mlx,
|
||||
INSN_NOP_M,
|
||||
tcg_opc_l2 (GUEST_BASE),
|
||||
tcg_opc_l2(guest_base),
|
||||
tcg_opc_x2 (TCG_REG_P0, OPC_MOVL_X2,
|
||||
TCG_GUEST_BASE_REG, GUEST_BASE));
|
||||
TCG_GUEST_BASE_REG, guest_base));
|
||||
tcg_regset_set_reg(s->reserved_regs, TCG_GUEST_BASE_REG);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue