From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIffo-0007sy-JH for qemu-devel@nongnu.org; Mon, 01 Oct 2012 09:04:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIffe-0003do-Po for qemu-devel@nongnu.org; Mon, 01 Oct 2012 09:04:36 -0400 Message-ID: <506994CF.4070609@suse.de> Date: Mon, 01 Oct 2012 15:04:15 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1348968759-10913-1-git-send-email-agraf@suse.de> In-Reply-To: <1348968759-10913-1-git-send-email-agraf@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/2] linux-user: ppc: mark as long long aligned List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Peter Maydell , Riku Voipio , "qemu-ppc@nongnu.org List" , qemu-devel qemu-devel Am 30.09.2012 03:32, schrieb Alexander Graf: > The PPC32 ABI dictates that long long (64bit) parameters are pass in od= d/even > register pairs. Because unlike ARM and MIPS we start at an odd register= number, > we can reuse the same aligning code that ARM and MIPS use. >=20 > Signed-off-by: Alexander Graf > --- > linux-user/syscall.c | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) >=20 > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 1a38169..8cd56f2 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -587,12 +587,16 @@ extern int setfsgid(int); > extern int setgroups(int, gid_t *); > =20 > /* ARM EABI and MIPS expect 64bit types aligned even on pairs or regis= ters */ > -#ifdef TARGET_ARM=20 > +#ifdef TARGET_ARM For anyone wondering, this is dropping a whitespace at end of line. ;) > static inline int regpairs_aligned(void *cpu_env) { > return ((((CPUARMState *)cpu_env)->eabi) =3D=3D 1) ; > } > #elif defined(TARGET_MIPS) > static inline int regpairs_aligned(void *cpu_env) { return 1; } > +#elif defined(TARGET_PPC) && !defined(TARGET_PPC64) > +/* PPC32 expects 64bit parameters to be passed on odd/even pairs of re= gisters > + which translates to the same as ARM/MIPS, because we start with r3 = as arg1 */ > +static inline int regpairs_aligned(void *cpu_env) { return 1; } > #else > static inline int regpairs_aligned(void *cpu_env) { return 0; } > #endif It is obvious that this function has been copied unmodified from mips, but shouldn't new code use bool and true, assuming that there is no magic performed on the return value? :) Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg