mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
target-alpha: All ISA checks to use TB->FLAGS.
We had two different methods in use, both of which referenced ENV, and neither of which indicated to the generic code when different compilation modes are not compatible. Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
committed by
Richard Henderson
parent
21d2beaaef
commit
a18ad89351
+30
-2
@@ -418,12 +418,40 @@ uint64_t cpu_alpha_load_fpcr (CPUState *env);
|
||||
void cpu_alpha_store_fpcr (CPUState *env, uint64_t val);
|
||||
extern void swap_shadow_regs(CPUState *env);
|
||||
|
||||
/* Bits in TB->FLAGS that control how translation is processed. */
|
||||
enum {
|
||||
TB_FLAGS_PAL_MODE = 1,
|
||||
TB_FLAGS_FEN = 2,
|
||||
TB_FLAGS_USER_MODE = 8,
|
||||
|
||||
TB_FLAGS_AMASK_SHIFT = 4,
|
||||
TB_FLAGS_AMASK_BWX = AMASK_BWX << TB_FLAGS_AMASK_SHIFT,
|
||||
TB_FLAGS_AMASK_FIX = AMASK_FIX << TB_FLAGS_AMASK_SHIFT,
|
||||
TB_FLAGS_AMASK_CIX = AMASK_CIX << TB_FLAGS_AMASK_SHIFT,
|
||||
TB_FLAGS_AMASK_MVI = AMASK_MVI << TB_FLAGS_AMASK_SHIFT,
|
||||
TB_FLAGS_AMASK_TRAP = AMASK_TRAP << TB_FLAGS_AMASK_SHIFT,
|
||||
TB_FLAGS_AMASK_PREFETCH = AMASK_PREFETCH << TB_FLAGS_AMASK_SHIFT,
|
||||
};
|
||||
|
||||
static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,
|
||||
target_ulong *cs_base, int *flags)
|
||||
target_ulong *cs_base, int *pflags)
|
||||
{
|
||||
int flags = 0;
|
||||
|
||||
*pc = env->pc;
|
||||
*cs_base = 0;
|
||||
*flags = env->ps;
|
||||
|
||||
if (env->pal_mode) {
|
||||
flags = TB_FLAGS_PAL_MODE;
|
||||
} else {
|
||||
flags = env->ps & PS_USER_MODE;
|
||||
}
|
||||
if (env->fen) {
|
||||
flags |= TB_FLAGS_FEN;
|
||||
}
|
||||
flags |= env->amask << TB_FLAGS_AMASK_SHIFT;
|
||||
|
||||
*pflags = flags;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_USER_ONLY)
|
||||
|
||||
+199
-179
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user