tcg: Move helper registration into tcg_context_init

No longer needs to be done on a per-target basis.

Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
Richard Henderson 2013-09-14 15:09:39 -07:00
parent e5e84d22a3
commit 5cd8f6210f
15 changed files with 7 additions and 48 deletions

View file

@ -140,10 +140,6 @@ void alpha_translate_init(void)
offsetof(CPUAlphaState, usp), "usp");
#endif
/* register helpers */
#define GEN_HELPER 2
#include "helper.h"
done_init = 1;
}

View file

@ -115,9 +115,6 @@ void arm_translate_init(void)
#endif
a64_translate_init();
#define GEN_HELPER 2
#include "helper.h"
}
static inline TCGv_i32 load_cpu_offset(int offset)

View file

@ -3480,9 +3480,6 @@ void cris_initialize_tcg(void)
{
int i;
#define GEN_HELPER 2
#include "helper.h"
cpu_env = tcg_global_reg_new_ptr(TCG_AREG0, "env");
cc_x = tcg_global_mem_new(TCG_AREG0,
offsetof(CPUCRISState, cc_x), "cc_x");

View file

@ -8261,10 +8261,6 @@ void optimize_flags_init(void)
cpu_regs[R_EDI] = tcg_global_mem_new_i32(TCG_AREG0,
offsetof(CPUX86State, regs[R_EDI]), "edi");
#endif
/* register helpers */
#define GEN_HELPER 2
#include "helper.h"
}
/* generate intermediate code in gen_opc_buf and gen_opparam_buf for

View file

@ -108,9 +108,6 @@ void m68k_tcg_init(void)
NULL_QREG = tcg_global_mem_new(TCG_AREG0, -4, "NULL");
store_dummy = tcg_global_mem_new(TCG_AREG0, -8, "NULL");
#define GEN_HELPER 2
#include "helper.h"
}
static inline void qemu_assert(int cond, const char *msg)

View file

@ -2024,8 +2024,6 @@ void mb_tcg_init(void)
offsetof(CPUMBState, sregs[i]),
special_regnames[i]);
}
#define GEN_HELPER 2
#include "helper.h"
}
void restore_state_to_opc(CPUMBState *env, TranslationBlock *tb, int pc_pos)

View file

@ -15886,10 +15886,6 @@ void mips_tcg_init(void)
offsetof(CPUMIPSState, active_fpu.fcr31),
"fcr31");
/* register helpers */
#define GEN_HELPER 2
#include "helper.h"
inited = 1;
}

View file

@ -110,8 +110,6 @@ void openrisc_translate_init(void)
offsetof(CPUOpenRISCState, gpr[i]),
regnames[i]);
}
#define GEN_HELPER 2
#include "helper.h"
}
/* Writeback SR_F transaltion-space to execution-space. */

View file

@ -175,10 +175,6 @@ void ppc_translate_init(void)
cpu_access_type = tcg_global_mem_new_i32(TCG_AREG0,
offsetof(CPUPPCState, access_type), "access_type");
/* register helpers */
#define GEN_HELPER 2
#include "helper.h"
done_init = 1;
}

View file

@ -188,10 +188,6 @@ void s390x_translate_init(void)
offsetof(CPUS390XState, fregs[i].d),
cpu_reg_names[i + 16]);
}
/* register helpers */
#define GEN_HELPER 2
#include "helper.h"
}
static TCGv_i64 load_reg(int reg)

View file

@ -143,10 +143,6 @@ void sh4_translate_init(void)
offsetof(CPUSH4State, fregs[i]),
fregnames[i]);
/* register helpers */
#define GEN_HELPER 2
#include "helper.h"
done_init = 1;
}

View file

@ -5456,11 +5456,6 @@ void gen_intermediate_code_init(CPUSPARCState *env)
offsetof(CPUSPARCState, fpr[i]),
fregnames[i]);
}
/* register helpers */
#define GEN_HELPER 2
#include "helper.h"
}
}

View file

@ -74,9 +74,6 @@ void uc32_translate_init(void)
cpu_R[i] = tcg_global_mem_new_i32(TCG_AREG0,
offsetof(CPUUniCore32State, regs[i]), regnames[i]);
}
#define GEN_HELPER 2
#include "helper.h"
}
static int num_temps;

View file

@ -238,8 +238,6 @@ void xtensa_translate_init(void)
uregnames[i].name);
}
}
#define GEN_HELPER 2
#include "helper.h"
}
static inline bool option_bits_enabled(DisasContext *dc, uint64_t opt)

View file

@ -254,6 +254,8 @@ void tcg_pool_reset(TCGContext *s)
s->pool_current = NULL;
}
#include "helper.h"
void tcg_context_init(TCGContext *s)
{
int op, total_args, n;
@ -284,7 +286,11 @@ void tcg_context_init(TCGContext *s)
sorted_args += n;
args_ct += n;
}
/* Register helpers. */
#define GEN_HELPER 2
#include "helper.h"
tcg_target_init(s);
}