Module Name:    src
Committed By:   mrg
Date:           Sat Jul 10 22:39:56 UTC 2021

Modified Files:
        src/external/gpl3/gcc/dist/libsanitizer/asan: asan_linux.cc

Log Message:
remove an old #if 0'd section.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 \
    src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc
diff -u src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc:1.15 src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc:1.16
--- src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc:1.15	Sun Apr 11 23:54:25 2021
+++ src/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc	Sat Jul 10 22:39:56 2021
@@ -234,139 +234,6 @@ void AsanCheckIncompatibleRT() {
 }
 #endif // SANITIZER_ANDROID
 
-#if 0 // was in old netbsd / gcc 5 sanitizer stuff
-void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
-#ifdef __NetBSD__
-# 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
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = _UC_MACHINE_PC(ucontext);
-  *sp = _UC_MACHINE_SP(ucontext);
-  *bp = _UC_MACHINE_FP(ucontext);
-#elif ASAN_ANDROID
-  *pc = *sp = *bp = 0;
-#elif defined(__arm__)
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.arm_pc;
-  *bp = ucontext->uc_mcontext.arm_fp;
-  *sp = ucontext->uc_mcontext.arm_sp;
-#elif defined(__aarch64__)
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.pc;
-  *bp = ucontext->uc_mcontext.regs[29];
-  *sp = ucontext->uc_mcontext.sp;
-#elif defined(__hppa__)
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.sc_iaoq[0];
-  /* GCC uses %r3 whenever a frame pointer is needed.  */
-  *bp = ucontext->uc_mcontext.sc_gr[3];
-  *sp = ucontext->uc_mcontext.sc_gr[30];
-#elif defined(__x86_64__)
-# if SANITIZER_FREEBSD
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.mc_rip;
-  *bp = ucontext->uc_mcontext.mc_rbp;
-  *sp = ucontext->uc_mcontext.mc_rsp;
-# elif SANITIZER_NETBSD
-  *pc = ucontext->uc_mcontext.__gregs[_REG_RIP];
-  *bp = ucontext->uc_mcontext.__gregs[_REG_RBP];
-  *sp = ucontext->uc_mcontext.__gregs[_REG_RSP];
-# else
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.gregs[REG_RIP];
-  *bp = ucontext->uc_mcontext.gregs[REG_RBP];
-  *sp = ucontext->uc_mcontext.gregs[REG_RSP];
-# endif
-#elif defined(__i386__)
-# if SANITIZER_FREEBSD
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.mc_eip;
-  *bp = ucontext->uc_mcontext.mc_ebp;
-  *sp = ucontext->uc_mcontext.mc_esp;
-# elif SANITIZER_FREEBSD
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.__gregs[_REG_EIP];
-  *bp = ucontext->uc_mcontext.__gregs[_REG_EBP];
-  *sp = ucontext->uc_mcontext.__gregs[_REG_ESP];
-# else
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.gregs[REG_EIP];
-  *bp = ucontext->uc_mcontext.gregs[REG_EBP];
-  *sp = ucontext->uc_mcontext.gregs[REG_ESP];
-# endif
-#elif defined(__powerpc__) || defined(__powerpc64__)
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.regs->nip;
-  *sp = ucontext->uc_mcontext.regs->gpr[PT_R1];
-  // The powerpc{,64}-linux ABIs do not specify r31 as the frame
-  // pointer, but GCC always uses r31 when we need a frame pointer.
-  *bp = ucontext->uc_mcontext.regs->gpr[PT_R31];
-#elif defined(__riscv__)
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.gregs[REG_PC];
-  *bp = ucontext->uc_mcontext.gregs[REG_S0];
-  *sp = ucontext->uc_mcontext.gregs[REG_SP];
-#elif defined(__sparc__)
-  ucontext_t *ucontext = (ucontext_t*)context;
-  uptr *stk_ptr;
-# if defined (__arch64__)
-  *pc = ucontext->uc_mcontext.mc_gregs[MC_PC];
-  *sp = ucontext->uc_mcontext.mc_gregs[MC_O6];
-  stk_ptr = (uptr *) (*sp + 2047);
-  *bp = stk_ptr[15];
-# else
-  *pc = ucontext->uc_mcontext.gregs[REG_PC];
-  *sp = ucontext->uc_mcontext.gregs[REG_O6];
-  stk_ptr = (uptr *) *sp;
-  *bp = stk_ptr[15];
-# endif
-#elif defined(__mips__)
-  ucontext_t *ucontext = (ucontext_t*)context;
-  *pc = ucontext->uc_mcontext.gregs[31];
-  *bp = ucontext->uc_mcontext.gregs[30];
-  *sp = ucontext->uc_mcontext.gregs[29];
-#else
-# error "Unsupported arch"
-#endif
-}
-
-bool AsanInterceptsSignal(int signum) {
-  return signum == SIGSEGV && common_flags()->handle_segv;
-}
-
-void AsanPlatformThreadInit() {
-  // Nothing here for now.
-}
-#endif
-
 #if !SANITIZER_ANDROID
 void ReadContextStack(void *context, uptr *stack, uptr *ssize) {
   ucontext_t *ucp = (ucontext_t*)context;

Reply via email to