diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2025-09-16 07:22:28 -0700 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2025-09-25 15:54:31 +0100 |
| commit | dde8637d283e71c6e9bef776e60df099013237e7 (patch) | |
| tree | 89cf195396fbbc19e8ff2833e87969b41dd3ff42 /target/arm/helper.c | |
| parent | 349127a9be7f19becd6b01b7d9ccc50624d48d01 (diff) | |
| download | focaccia-qemu-dde8637d283e71c6e9bef776e60df099013237e7.tar.gz focaccia-qemu-dde8637d283e71c6e9bef776e60df099013237e7.zip | |
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>
Diffstat (limited to 'target/arm/helper.c')
| -rw-r--r-- | target/arm/helper.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/target/arm/helper.c b/target/arm/helper.c index 88b5ec1a5a..a199320f14 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -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; |