diff options
author | Leon Alrae <leon.alrae@imgtec.com> | 2015-06-04 17:00:31 +0100 |
---|---|---|
committer | Leon Alrae <leon.alrae@imgtec.com> | 2015-06-11 10:13:29 +0100 |
commit | ce9782f40ac16660ea9437bfaa2c9c34d5ed8110 (patch) | |
tree | 359405ef71ce11ab76a77c82450f9af82f0c687e /target-mips/op_helper.c | |
parent | adc370a48fd26b92188fa4848dfb088578b1936c (diff) | |
download | qemu-ce9782f40ac16660ea9437bfaa2c9c34d5ed8110.zip qemu-ce9782f40ac16660ea9437bfaa2c9c34d5ed8110.tar.gz qemu-ce9782f40ac16660ea9437bfaa2c9c34d5ed8110.tar.bz2 |
target-mips: add ERETNC instruction and Config5.LLB bit
ERETNC is identical to ERET except that an ERETNC will not clear the LLbit
that is set by execution of an LL instruction, and thus when placed between
an LL and SC sequence, will never cause the SC to fail.
Presence of ERETNC is denoted by the Config5.LLB.
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-mips/op_helper.c')
-rw-r--r-- | target-mips/op_helper.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 2fe862a..b412f94 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -2099,7 +2099,7 @@ static void set_pc(CPUMIPSState *env, target_ulong error_pc) } } -void helper_eret(CPUMIPSState *env) +static inline void exception_return(CPUMIPSState *env) { debug_pre_eret(env); if (env->CP0_Status & (1 << CP0St_ERL)) { @@ -2111,9 +2111,19 @@ void helper_eret(CPUMIPSState *env) } compute_hflags(env); debug_post_eret(env); +} + +void helper_eret(CPUMIPSState *env) +{ + exception_return(env); env->lladdr = 1; } +void helper_eretnc(CPUMIPSState *env) +{ + exception_return(env); +} + void helper_deret(CPUMIPSState *env) { debug_pre_eret(env); |