diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2017-05-01 23:20:43 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2017-05-13 11:17:29 +0200 |
commit | 47b9f4d5a4013938134ca678c338906e798a61d7 (patch) | |
tree | eb14ff757bc9eb0bbd345ba21d29fa2d41a244e5 /target/sh4/cpu.h | |
parent | 24b09d9d8ba589402f9c8e0d8d36bcf5c4a933da (diff) | |
download | qemu-47b9f4d5a4013938134ca678c338906e798a61d7.zip qemu-47b9f4d5a4013938134ca678c338906e798a61d7.tar.gz qemu-47b9f4d5a4013938134ca678c338906e798a61d7.tar.bz2 |
target/sh4: move DELAY_SLOT_TRUE flag into a separate global
Instead of using one bit of the env flags to store the condition of the
next delay slot, use a separate global. It simplifies reading and
writing the flags variable and also removes some confusion between
ctx->envflags and env->flags.
Note that the global is first transfered to a temp in order to be
able to discard the global before the brcond.
Reviewed-by: Richard Henderson <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 | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index da8d15f..faab301 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -92,13 +92,6 @@ #define DELAY_SLOT (1 << 0) #define DELAY_SLOT_CONDITIONAL (1 << 1) -#define DELAY_SLOT_TRUE (1 << 2) -/* The dynamic value of the DELAY_SLOT_TRUE flag determines whether the jump - * after the delay slot should be taken or not. It is calculated from SR_T. - * - * It is unclear if it is permitted to modify the SR_T flag in a delay slot. - * The use of DELAY_SLOT_TRUE flag makes us accept such SR_T modification. - */ typedef struct tlb_t { uint32_t vpn; /* virtual page number */ @@ -148,7 +141,8 @@ typedef struct CPUSH4State { uint32_t sgr; /* saved global register 15 */ uint32_t dbr; /* debug base register */ uint32_t pc; /* program counter */ - uint32_t delayed_pc; /* target of delayed jump */ + uint32_t delayed_pc; /* target of delayed branch */ + uint32_t delayed_cond; /* condition of delayed branch */ uint32_t mach; /* multiply and accumulate high */ uint32_t macl; /* multiply and accumulate low */ uint32_t pr; /* procedure register */ |