On 09/15/2017 05:41 PM, Philippe Mathieu-Daudé wrote:
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 agree. That looks a bit cleaner. Was actually thinking about something like that.
if (!(p = lock_user(VERIFY_WRITE, arg2, arg3, 0))) goto efault; ret = get_errno(pread64(arg1, p, arg3, target_offset64(arg4, arg5))); unlock_user(p, arg2, ret); break; case TARGET_NR_pwrite64: +#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; } +#endifsame here.
Dito. -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - [email protected] `. `' Freie Universitaet Berlin - [email protected] `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
