qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 1/3] linux-user: Support little-endian PPC64


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 1/3] linux-user: Support little-endian PPC64 in user mode.
Date: Sat, 10 May 2014 10:55:20 +0100

On 10 May 2014 10:16, Doug Kwan <address@hidden> wrote:
> diff --git a/linux-user/uname.c b/linux-user/uname.c
> index f5d4c66..cb1f9a3 100644
> --- a/linux-user/uname.c
> +++ b/linux-user/uname.c
> @@ -65,6 +65,12 @@ const char *cpu_to_uname_machine(void *cpu_env)
>          return "i586";
>      }
>      return "i686";
> +#elif defined(TARGET_PPC64)
> +#ifdef TARGET_WORDS_BIGENDIAN
> +    return UNAME_MACHINE;
> +#else
> +    return UNAME_MACHINE "le";
> +#endif
>  #else
>      /* default is #define-d in each arch/ subdir */
>      return UNAME_MACHINE;

I think it would be nicer just to define UNAME_MACHINE correctly
in linux-user/ppc/syscall.h. We should restrict the per-CPU ifdefs
in uname.c to just those CPUs which need to pick the uname based
on runtime CPU features.

thanks
-- PMM



reply via email to

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