diff options
Diffstat (limited to 'include/valgrind.h')
-rw-r--r-- | include/valgrind.h | 44 |
1 files changed, 29 insertions, 15 deletions
diff --git a/include/valgrind.h b/include/valgrind.h index 613de06bf..c505f9f9b 100644 --- a/include/valgrind.h +++ b/include/valgrind.h @@ -12,7 +12,7 @@ This file is part of Valgrind, a dynamic binary instrumentation framework. - Copyright (C) 2000-2013 Julian Seward. All rights reserved. + Copyright (C) 2000-2015 Julian Seward. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -89,7 +89,7 @@ || (__VALGRIND_MAJOR__ == 3 && __VALGRIND_MINOR__ >= 6)) */ #define __VALGRIND_MAJOR__ 3 -#define __VALGRIND_MINOR__ 10 +#define __VALGRIND_MINOR__ 12 #include <stdarg.h> @@ -123,6 +123,8 @@ #undef PLAT_mips32_linux #undef PLAT_mips64_linux #undef PLAT_tilegx_linux +#undef PLAT_x86_solaris +#undef PLAT_amd64_solaris #if defined(__APPLE__) && defined(__i386__) @@ -138,7 +140,7 @@ # define PLAT_amd64_win64 1 #elif defined(__linux__) && defined(__i386__) # define PLAT_x86_linux 1 -#elif defined(__linux__) && defined(__x86_64__) +#elif defined(__linux__) && defined(__x86_64__) && !defined(__ILP32__) # define PLAT_amd64_linux 1 #elif defined(__linux__) && defined(__powerpc__) && !defined(__powerpc64__) # define PLAT_ppc32_linux 1 @@ -160,6 +162,10 @@ # define PLAT_mips32_linux 1 #elif defined(__linux__) && defined(__tilegx__) # define PLAT_tilegx_linux 1 +#elif defined(__sun) && defined(__i386__) +# define PLAT_x86_solaris 1 +#elif defined(__sun) && defined(__x86_64__) +# define PLAT_amd64_solaris 1 #else /* If we're not compiling for our target platform, don't generate any inline asms. */ @@ -247,10 +253,11 @@ inline asm stuff to be useful. */ -/* ------------------------- x86-{linux,darwin} ---------------- */ +/* ----------------- x86-{linux,darwin,solaris} ---------------- */ #if defined(PLAT_x86_linux) || defined(PLAT_x86_darwin) \ - || (defined(PLAT_x86_win32) && defined(__GNUC__)) + || (defined(PLAT_x86_win32) && defined(__GNUC__)) \ + || defined(PLAT_x86_solaris) typedef struct { @@ -310,7 +317,8 @@ typedef ); \ } while (0) -#endif /* PLAT_x86_linux || PLAT_x86_darwin || (PLAT_x86_win32 && __GNUC__) */ +#endif /* PLAT_x86_linux || PLAT_x86_darwin || (PLAT_x86_win32 && __GNUC__) + || PLAT_x86_solaris */ /* ------------------------- x86-Win32 ------------------------- */ @@ -385,9 +393,10 @@ valgrind_do_client_request_expr(uintptr_t _zzq_default, uintptr_t _zzq_request, #endif /* PLAT_x86_win32 */ -/* ------------------------ amd64-{linux,darwin} --------------- */ +/* ----------------- amd64-{linux,darwin,solaris} --------------- */ #if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ + || defined(PLAT_amd64_solaris) \ || (defined(PLAT_amd64_win64) && defined(__GNUC__)) typedef @@ -448,7 +457,7 @@ typedef ); \ } while (0) -#endif /* PLAT_amd64_linux || PLAT_amd64_darwin */ +#endif /* PLAT_amd64_linux || PLAT_amd64_darwin || PLAT_amd64_solaris */ /* ------------------------- amd64-Win64 ------------------------- */ @@ -785,7 +794,8 @@ typedef "orr x10, x10, x10\n\t" \ "mov %0, x3" /*result*/ \ : "=r" (_zzq_result) \ - : "r" ((unsigned long int)_zzq_default), "r" (&_zzq_args[0]) \ + : "r" ((unsigned long int)(_zzq_default)), \ + "r" (&_zzq_args[0]) \ : "cc","memory", "x3", "x4"); \ _zzq_result; \ }) @@ -1202,9 +1212,10 @@ typedef do { volatile unsigned long _junk; \ CALL_FN_W_7W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6,arg7); } while (0) -/* ------------------------- x86-{linux,darwin} ---------------- */ +/* ----------------- x86-{linux,darwin,solaris} ---------------- */ -#if defined(PLAT_x86_linux) || defined(PLAT_x86_darwin) +#if defined(PLAT_x86_linux) || defined(PLAT_x86_darwin) \ + || defined(PLAT_x86_solaris) /* These regs are trashed by the hidden call. No need to mention eax as gcc can already see that, plus causes gcc to bomb. */ @@ -1631,11 +1642,12 @@ typedef lval = (__typeof__(lval)) _res; \ } while (0) -#endif /* PLAT_x86_linux || PLAT_x86_darwin */ +#endif /* PLAT_x86_linux || PLAT_x86_darwin || PLAT_x86_solaris */ -/* ------------------------ amd64-{linux,darwin} --------------- */ +/* ---------------- amd64-{linux,darwin,solaris} --------------- */ -#if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) +#if defined(PLAT_amd64_linux) || defined(PLAT_amd64_darwin) \ + || defined(PLAT_amd64_solaris) /* ARGREGS: rdi rsi rdx rcx r8 r9 (the rest on stack in R-to-L order) */ @@ -2184,7 +2196,7 @@ typedef lval = (__typeof__(lval)) _res; \ } while (0) -#endif /* PLAT_amd64_linux || PLAT_amd64_darwin */ +#endif /* PLAT_amd64_linux || PLAT_amd64_darwin || PLAT_amd64_solaris */ /* ------------------------ ppc32-linux ------------------------ */ @@ -7108,5 +7120,7 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...) #undef PLAT_mips32_linux #undef PLAT_mips64_linux #undef PLAT_tilegx_linux +#undef PLAT_x86_solaris +#undef PLAT_amd64_solaris #endif /* __VALGRIND_H */ |