From: Dmitry V. Levin Date: Tue, 7 May 2013 08:03:41 +0000 (+0000) Subject: mips o32: raise the max number of syscall arguments to 7 X-Git-Tag: v4.8~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2690fadc8b35190dddd29274a7405bac13adc469;p=strace mips o32: raise the max number of syscall arguments to 7 On mips o32, fadvise64_64 takes 7 arguments. * defs.h [LINUX_MIPSO32]: Raise MAX_ARGS to 7. --- diff --git a/defs.h b/defs.h index 3873c10a..5f1905ef 100644 --- a/defs.h +++ b/defs.h @@ -36,9 +36,20 @@ # define _LFS64_LARGEFILE 1 # endif #endif + #ifdef MIPS +# if _MIPS_SIM == _MIPS_SIM_ABI64 +# define LINUX_MIPSN64 +# elif _MIPS_SIM == _MIPS_SIM_NABI32 +# define LINUX_MIPSN32 +# elif _MIPS_SIM == _MIPS_SIM_ABI32 +# define LINUX_MIPSO32 +# else +# error Unsupported _MIPS_SIM +# endif # include #endif + #include #ifdef HAVE_STDBOOL_H # include @@ -114,10 +125,15 @@ extern char *stpcpy(char *dst, const char *src); * Maximum number of args to a syscall. * * Make sure that all entries in all syscallent.h files have nargs <= MAX_ARGS! - * linux//syscallent.h: all have nargs <= 6. + * linux//syscallent*.h: + * all have nargs <= 6 except mips o32 which has nargs <= 7. */ #ifndef MAX_ARGS -# define MAX_ARGS 6 +# ifdef LINUX_MIPSO32 +# define MAX_ARGS 7 +# else +# define MAX_ARGS 6 +# endif #endif /* default sorting method for call profiling */ #ifndef DEFAULT_SORTBY @@ -131,17 +147,6 @@ extern char *stpcpy(char *dst, const char *src); /* To force NOMMU build, set to 1 */ #define NOMMU_SYSTEM 0 - -#if defined(MIPS) && _MIPS_SIM == _MIPS_SIM_ABI32 -# define LINUX_MIPSO32 -#endif -#if defined(MIPS) && _MIPS_SIM == _MIPS_SIM_NABI32 -# define LINUX_MIPSN32 -#endif -#if defined(MIPS) && _MIPS_SIM == _MIPS_SIM_ABI64 -# define LINUX_MIPSN64 -#endif - #if (defined(SPARC) || defined(SPARC64) \ || defined(I386) || defined(X32) || defined(X86_64) \ || defined(ARM) || defined(AARCH64) \