summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2013-11-18 08:20:13 +0000
committerKostya Serebryany <kcc@google.com>2013-11-18 08:20:13 +0000
commita92b07d68441fff5f7e94324503d720807a130ce (patch)
tree8f85a4efe5c9130ea6addf5541e787c9f9a284d8
parentee6507dfdc5da99f60ae14e489065b1b304d7e46 (diff)
downloadbcm5719-llvm-a92b07d68441fff5f7e94324503d720807a130ce.tar.gz
bcm5719-llvm-a92b07d68441fff5f7e94324503d720807a130ce.zip
[asan] support __hppa__ (by John David Anglin)
llvm-svn: 194995
-rw-r--r--compiler-rt/lib/asan/asan_linux.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/asan_linux.cc b/compiler-rt/lib/asan/asan_linux.cc
index 2aea32a18bc..39eec3bfd30 100644
--- a/compiler-rt/lib/asan/asan_linux.cc
+++ b/compiler-rt/lib/asan/asan_linux.cc
@@ -58,6 +58,12 @@ void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
*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];
OpenPOWER on IntegriCloud