On Tue, May 12, 2026 at 1:31 PM Daniel Henrique Barboza <[email protected]> wrote: > > We're using both isa_edata_arr[] and riscv_cpu_named_features[] to find > an extension name based on a cfg offset. This is reminiscent of a past > where isa_edata_arr[] didn't include entries for internal extensions. > > At this point we can use just isa_edata_arr[]. > > Signed-off-by: Daniel Henrique Barboza <[email protected]>
Acked-by: Alistair Francis <[email protected]> Alistair > --- > target/riscv/tcg/tcg-cpu.c | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c > index 92406bf41f..704105d3df 100644 > --- a/target/riscv/tcg/tcg-cpu.c > +++ b/target/riscv/tcg/tcg-cpu.c > @@ -311,7 +311,6 @@ static int cpu_cfg_ext_get_min_version(uint32_t > ext_offset) > > static const char *cpu_cfg_ext_get_name(uint32_t ext_offset) > { > - const RISCVCPUMultiExtConfig *feat; > const RISCVIsaExtData *edata; > > for (edata = isa_edata_arr; edata->name != NULL; edata++) { > @@ -320,12 +319,6 @@ static const char *cpu_cfg_ext_get_name(uint32_t > ext_offset) > } > } > > - for (feat = riscv_cpu_named_features; feat->name != NULL; feat++) { > - if (feat->offset == ext_offset) { > - return feat->name; > - } > - } > - > g_assert_not_reached(); > } > > -- > 2.43.0 > >
