qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/5] target/sparc/cpu: Rename the CPU models with a "+" in th


From: Thomas Huth
Subject: Re: [PATCH 1/5] target/sparc/cpu: Rename the CPU models with a "+" in their names
Date: Fri, 8 Mar 2024 06:12:50 +0100
User-agent: Mozilla Thunderbird

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]