[compiler-rt] r194995 - [asan] support __hppa__ (by John David Anglin)

Kostya Serebryany kcc at google.com
Mon Nov 18 00:20:13 PST 2013


Author: kcc
Date: Mon Nov 18 02:20:13 2013
New Revision: 194995

URL: http://llvm.org/viewvc/llvm-project?rev=194995&view=rev
Log:
[asan] support __hppa__ (by John David Anglin)

Modified:
    compiler-rt/trunk/lib/asan/asan_linux.cc

Modified: compiler-rt/trunk/lib/asan/asan_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_linux.cc?rev=194995&r1=194994&r2=194995&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_linux.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_linux.cc Mon Nov 18 02:20:13 2013
@@ -58,6 +58,12 @@ void GetPcSpBp(void *context, uptr *pc,
   *pc = ucontext->uc_mcontext.arm_pc;
   *bp = ucontext->uc_mcontext.arm_fp;
   *sp = ucontext->uc_mcontext.arm_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__)
   ucontext_t *ucontext = (ucontext_t*)context;
   *pc = ucontext->uc_mcontext.gregs[REG_RIP];





More information about the llvm-commits mailing list