diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2012-11-16 11:26:05 +0000 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2012-11-16 11:26:05 +0000 |
| commit | 4ee90c231a11a0969cb068ee5a9879d88e979686 (patch) | |
| tree | dffe5d1ba12317faaedf4322a4e87a613fcaab2e | |
| parent | 4ac66c49da86be32caff3a3af46266936050b53e (diff) | |
| download | bcm5719-llvm-4ee90c231a11a0969cb068ee5a9879d88e979686.tar.gz bcm5719-llvm-4ee90c231a11a0969cb068ee5a9879d88e979686.zip | |
asan: sync with gcc r193553
llvm-svn: 168151
| -rw-r--r-- | compiler-rt/lib/asan/asan_linux.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/asan_linux.cc b/compiler-rt/lib/asan/asan_linux.cc index 5c52ddc9648..1f46f268c2b 100644 --- a/compiler-rt/lib/asan/asan_linux.cc +++ b/compiler-rt/lib/asan/asan_linux.cc @@ -68,6 +68,20 @@ void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) { *pc = ucontext->uc_mcontext.gregs[REG_EIP]; *bp = ucontext->uc_mcontext.gregs[REG_EBP]; *sp = ucontext->uc_mcontext.gregs[REG_ESP]; +# 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 #else # error "Unsupported arch" #endif |

