linux-user: Fix MIPS indirect syscall handling
authorAn-Cheng Huang <ancheng@ubnt.com>
Tue, 9 Aug 2011 19:31:41 +0000 (12:31 -0700)
committerRiku Voipio <riku.voipio@linaro.org>
Fri, 9 Sep 2011 07:47:03 +0000 (10:47 +0300)
Change the number of argument for MIPS sys_syscall from 0 to 8. This
allows arguments for indirect syscalls to be processed correctly.

Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: An-Cheng Huang <ancheng@ubnt.com>
linux-user/main.c

index 8910d2c4943f3f23488c8d4b3a0284894b72d413..3df91f388a1365c3ddadf413205018882bca5adb 100644 (file)
@@ -1749,7 +1749,7 @@ void cpu_loop(CPUPPCState *env)
 #define MIPS_SYS(name, args) args,
 
 static const uint8_t mips_syscall_args[] = {
-       MIPS_SYS(sys_syscall    , 0)    /* 4000 */
+       MIPS_SYS(sys_syscall    , 8)    /* 4000 */
        MIPS_SYS(sys_exit       , 1)
        MIPS_SYS(sys_fork       , 0)
        MIPS_SYS(sys_read       , 3)