From: Richard Henderson <rth@twiddle.net>
To: "Tomasz Łukaszewski" <lupus@cubiware.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Fix 64-bit off_t syscall argument passing in linux-user
Date: Thu, 25 Mar 2010 08:55:46 -0700 [thread overview]
Message-ID: <4BAB8782.6030905@twiddle.net> (raw)
In-Reply-To: <4BAB270E.1070201@cubiware.com>
On 03/25/2010 02:04 AM, Tomasz Łukaszewski wrote:
> +#if TARGET_ABI_BITS == 32
> +#ifdef TARGET_ARM
> + if (((CPUARMState *)cpu_env)->eabi)
> + {
> + arg4 = arg5;
> + arg5 = arg6;
> + }
> +#endif
> +#if defined TARGET_PPC || defined TARGET_MIPS
> + arg4 = arg5;
> + arg5 = arg6;
> +#endif
> +#endif
I wonder if this sequence couldn't be encapsulated in a macro. Something like
#if TARGET_ABI_BITS == 32
# if defined TARGET_ARM
# define FIXUP_64BIT_ARGUMENT_PAIR(a,b,c) \
do { \
if (((CPUARMState *)cpu_env)->eabi) { \
a = b, b = c; \
} \
} while (0)
# elif defined TARGET_PPC || defined TARGET_MIPS
# define FIXUP_64BIT_ARGUMENT_PAIR(a,b,c) \
do { a = b, b = c; } while (0)
# endif
#endif
#ifndef FIXUP_64BIT_ARGUMENT_PAIR
# define FIXUP_64BIT_ARGUMENT_PAIR(a,b,c) \
do { } while (0)
#endif
r~
prev parent reply other threads:[~2010-03-25 15:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-25 9:04 [Qemu-devel] [PATCH] Fix 64-bit off_t syscall argument passing in linux-user Tomasz Łukaszewski
2010-03-25 15:55 ` Richard Henderson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BAB8782.6030905@twiddle.net \
--to=rth@twiddle.net \
--cc=lupus@cubiware.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.