Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gcc.old/dist/libsanitizer/asan we now has _UC_...
details: https://anonhg.NetBSD.org/src/rev/8f7e480f0a98
branches: trunk
changeset: 359565:8f7e480f0a98
user: christos <christos%NetBSD.org@localhost>
date: Thu Feb 15 19:02:06 2018 +0000
description:
we now has _UC_MACHINE_FP.
diffstat:
external/gpl3/gcc.old/dist/libsanitizer/asan/asan_linux.cc | 54 +++++++------
1 files changed, 28 insertions(+), 26 deletions(-)
diffs (72 lines):
diff -r b0a3f2714770 -r 8f7e480f0a98 external/gpl3/gcc.old/dist/libsanitizer/asan/asan_linux.cc
--- a/external/gpl3/gcc.old/dist/libsanitizer/asan/asan_linux.cc Thu Feb 15 15:53:56 2018 +0000
+++ b/external/gpl3/gcc.old/dist/libsanitizer/asan/asan_linux.cc Thu Feb 15 19:02:06 2018 +0000
@@ -162,40 +162,42 @@
void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
#ifdef __NetBSD__
-# define __UC_MACHINE_FP(ucontext, r) \
+# ifndef _UC_MACHINE_FP
+# define __UC_MACHINE_FP(ucontext, r) \
(ucontext)->uc_mcontext.__gregs[(r)]
/*
* Unfortunately we don't have a portable frame pointer (yet)
*/
-# if defined(__alpha__)
-# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_S6)
-# elif defined(__arm__)
-# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_FP)
-# elif defined(__x86_64__)
-# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_RBP)
-# elif defined(__i386__)
-# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_EBP)
-# elif defined(__m68k__)
-# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_A6)
-# elif defined(__mips__)
-# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_S8)
-# elif defined(__powerpc__) || defined(__powerpc64__)
-# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_R1)
-# elif defined(__riscv__)
-# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_S0)
-# elif defined(__sparc__)
-# define _UC_MACHINE_FP(ucontext) sp[15]
-# elif defined(__sh3__)
-# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_R14)
-# elif defined(__vax__)
-# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_FP)
-# else
-# define _UC_MACHINE_FP(ucontext) 0
-# endif
+# if defined(__alpha__)
+# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_S6)
+# elif defined(__arm__)
+# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_FP)
+# elif defined(__x86_64__)
+# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_RBP)
+# elif defined(__i386__)
+# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_EBP)
+# elif defined(__m68k__)
+# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_A6)
+# elif defined(__mips__)
+# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_S8)
+# elif defined(__powerpc__) || defined(__powerpc64__)
+# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_R1)
+# elif defined(__riscv__)
+# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_S0)
+# elif defined(__sparc__)
+# define _UC_MACHINE_FP(ucontext) sp[15]
+# elif defined(__sh3__)
+# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_R14)
+# elif defined(__vax__)
+# define _UC_MACHINE_FP(ucontext) __UC_MACHINE_FP(ucontext, _REG_FP)
+# else
+# define _UC_MACHINE_FP(ucontext) 0
+# endif
ucontext_t *ucontext = (ucontext_t*)context;
*pc = _UC_MACHINE_PC(ucontext);
*sp = _UC_MACHINE_SP(ucontext);
*bp = _UC_MACHINE_FP(ucontext);
+# endif
#elif ASAN_ANDROID
*pc = *sp = *bp = 0;
#elif defined(__arm__)
Home |
Main Index |
Thread Index |
Old Index