From 2623c1ecfc87a0a86188c75598410e6b3d0f18a3 Mon Sep 17 00:00:00 2001 From: aurel32 Date: Tue, 11 Nov 2008 11:39:33 +0000 Subject: target-mips: optimize gen_op_addr_add() (2/2) Instead of dynamically generating different code depending on the UX flag, add a new flag in ctx->flags to generate different code. Signed-off-by: Aurelien Jarno git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5677 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-mips/exec.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'target-mips/exec.h') diff --git a/target-mips/exec.h b/target-mips/exec.h index 28bf466..5d3e356 100644 --- a/target-mips/exec.h +++ b/target-mips/exec.h @@ -66,7 +66,8 @@ static inline int cpu_halted(CPUState *env) static inline void compute_hflags(CPUState *env) { env->hflags &= ~(MIPS_HFLAG_COP1X | MIPS_HFLAG_64 | MIPS_HFLAG_CP0 | - MIPS_HFLAG_F64 | MIPS_HFLAG_FPU | MIPS_HFLAG_KSU); + MIPS_HFLAG_F64 | MIPS_HFLAG_FPU | MIPS_HFLAG_KSU | + MIPS_HFLAG_UX); if (!(env->CP0_Status & (1 << CP0St_EXL)) && !(env->CP0_Status & (1 << CP0St_ERL)) && !(env->hflags & MIPS_HFLAG_DM)) { @@ -77,6 +78,8 @@ static inline void compute_hflags(CPUState *env) (env->CP0_Status & (1 << CP0St_PX)) || (env->CP0_Status & (1 << CP0St_UX))) env->hflags |= MIPS_HFLAG_64; + if (env->CP0_Status & (1 << CP0St_UX)) + env->hflags |= MIPS_HFLAG_UX; #endif if ((env->CP0_Status & (1 << CP0St_CU0)) || !(env->hflags & MIPS_HFLAG_KSU)) -- cgit v1.1