diff options
author | Leon Alrae <leon.alrae@imgtec.com> | 2014-06-27 08:49:04 +0100 |
---|---|---|
committer | Leon Alrae <leon.alrae@imgtec.com> | 2014-10-13 12:38:25 +0100 |
commit | 01f72885794124f94b24d97daf3c8630424cfd79 (patch) | |
tree | 7d1800dfc5781e2912815e809aa1a24c9f0bdd61 /target-mips/translate.c | |
parent | 4267d3e6e0d7be184ef343919640e7be6ae34e71 (diff) |
target-mips: Status.UX/SX/KX enable 32-bit address wrapping
In R6 the special behaviour for data references is also specified for Kernel
and Supervisor mode. Therefore MIPS_HFLAG_UX is replaced by generic
MIPS_HFLAG_AWRAP indicating enabled 32-bit address wrapping.
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-mips/translate.c')
-rw-r--r-- | target-mips/translate.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/target-mips/translate.c b/target-mips/translate.c index 34d63ea215..74204850a4 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -1383,11 +1383,7 @@ static inline void gen_op_addr_add (DisasContext *ctx, TCGv ret, TCGv arg0, TCGv tcg_gen_add_tl(ret, arg0, arg1); #if defined(TARGET_MIPS64) - /* For compatibility with 32-bit code, data reference in user mode - with Status_UX = 0 should be casted to 32-bit and sign extended. - See the MIPS64 PRA manual, section 4.10. */ - if (((ctx->hflags & MIPS_HFLAG_KSU) == MIPS_HFLAG_UM) && - !(ctx->hflags & MIPS_HFLAG_UX)) { + if (ctx->hflags & MIPS_HFLAG_AWRAP) { tcg_gen_ext32s_i64(ret, ret); } #endif |