[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Handle SH4's exceptional
From: |
Richard Henderson |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
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 <address@hidden>
>
> 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~
- [Qemu-devel] [PATCH] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, James Clarke, 2017/09/15
- Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, Laurent Vivier, 2017/09/15
- Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, John Paul Adrian Glaubitz, 2017/09/15
- Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, Philippe Mathieu-Daudé, 2017/09/15
- Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, John Paul Adrian Glaubitz, 2017/09/15
- Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64,
Richard Henderson <=
- [Qemu-devel] [PATCH v2] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, James Clarke, 2017/09/15
- Re: [Qemu-devel] [PATCH v2] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, no-reply, 2017/09/15
- [Qemu-devel] [PATCH v3] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, James Clarke, 2017/09/15
- Re: [Qemu-devel] [PATCH v3] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, Eric Blake, 2017/09/15
- Re: [Qemu-devel] [PATCH v3] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, Laurent Vivier, 2017/09/15
- Re: [Qemu-devel] [PATCH v3] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, Richard Henderson, 2017/09/15
- Re: [Qemu-devel] [PATCH v3] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, John Paul Adrian Glaubitz, 2017/09/15
- Re: [Qemu-devel] [PATCH v3] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, John Paul Adrian Glaubitz, 2017/09/15
- Re: [Qemu-devel] [PATCH v3] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, Philippe Mathieu-Daudé, 2017/09/15
- Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Handle SH4's exceptional alignment for p{read, write}64, Laurent Vivier, 2017/09/15