diff options
author | Kostya Serebryany <kcc@google.com> | 2013-06-03 14:49:25 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2013-06-03 14:49:25 +0000 |
commit | 40527a579131210fcfa2373620a0c2200800e7c4 (patch) | |
tree | cd9e6a2ec673f6d708cc04c377ef46d553075205 /lib/asan/asan_linux.cc | |
parent | 5e719a705666988781b9735d62cafc808ade60e2 (diff) | |
download | compiler-rt-40527a579131210fcfa2373620a0c2200800e7c4.tar.gz compiler-rt-40527a579131210fcfa2373620a0c2200800e7c4.tar.bz2 compiler-rt-40527a579131210fcfa2373620a0c2200800e7c4.tar.xz |
[asan] ASan Linux MIPS32 support (compiler-rt part), patch by Jyun-Yan Y
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183105 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/asan_linux.cc')
-rw-r--r-- | lib/asan/asan_linux.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc index 17bb4ca5..2aea32a1 100644 --- a/lib/asan/asan_linux.cc +++ b/lib/asan/asan_linux.cc @@ -89,6 +89,11 @@ void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) { 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 |