From 9e8b07ab0fb74fb15098c406a5dc71e273d50b1c Mon Sep 17 00:00:00 2001 From: sewardj Date: Sat, 18 Feb 2006 21:13:29 +0000 Subject: Add a missing case. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5656 a5019735-40e9-0310-863c-91ae7b9d1cf9 --- include/valgrind.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'include') diff --git a/include/valgrind.h b/include/valgrind.h index 7a735a96..a79a1bf7 100644 --- a/include/valgrind.h +++ b/include/valgrind.h @@ -518,6 +518,29 @@ typedef lval = (__typeof__(lval)) _res; \ } while (0) +#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ + do { \ + volatile OrigFn _orig = (orig); \ + volatile unsigned long _argvec[4]; \ + volatile unsigned long _res; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ + _argvec[1] = (unsigned long)(arg1); \ + _argvec[2] = (unsigned long)(arg2); \ + _argvec[3] = (unsigned long)(arg3); \ + __asm__ volatile( \ + "pushl 12(%%eax)\n\t" \ + "pushl 8(%%eax)\n\t" \ + "pushl 4(%%eax)\n\t" \ + "movl (%%eax), %%eax\n\t" /* target->%eax */ \ + VALGRIND_CALL_NOREDIR_EAX \ + "addl $12, %%esp\n" \ + : /*out*/ "=a" (_res) \ + : /*in*/ "a" (&_argvec[0]) \ + : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ + ); \ + lval = (__typeof__(lval)) _res; \ + } while (0) + #define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ do { \ volatile OrigFn _orig = (orig); \ -- cgit v1.2.3