diff options
author | Richard Henderson <rth@twiddle.net> | 2017-07-18 10:02:29 -1000 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2017-07-18 23:39:16 +0200 |
commit | ca69176d52ca1b9c9c7a4229ca46cf858167c5e8 (patch) | |
tree | b580557a997a82118fb4523c99afb6a68aa1cc45 /target/sh4/cpu.c | |
parent | e1933d1435d1d0ace7c93bdc429f7e4f0c499e92 (diff) |
target/sh4: Keep env->flags clean
If we mask off any out-of-band bits before we assign to the
variable, then we don't need to clean it up when reading.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Message-Id: <20170718200255.31647-5-rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target/sh4/cpu.c')
-rw-r--r-- | target/sh4/cpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index 9da7e1ed38..8536f6d002 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -39,7 +39,7 @@ static void superh_cpu_synchronize_from_tb(CPUState *cs, TranslationBlock *tb) SuperHCPU *cpu = SUPERH_CPU(cs); cpu->env.pc = tb->pc; - cpu->env.flags = tb->flags; + cpu->env.flags = tb->flags & TB_FLAG_ENVFLAGS_MASK; } static bool superh_cpu_has_work(CPUState *cs) |