summaryrefslogtreecommitdiff
path: root/target/alpha/cpu.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2017-07-06 09:45:07 -1000
committerRichard Henderson <rth@twiddle.net>2017-07-18 18:41:52 -1000
commitbcd2625da578d281c710033995d0fb6ea3dff1d4 (patch)
tree5d26be91643b98fba5e25ca213449631d689cb0d /target/alpha/cpu.c
parent489a0e6410899090507d9b3ee7e438511998a692 (diff)
downloadqemu-bcd2625da578d281c710033995d0fb6ea3dff1d4.tar.gz
target/alpha: Merge several flag bytes into ENV->FLAGS
The flags are arranged such that we can manipulate them either a whole, or as individual bytes. The computation within cpu_get_tb_cpu_state is now reduced to a single load and mask. Tested-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target/alpha/cpu.c')
-rw-r--r--target/alpha/cpu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c
index 8186c9d379..76150f48d3 100644
--- a/target/alpha/cpu.c
+++ b/target/alpha/cpu.c
@@ -276,14 +276,15 @@ static void alpha_cpu_initfn(Object *obj)
alpha_translate_init();
+ env->lock_addr = -1;
#if defined(CONFIG_USER_ONLY)
- env->ps = PS_USER_MODE;
+ env->flags = ENV_FLAG_PS_USER | ENV_FLAG_FEN;
cpu_alpha_store_fpcr(env, (FPCR_INVD | FPCR_DZED | FPCR_OVFD
| FPCR_UNFD | FPCR_INED | FPCR_DNOD
| FPCR_DYN_NORMAL));
+#else
+ env->flags = ENV_FLAG_PAL_MODE | ENV_FLAG_FEN;
#endif
- env->lock_addr = -1;
- env->fen = 1;
}
static void alpha_cpu_class_init(ObjectClass *oc, void *data)