mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
target-arm: Remove ARMCPU/CPUARMState from cpregs APIs used by decoder
The cpregs APIs used by the decoder (get_arm_cp_reginfo() and cp_access_ok()) currently take either a CPUARMState* or an ARMCPU*. This is problematic for the A64 decoder, which doesn't pass the environment pointer around everywhere the way the 32 bit decoder does. Adjust the parameters these functions take so that we can copy only the relevant info from the CPUARMState into the DisasContext and then use that. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
f5a0a5a5ab
commit
60322b399d
5 changed files with 17 additions and 12 deletions
|
@ -6498,7 +6498,6 @@ static int disas_coproc_insn(CPUARMState * env, DisasContext *s, uint32_t insn)
|
|||
{
|
||||
int cpnum, is64, crn, crm, opc1, opc2, isread, rt, rt2;
|
||||
const ARMCPRegInfo *ri;
|
||||
ARMCPU *cpu = arm_env_get_cpu(env);
|
||||
|
||||
cpnum = (insn >> 8) & 0xf;
|
||||
if (arm_feature(env, ARM_FEATURE_XSCALE)
|
||||
|
@ -6541,11 +6540,11 @@ static int disas_coproc_insn(CPUARMState * env, DisasContext *s, uint32_t insn)
|
|||
isread = (insn >> 20) & 1;
|
||||
rt = (insn >> 12) & 0xf;
|
||||
|
||||
ri = get_arm_cp_reginfo(cpu,
|
||||
ri = get_arm_cp_reginfo(s->cp_regs,
|
||||
ENCODE_CP_REG(cpnum, is64, crn, crm, opc1, opc2));
|
||||
if (ri) {
|
||||
/* Check access permissions */
|
||||
if (!cp_access_ok(env, ri, isread)) {
|
||||
if (!cp_access_ok(s->current_pl, ri, isread)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -10269,6 +10268,8 @@ static inline void gen_intermediate_code_internal(ARMCPU *cpu,
|
|||
dc->vfp_enabled = ARM_TBFLAG_VFPEN(tb->flags);
|
||||
dc->vec_len = ARM_TBFLAG_VECLEN(tb->flags);
|
||||
dc->vec_stride = ARM_TBFLAG_VECSTRIDE(tb->flags);
|
||||
dc->cp_regs = cpu->cp_regs;
|
||||
dc->current_pl = arm_current_pl(env);
|
||||
|
||||
cpu_F0s = tcg_temp_new_i32();
|
||||
cpu_F1s = tcg_temp_new_i32();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue