target/arm: Remove name argument to alloc_cpreg
All callers now pass in->name, so take the value from there. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
349127a9be
commit
dde8637d28
1 changed files with 6 additions and 6 deletions
|
|
@ -7366,9 +7366,9 @@ void register_cp_regs_for_features(ARMCPU *cpu)
|
|||
* Copy a ARMCPRegInfo structure, allocating it along with the name
|
||||
* and an optional suffix to the name.
|
||||
*/
|
||||
static ARMCPRegInfo *alloc_cpreg(const ARMCPRegInfo *in,
|
||||
const char *name, const char *suffix)
|
||||
static ARMCPRegInfo *alloc_cpreg(const ARMCPRegInfo *in, const char *suffix)
|
||||
{
|
||||
const char *name = in->name;
|
||||
size_t name_len = strlen(name);
|
||||
size_t suff_len = suffix ? strlen(suffix) : 0;
|
||||
ARMCPRegInfo *out = g_malloc(sizeof(*in) + name_len + suff_len + 1);
|
||||
|
|
@ -7508,7 +7508,7 @@ static void add_cpreg_to_hashtable_aa32(ARMCPU *cpu, ARMCPRegInfo *r,
|
|||
cp, crm, opc1, opc2, key);
|
||||
break;
|
||||
case ARM_CP_SECSTATE_BOTH:
|
||||
r_s = alloc_cpreg(r, r->name, "_S");
|
||||
r_s = alloc_cpreg(r, "_S");
|
||||
add_cpreg_to_hashtable(cpu, r_s, ARM_CP_STATE_AA32, ARM_CP_SECSTATE_S,
|
||||
cp, crm, opc1, opc2, key);
|
||||
|
||||
|
|
@ -7538,7 +7538,7 @@ static void add_cpreg_to_hashtable_aa64(ARMCPU *cpu, ARMCPRegInfo *r,
|
|||
* and name that it is passed, so it's OK to use
|
||||
* a local struct here.
|
||||
*/
|
||||
ARMCPRegInfo *nxs_ri = alloc_cpreg(r, r->name, "NXS");
|
||||
ARMCPRegInfo *nxs_ri = alloc_cpreg(r, "NXS");
|
||||
uint32_t nxs_key;
|
||||
|
||||
assert(nxs_ri->crn < 0xf);
|
||||
|
|
@ -7762,7 +7762,7 @@ void define_one_arm_cp_reg(ARMCPU *cpu, const ARMCPRegInfo *r)
|
|||
for (int crm = crmmin; crm <= crmmax; crm++) {
|
||||
for (int opc1 = opc1min; opc1 <= opc1max; opc1++) {
|
||||
for (int opc2 = opc2min; opc2 <= opc2max; opc2++) {
|
||||
ARMCPRegInfo *r2 = alloc_cpreg(r, r->name, NULL);
|
||||
ARMCPRegInfo *r2 = alloc_cpreg(r, NULL);
|
||||
ARMCPRegInfo *r3;
|
||||
|
||||
switch (r->state) {
|
||||
|
|
@ -7773,7 +7773,7 @@ void define_one_arm_cp_reg(ARMCPU *cpu, const ARMCPRegInfo *r)
|
|||
add_cpreg_to_hashtable_aa64(cpu, r2, crm, opc1, opc2);
|
||||
break;
|
||||
case ARM_CP_STATE_BOTH:
|
||||
r3 = alloc_cpreg(r2, r2->name, NULL);
|
||||
r3 = alloc_cpreg(r2, NULL);
|
||||
add_cpreg_to_hashtable_aa32(cpu, r2, cp, crm, opc1, opc2);
|
||||
add_cpreg_to_hashtable_aa64(cpu, r3, crm, opc1, opc2);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue