From 9a562ae7ba0cadacd2fe2c8c895b0840556b978f Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Wed, 17 May 2017 00:48:18 +0200 Subject: target/sh4: introduce DELAY_SLOT_MASK MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will make easier the introduction of a new flag in the next patches. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- target/sh4/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'target/sh4/cpu.h') diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index 6c07c6b24b..7969c9af98 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -91,6 +91,7 @@ #define FPSCR_RM_NEAREST (0 << 0) #define FPSCR_RM_ZERO (1 << 0) +#define DELAY_SLOT_MASK 0x3 #define DELAY_SLOT (1 << 0) #define DELAY_SLOT_CONDITIONAL (1 << 1) @@ -380,7 +381,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 | DELAY_SLOT_CONDITIONAL)) /* Bits 0-1 */ + *flags = (env->flags & DELAY_SLOT_MASK) /* Bits 0- 1 */ | (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 */ -- cgit v1.2.3