]> git.ipfire.org Git - thirdparty/valgrind.git/commit
mips32: fix fadvise64 system call
authorPetar Jovanovic <mips32r2@gmail.com>
Tue, 29 Nov 2016 14:27:25 +0000 (14:27 +0000)
committerPetar Jovanovic <mips32r2@gmail.com>
Tue, 29 Nov 2016 14:27:25 +0000 (14:27 +0000)
commit9a6096841e8428d80e7724947777445a616bd927
treea7527cb9e5767f3a96423ba05d38846def13a830
parentadb196abf3c58a2651b8f50ade810c9cf5891c09
mips32: fix fadvise64 system call

For fadvise64 system call, 7th 32-bit argument slot (third on the stack)
will also be used due to MIPS O32 calling convention in passing 64-bit
values.

sys_fadvise64(int fd, loff_t offset, loff_t len, int advice);

NR_fadvise64 -> v0               (sysno)
fd           -> a0               (ARG1)
offset       -> a2, a3           (ARG3, ARG4)
len          -> SP + 16, SP + 20 (ARG5, ARG6)
advise       -> SP + 24          (ARG7)

Change the code according to it.

Patch by Aleksandar Rikalo.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16162
coregrind/m_syswrap/priv_types_n_macros.h
coregrind/m_syswrap/syswrap-generic.c
coregrind/m_syswrap/syswrap-linux.c
coregrind/m_syswrap/syswrap-main.c
coregrind/m_syswrap/syswrap-mips32-linux.c