Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gcc/dist/libsanitizer/asan Add RISCV bits
details: https://anonhg.NetBSD.org/src/rev/3f027bfcc869
branches: trunk
changeset: 807204:3f027bfcc869
user: matt <matt%NetBSD.org@localhost>
date: Tue Mar 31 17:58:30 2015 +0000
description:
Add RISCV bits
diffstat:
external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diffs (24 lines):
diff -r 5653841e185d -r 3f027bfcc869 external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc
--- a/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc Tue Mar 31 17:57:40 2015 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc Tue Mar 31 17:58:30 2015 +0000
@@ -69,6 +69,8 @@
# 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__)
@@ -106,6 +108,11 @@
// 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;
Home |
Main Index |
Thread Index |
Old Index