aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/cpu.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2015-09-03 14:14:33 -0700
committerRichard Henderson <rth@twiddle.net>2016-07-12 11:02:06 -0700
commita6d567e523ed7e928861f3caa5d49368af3f330d (patch)
tree3098b9412187f82e6abe69313ee1695579e183ba /target-sparc/cpu.h
parent22e700607aeaff5f5e139d0fdc3d861e5502040c (diff)
target-sparc: Store %asi in TB flags
Knowing the value of %asi at translation time means that we can handle the common settings without a function call. The steady state appears to be %asi == ASI_P, so that sparcv9 code can use offset forms of lda/sta. The %asi register gets pushed and popped on entry to certain functions, but it rarely takes on values other than ASI_P or ASI_AIUP. Therefore we're unlikely to be expanding the set of TBs created. Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-sparc/cpu.h')
-rw-r--r--target-sparc/cpu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index a7e4723190..a3d64a4e52 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -722,6 +722,7 @@ trap_state* cpu_tsptr(CPUSPARCState* env);
#define TB_FLAG_MMU_MASK 7
#define TB_FLAG_FPU_ENABLED (1 << 4)
#define TB_FLAG_AM_ENABLED (1 << 5)
+#define TB_FLAG_ASI_SHIFT 24
static inline void cpu_get_tb_cpu_state(CPUSPARCState *env, target_ulong *pc,
target_ulong *cs_base, uint32_t *pflags)
@@ -739,6 +740,7 @@ static inline void cpu_get_tb_cpu_state(CPUSPARCState *env, target_ulong *pc,
&& (env->fprs & FPRS_FEF)) {
flags |= TB_FLAG_FPU_ENABLED;
}
+ flags |= env->asi << TB_FLAG_ASI_SHIFT;
#else
if ((env->def->features & CPU_FEATURE_FLOAT) && env->psref) {
flags |= TB_FLAG_FPU_ENABLED;