diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-04-18 23:59:48 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-05-02 16:49:34 +0200 |
commit | 533fc64feb96b6aafdb0d604cd1cd97877451878 (patch) | |
tree | 29719b38dc37c4e64a60f3ad01b72bf54b4b01a1 /target/mips/op_helper.c | |
parent | 4d169b9cce25bcef691d0c50a6c7d0d6350003ae (diff) |
target/mips: Declare mips_env_set_pc() inlined in "internal.h"
Rename set_pc() as mips_env_set_pc(), declare it inlined
and use it in cpu.c and op_helper.c.
Reported-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210428170410.479308-9-f4bug@amsat.org>
Diffstat (limited to 'target/mips/op_helper.c')
-rw-r--r-- | target/mips/op_helper.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c index b80e8f7540..222a0d7c7b 100644 --- a/target/mips/op_helper.c +++ b/target/mips/op_helper.c @@ -993,24 +993,14 @@ static void debug_post_eret(CPUMIPSState *env) } } -static void set_pc(CPUMIPSState *env, target_ulong error_pc) -{ - env->active_tc.PC = error_pc & ~(target_ulong)1; - if (error_pc & 1) { - env->hflags |= MIPS_HFLAG_M16; - } else { - env->hflags &= ~(MIPS_HFLAG_M16); - } -} - static inline void exception_return(CPUMIPSState *env) { debug_pre_eret(env); if (env->CP0_Status & (1 << CP0St_ERL)) { - set_pc(env, env->CP0_ErrorEPC); + mips_env_set_pc(env, env->CP0_ErrorEPC); env->CP0_Status &= ~(1 << CP0St_ERL); } else { - set_pc(env, env->CP0_EPC); + mips_env_set_pc(env, env->CP0_EPC); env->CP0_Status &= ~(1 << CP0St_EXL); } compute_hflags(env); @@ -1036,7 +1026,7 @@ void helper_deret(CPUMIPSState *env) env->hflags &= ~MIPS_HFLAG_DM; compute_hflags(env); - set_pc(env, env->CP0_DEPC); + mips_env_set_pc(env, env->CP0_DEPC); debug_post_eret(env); } |