On 07/03/2024 22.22, Richard Henderson wrote:
On 3/7/24 07:43, Thomas Huth wrote:+ /* Fix up legacy names with '+' in it */ + if (g_str_equal(typename, SPARC_CPU_TYPE_NAME("Sun-UltraSparc-IV+"))) { + g_free(typename); + typename = g_strdup(SPARC_CPU_TYPE_NAME("Sun-UltraSparc-IVp"));+ } else if (g_str_equal(typename, SPARC_CPU_TYPE_NAME("Sun-UltraSparc-IIIi+"))) {+ g_free(typename); + typename = g_strdup(SPARC_CPU_TYPE_NAME("Sun-UltraSparc-IIIip")); + } +Legacy names don't include dashes.
This check is done after sparc_cpu_type_name() has been called, which transforms the spaces into dashes, so we need the dashes here. (otherwise I'd need to check for all "valid" combinations, like "Sun-UltraSparc-IV+", "Sun UltraSparc-IV+", "Sun-UltraSparc IV+" and "Sun UltraSparc IV+").
Thomas
