mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-07-17 20:07:31 +00:00
target/arm: Move LOR regdefs to file scope
For static const regdefs, file scope is preferred. Backports commit d8564ee4e5bce87ec1fdf23656df9367eb1bc571 from qemu
This commit is contained in:
parent
5c8c2ca505
commit
e9850834d5
|
@ -6114,6 +6114,35 @@ static CPAccessResult access_lor_other(CPUARMState *env,
|
||||||
return access_lor_ns(env);
|
return access_lor_ns(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* A trivial implementation of ARMv8.1-LOR leaves all of these
|
||||||
|
* registers fixed at 0, which indicates that there are zero
|
||||||
|
* supported Limited Ordering regions.
|
||||||
|
*/
|
||||||
|
static const ARMCPRegInfo lor_reginfo[] = {
|
||||||
|
{ .name = "LORSA_EL1", .state = ARM_CP_STATE_AA64,
|
||||||
|
.opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 0,
|
||||||
|
.access = PL1_RW, .accessfn = access_lor_other,
|
||||||
|
.type = ARM_CP_CONST, .resetvalue = 0 },
|
||||||
|
{ .name = "LOREA_EL1", .state = ARM_CP_STATE_AA64,
|
||||||
|
.opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 1,
|
||||||
|
.access = PL1_RW, .accessfn = access_lor_other,
|
||||||
|
.type = ARM_CP_CONST, .resetvalue = 0 },
|
||||||
|
{ .name = "LORN_EL1", .state = ARM_CP_STATE_AA64,
|
||||||
|
.opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 2,
|
||||||
|
.access = PL1_RW, .accessfn = access_lor_other,
|
||||||
|
.type = ARM_CP_CONST, .resetvalue = 0 },
|
||||||
|
{ .name = "LORC_EL1", .state = ARM_CP_STATE_AA64,
|
||||||
|
.opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 3,
|
||||||
|
.access = PL1_RW, .accessfn = access_lor_other,
|
||||||
|
.type = ARM_CP_CONST, .resetvalue = 0 },
|
||||||
|
{ .name = "LORID_EL1", .state = ARM_CP_STATE_AA64,
|
||||||
|
.opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 7,
|
||||||
|
.access = PL1_R, .accessfn = access_lorid,
|
||||||
|
.type = ARM_CP_CONST, .resetvalue = 0 },
|
||||||
|
REGINFO_SENTINEL
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef TARGET_AARCH64
|
#ifdef TARGET_AARCH64
|
||||||
static CPAccessResult access_pauth(CPUARMState *env, const ARMCPRegInfo *ri,
|
static CPAccessResult access_pauth(CPUARMState *env, const ARMCPRegInfo *ri,
|
||||||
bool isread)
|
bool isread)
|
||||||
|
@ -7339,34 +7368,6 @@ void register_cp_regs_for_features(ARMCPU *cpu)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cpu_isar_feature(aa64_lor, cpu)) {
|
if (cpu_isar_feature(aa64_lor, cpu)) {
|
||||||
/*
|
|
||||||
* A trivial implementation of ARMv8.1-LOR leaves all of these
|
|
||||||
* registers fixed at 0, which indicates that there are zero
|
|
||||||
* supported Limited Ordering regions.
|
|
||||||
*/
|
|
||||||
static const ARMCPRegInfo lor_reginfo[] = {
|
|
||||||
{ .name = "LORSA_EL1", .state = ARM_CP_STATE_AA64,
|
|
||||||
.opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 0,
|
|
||||||
.access = PL1_RW, .accessfn = access_lor_other,
|
|
||||||
.type = ARM_CP_CONST, .resetvalue = 0 },
|
|
||||||
{ .name = "LOREA_EL1", .state = ARM_CP_STATE_AA64,
|
|
||||||
.opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 1,
|
|
||||||
.access = PL1_RW, .accessfn = access_lor_other,
|
|
||||||
.type = ARM_CP_CONST, .resetvalue = 0 },
|
|
||||||
{ .name = "LORN_EL1", .state = ARM_CP_STATE_AA64,
|
|
||||||
.opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 2,
|
|
||||||
.access = PL1_RW, .accessfn = access_lor_other,
|
|
||||||
.type = ARM_CP_CONST, .resetvalue = 0 },
|
|
||||||
{ .name = "LORC_EL1", .state = ARM_CP_STATE_AA64,
|
|
||||||
.opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 3,
|
|
||||||
.access = PL1_RW, .accessfn = access_lor_other,
|
|
||||||
.type = ARM_CP_CONST, .resetvalue = 0 },
|
|
||||||
{ .name = "LORID_EL1", .state = ARM_CP_STATE_AA64,
|
|
||||||
.opc0 = 3, .opc1 = 0, .crn = 10, .crm = 4, .opc2 = 7,
|
|
||||||
.access = PL1_R, .accessfn = access_lorid,
|
|
||||||
.type = ARM_CP_CONST, .resetvalue = 0 },
|
|
||||||
REGINFO_SENTINEL
|
|
||||||
};
|
|
||||||
define_arm_cp_regs(cpu, lor_reginfo);
|
define_arm_cp_regs(cpu, lor_reginfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue