diff options
author | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2006-01-20 16:46:34 +0000 |
---|---|---|
committer | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2006-01-20 16:46:34 +0000 |
commit | 38de0994e3561760a8e1ff2efd51a0c9217a3d8d (patch) | |
tree | 41ab117bbc4d5f25913a9459770d5da00b123f6d /include | |
parent | 8215ffac992618b5f50dab8d258a5a7813e05659 (diff) |
Make fn wrapping work again on ppc32-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5573 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'include')
-rw-r--r-- | include/valgrind.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/valgrind.h b/include/valgrind.h index 96e9508d..dda4b650 100644 --- a/include/valgrind.h +++ b/include/valgrind.h @@ -789,7 +789,7 @@ typedef /* These CALL_FN_ macros assume that on ppc32-linux, sizeof(unsigned long) == 4. */ -#define CALL_FN_W_v(lval, fnptr) \ +#define CALL_FN_W_v(lval, orig) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[1]; \ @@ -807,12 +807,12 @@ typedef lval = (__typeof__(lval)) _res; \ } while (0) -#define CALL_FN_W_W(lval, fnptr, arg1) \ +#define CALL_FN_W_W(lval, orig, arg1) \ do { \ - volatile void* _fnptr = (fnptr); \ + volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[2]; \ volatile unsigned long _res; \ - _argvec[0] = (unsigned long)_fnptr; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)arg1; \ __asm__ volatile( \ "mr 11,%1\n\t" \ @@ -827,12 +827,12 @@ typedef lval = (__typeof__(lval)) _res; \ } while (0) -#define CALL_FN_W_WW(lval, fnptr, arg1,arg2) \ +#define CALL_FN_W_WW(lval, orig, arg1,arg2) \ do { \ - volatile void* _fnptr = (fnptr); \ + volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3]; \ volatile unsigned long _res; \ - _argvec[0] = (unsigned long)_fnptr; \ + _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)arg1; \ _argvec[2] = (unsigned long)arg2; \ __asm__ volatile( \ |