qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"James Clarke" <jrtc27@jrtc27.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Laurent Vivier" <laurent@vivier.eu>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Subject: Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64
Date: Fri, 15 Sep 2017 10:13:06 -0700	[thread overview]
Message-ID: <cc5d79bb-a56a-08a6-c054-b194e6a5a833@linaro.org> (raw)
In-Reply-To: <2f7283ca-6ecd-165f-c572-a0f2a781aba7@amsat.org>

On 09/15/2017 08:41 AM, Philippe Mathieu-Daudé wrote:
> On 09/15/2017 03:58 AM, James Clarke wrote:
>> Fixes: https://bugs.launchpad.net/qemu/+bug/1716767
>> Signed-off-by: James Clarke <jrtc27@jrtc27.com>
> 
> Congratulations! You have won yourself a R: entry (Designated reviewer) in the
> "Linux user" and "SH4" sections of MAINTAINERS!
> 
>> ---
>>   linux-user/syscall.c | 12 ++++++++++++
>>   1 file changed, 12 insertions(+)
>>
>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
>> index 9b6364a266..24d6a81c21 100644
>> --- a/linux-user/syscall.c
>> +++ b/linux-user/syscall.c
>> @@ -10495,20 +10495,32 @@ abi_long do_syscall(void *cpu_env, int num,
>> abi_long arg1,
>>   #endif
>>   #ifdef TARGET_NR_pread64
>>       case TARGET_NR_pread64:
>> +#if defined(TARGET_SH4)
>> +        /* SH4 doesn't align register pairs, except for p{read,write}64 */
>> +        arg4 = arg5;
>> +        arg5 = arg6;
>> +#else
>>           if (regpairs_aligned(cpu_env)) {
>>               arg4 = arg5;
>>               arg5 = arg6;
>>           }
>> +#endif
> 
> I'd rather use arch_type from "sysemu/arch_init.h":
> 
>   case TARGET_NR_pwrite64:
>       /* SH4 doesn't align register pairs, except for p{read,write}64 */
>       if (arch_type == QEMU_ARCH_SH4 || regpairs_aligned(cpu_env)) {
>           arg4 = arg5;
>           arg5 = arg6;
>       }
> 
> What do you think?

I'd rather change the interface of regpairs_aligned to take the syscall number,
and add an instance for SH4 above.


r~

  parent reply	other threads:[~2017-09-15 17:13 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-15  6:58 [Qemu-devel] [PATCH] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64 James Clarke
2017-09-15  7:27 ` Laurent Vivier
2017-09-15 15:07 ` John Paul Adrian Glaubitz
2017-09-15 15:41 ` Philippe Mathieu-Daudé
2017-09-15 15:43   ` John Paul Adrian Glaubitz
2017-09-15 17:13   ` Richard Henderson [this message]
2017-09-15 18:39   ` Laurent Vivier
2017-09-15 19:07   ` [Qemu-devel] [PATCH v2] " James Clarke
2017-09-15 19:24     ` no-reply
2017-09-15 19:33     ` [Qemu-devel] [PATCH v3] " James Clarke
2017-09-15 19:51       ` Eric Blake
2017-09-15 20:11       ` Laurent Vivier
2017-09-15 20:12       ` Richard Henderson
2017-09-15 20:41       ` John Paul Adrian Glaubitz
2017-09-15 20:45       ` John Paul Adrian Glaubitz
2017-09-15 21:10       ` Philippe Mathieu-Daudé
2017-10-04  8:38       ` John Paul Adrian Glaubitz
2017-11-04  7:30         ` [Qemu-devel] PING: " John Paul Adrian Glaubitz
2017-11-06 19:57         ` [Qemu-devel] " Riku Voipio
2017-11-06 20:00           ` James Clarke

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=cc5d79bb-a56a-08a6-c054-b194e6a5a833@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=jrtc27@jrtc27.com \
    --cc=laurent@vivier.eu \
    --cc=peter.maydell@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).