diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-04-28 11:48:12 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-04-28 11:48:12 +0100 |
commit | 8c4bf97580a7556e3e61b7bc41dedb5958f0b2f9 (patch) | |
tree | 79b625fde3fa4dbc3c7dada0d8a370ef72278144 | |
parent | 736f85d5db701cc9d464a03b583d4a04606a0dd5 (diff) | |
parent | d96391c1ffeb30a0afa695c86579517c69d9a889 (diff) |
Merge remote-tracking branch 'remotes/lalrae/tags/mips-20160428' into staging
MIPS patches 2016-04-28
Changes:
* fixed RDHWR exception host PC
# gpg: Signature made Thu 28 Apr 2016 10:11:18 BST using RSA key ID 0B29DA6B
# gpg: Good signature from "Leon Alrae <leon.alrae@imgtec.com>"
* remotes/lalrae/tags/mips-20160428:
target-mips: Fix RDHWR exception host PC
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | target-mips/op_helper.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 8ec1bef7d0..4417e6ba22 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -2294,29 +2294,29 @@ void helper_deret(CPUMIPSState *env) } #endif /* !CONFIG_USER_ONLY */ -static inline void check_hwrena(CPUMIPSState *env, int reg) +static inline void check_hwrena(CPUMIPSState *env, int reg, uintptr_t pc) { if ((env->hflags & MIPS_HFLAG_CP0) || (env->CP0_HWREna & (1 << reg))) { return; } - do_raise_exception(env, EXCP_RI, GETPC()); + do_raise_exception(env, EXCP_RI, pc); } target_ulong helper_rdhwr_cpunum(CPUMIPSState *env) { - check_hwrena(env, 0); + check_hwrena(env, 0, GETPC()); return env->CP0_EBase & 0x3ff; } target_ulong helper_rdhwr_synci_step(CPUMIPSState *env) { - check_hwrena(env, 1); + check_hwrena(env, 1, GETPC()); return env->SYNCI_Step; } target_ulong helper_rdhwr_cc(CPUMIPSState *env) { - check_hwrena(env, 2); + check_hwrena(env, 2, GETPC()); #ifdef CONFIG_USER_ONLY return env->CP0_Count; #else @@ -2326,19 +2326,19 @@ target_ulong helper_rdhwr_cc(CPUMIPSState *env) target_ulong helper_rdhwr_ccres(CPUMIPSState *env) { - check_hwrena(env, 3); + check_hwrena(env, 3, GETPC()); return env->CCRes; } target_ulong helper_rdhwr_performance(CPUMIPSState *env) { - check_hwrena(env, 4); + check_hwrena(env, 4, GETPC()); return env->CP0_Performance0; } target_ulong helper_rdhwr_xnp(CPUMIPSState *env) { - check_hwrena(env, 5); + check_hwrena(env, 5, GETPC()); return (env->CP0_Config5 >> CP0C5_XNP) & 1; } |