diff options
author | Richard Henderson <rth@twiddle.net> | 2017-07-18 10:02:28 -1000 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2017-07-18 23:39:15 +0200 |
commit | e1933d1435d1d0ace7c93bdc429f7e4f0c499e92 (patch) | |
tree | 8bdbe20001a8c5fa389d8ad35f83642087b782e9 /target/sh4/cpu.h | |
parent | 4448a83606b5861cfa11528c0395868fc2b0e99e (diff) |
target/sh4: Introduce TB_FLAG_ENVFLAGS_MASK
We'll be putting more things into this bitmask soon.
Let's have a name that covers all possible uses.
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-4-rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target/sh4/cpu.h')
-rw-r--r-- | target/sh4/cpu.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index ffb91687b8..4aa92d5f30 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -96,6 +96,8 @@ #define DELAY_SLOT_CONDITIONAL (1 << 1) #define DELAY_SLOT_RTE (1 << 2) +#define TB_FLAG_ENVFLAGS_MASK DELAY_SLOT_MASK + typedef struct tlb_t { uint32_t vpn; /* virtual page number */ uint32_t ppn; /* physical page number */ @@ -388,7 +390,7 @@ static inline void cpu_get_tb_cpu_state(CPUSH4State *env, target_ulong *pc, { *pc = env->pc; *cs_base = 0; - *flags = (env->flags & DELAY_SLOT_MASK) /* Bits 0- 2 */ + *flags = (env->flags & TB_FLAG_ENVFLAGS_MASK) /* Bits 0-2 */ | (env->fpscr & (FPSCR_FR | FPSCR_SZ | FPSCR_PR)) /* Bits 19-21 */ | (env->sr & ((1u << SR_MD) | (1u << SR_RB))) /* Bits 29-30 */ | (env->sr & (1u << SR_FD)) /* Bit 15 */ |