linux-user/uname: Return correct uname string for x86_64

We were returning the incorrect uname string (with a hyphen, not
an underscore) for x86_64. Fix this by removing the x86_64 special
case, since the default "just use UNAME_MACHINE" behaviour suffices.
This leaves cpu_to_uname_machine() special cases for only those
architectures which need to vary the string based on runtime CPU
features.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
Peter Maydell 2014-05-10 12:25:53 +01:00 committed by Riku Voipio
parent a42267ef58
commit 4d13be8b8b

View File

@ -52,9 +52,7 @@ const char *cpu_to_uname_machine(void *cpu_env)
/* earliest emulated CPU is ARMv5TE; qemu can emulate the 1026, but not its /* earliest emulated CPU is ARMv5TE; qemu can emulate the 1026, but not its
* Jazelle support */ * Jazelle support */
return "armv5te" utsname_suffix; return "armv5te" utsname_suffix;
#elif defined(TARGET_X86_64) #elif defined(TARGET_I386) && !defined(TARGET_X86_64)
return "x86-64";
#elif defined(TARGET_I386)
/* see arch/x86/kernel/cpu/bugs.c: check_bugs(), 386, 486, 586, 686 */ /* see arch/x86/kernel/cpu/bugs.c: check_bugs(), 386, 486, 586, 686 */
CPUState *cpu = ENV_GET_CPU((CPUX86State *)cpu_env); CPUState *cpu = ENV_GET_CPU((CPUX86State *)cpu_env);
int family = object_property_get_int(OBJECT(cpu), "family", NULL); int family = object_property_get_int(OBJECT(cpu), "family", NULL);