From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NupPS-00078E-Bw for qemu-devel@nongnu.org; Thu, 25 Mar 2010 11:55:50 -0400 Received: from [140.186.70.92] (port=55797 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NupPR-00077G-2W for qemu-devel@nongnu.org; Thu, 25 Mar 2010 11:55:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NupPP-0004S6-NM for qemu-devel@nongnu.org; Thu, 25 Mar 2010 11:55:48 -0400 Received: from are.twiddle.net ([75.149.56.221]:50183) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NupPP-0004Rq-DD for qemu-devel@nongnu.org; Thu, 25 Mar 2010 11:55:47 -0400 Message-ID: <4BAB8782.6030905@twiddle.net> Date: Thu, 25 Mar 2010 08:55:46 -0700 From: Richard Henderson MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Fix 64-bit off_t syscall argument passing in linux-user References: <4BAB270E.1070201@cubiware.com> In-Reply-To: <4BAB270E.1070201@cubiware.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?VG9tYXN6IMWBdWthc3pld3NraQ==?= Cc: qemu-devel@nongnu.org On 03/25/2010 02:04 AM, Tomasz =C5=81ukaszewski wrote: > +#if TARGET_ABI_BITS =3D=3D 32 > +#ifdef TARGET_ARM > + if (((CPUARMState *)cpu_env)->eabi) > + { > + arg4 =3D arg5; > + arg5 =3D arg6; > + } > +#endif > +#if defined TARGET_PPC || defined TARGET_MIPS > + arg4 =3D arg5; > + arg5 =3D arg6; > +#endif > +#endif I wonder if this sequence couldn't be encapsulated in a macro. Something= like #if TARGET_ABI_BITS =3D=3D 32 # if defined TARGET_ARM # define FIXUP_64BIT_ARGUMENT_PAIR(a,b,c) \ do { \ if (((CPUARMState *)cpu_env)->eabi) { \ a =3D b, b =3D c; \ } \ } while (0) # elif defined TARGET_PPC || defined TARGET_MIPS # define FIXUP_64BIT_ARGUMENT_PAIR(a,b,c) \ do { a =3D b, b =3D c; } while (0) # endif #endif #ifndef FIXUP_64BIT_ARGUMENT_PAIR # define FIXUP_64BIT_ARGUMENT_PAIR(a,b,c) \ do { } while (0) #endif r~