[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 008/108] linux-user: Make syscall number unsigned
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH v2 008/108] linux-user: Make syscall number unsigned |
Date: |
Sat, 9 Jun 2018 17:00:40 -1000 |
Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
linux-user/qemu.h | 2 +-
linux-user/syscall.c | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 6fa1e968db..c628a5a05c 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -201,7 +201,7 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src,
void target_set_brk(abi_ulong new_brk);
abi_long do_brk(abi_ulong new_brk);
void syscall_init(void);
-abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
+abi_long do_syscall(void *cpu_env, unsigned num, abi_long arg1,
abi_long arg2, abi_long arg3, abi_long arg4,
abi_long arg5, abi_long arg6, abi_long arg7,
abi_long arg8);
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index fd8d48b0da..46f123ee13 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -719,20 +719,20 @@ static inline int next_free_host_timer(void)
/* ARM EABI and MIPS expect 64bit types aligned even on pairs or registers */
#ifdef TARGET_ARM
-static inline int regpairs_aligned(void *cpu_env, int num)
+static inline int regpairs_aligned(void *cpu_env, unsigned num)
{
return ((((CPUARMState *)cpu_env)->eabi) == 1) ;
}
#elif defined(TARGET_MIPS) && (TARGET_ABI_BITS == 32)
-static inline int regpairs_aligned(void *cpu_env, int num) { return 1; }
+static inline int regpairs_aligned(void *cpu_env, unsigned num) { return 1; }
#elif defined(TARGET_PPC) && !defined(TARGET_PPC64)
/* SysV AVI for PPC32 expects 64bit parameters to be passed on odd/even pairs
* of registers which translates to the same as ARM/MIPS, because we start with
* r3 as arg1 */
-static inline int regpairs_aligned(void *cpu_env, int num) { return 1; }
+static inline int regpairs_aligned(void *cpu_env, unsigned num) { return 1; }
#elif defined(TARGET_SH4)
/* SH4 doesn't align register pairs, except for p{read,write}64 */
-static inline int regpairs_aligned(void *cpu_env, int num)
+static inline int regpairs_aligned(void *cpu_env, unsigned num)
{
switch (num) {
case TARGET_NR_pread64:
@@ -744,9 +744,9 @@ static inline int regpairs_aligned(void *cpu_env, int num)
}
}
#elif defined(TARGET_XTENSA)
-static inline int regpairs_aligned(void *cpu_env, int num) { return 1; }
+static inline int regpairs_aligned(void *cpu_env, unsigned num) { return 1; }
#else
-static inline int regpairs_aligned(void *cpu_env, int num) { return 0; }
+static inline int regpairs_aligned(void *cpu_env, unsigned num) { return 0; }
#endif
#define ERRNO_TABLE_SIZE 1200
@@ -7952,7 +7952,7 @@ static int host_to_target_cpu_mask(const unsigned long
*host_mask,
* of syscall results, can be performed.
* All errnos that do_syscall() returns must be -TARGET_<errcode>.
*/
-static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
+static abi_long do_syscall1(void *cpu_env, unsigned num, abi_long arg1,
abi_long arg2, abi_long arg3, abi_long arg4,
abi_long arg5, abi_long arg6, abi_long arg7,
abi_long arg8)
@@ -12412,7 +12412,7 @@ static abi_long do_syscall1(void *cpu_env, int num,
abi_long arg1,
return ret;
}
-abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
+abi_long do_syscall(void *cpu_env, unsigned num, abi_long arg1,
abi_long arg2, abi_long arg3, abi_long arg4,
abi_long arg5, abi_long arg6, abi_long arg7,
abi_long arg8)
--
2.17.1
- [Qemu-devel] [PATCH v2 000/108] linux-user: Split do_syscall, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 001/108] linux-user: Remove DEBUG, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 002/108] linux-user: Split out do_syscall1, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 005/108] linux-user: Propagate goto unimplemented_nowarn to return, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 006/108] linux-user: Propagate goto unimplemented to default, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 007/108] linux-user: Propagate goto fail to return, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 004/108] linux-user: Propagate goto efault to return, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 008/108] linux-user: Make syscall number unsigned,
Richard Henderson <=
- [Qemu-devel] [PATCH v2 009/108] linux-user: Set up infrastructure for table-izing syscalls, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 010/108] linux-user: Split out brk, close, exit, read, write, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 003/108] linux-user: Relax single exit from "break", Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 011/108] linux-user: Split out execve, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 012/108] linux-user: Split out open, openat, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 013/108] linux-user: Split out name_to_handle_at, Richard Henderson, 2018/06/09
- [Qemu-devel] [PATCH v2 014/108] linux-user: Split out open_to_handle_at, Richard Henderson, 2018/06/09