summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_linux.cpp
diff options
context:
space:
mode:
authorSam Elliott <selliott@lowrisc.org>2019-10-17 17:24:28 +0000
committerSam Elliott <selliott@lowrisc.org>2019-10-17 17:24:28 +0000
commit5d842447aa515d35e44333f1cd6d3f40e7eba3d8 (patch)
treef39f952730e2bd50dedef2d3971f58860bc4a63f /lib/sanitizer_common/sanitizer_linux.cpp
parenta1b9a6b625e4e9c6e562d8fb02f76966dda2c577 (diff)
downloadcompiler-rt-5d842447aa515d35e44333f1cd6d3f40e7eba3d8.tar.gz
Revert [Sanitizers] Add support for RISC-V 64-bit
This reverts r375132 (git commit 00bbe990c5d4472d5413479a539b3d6edbb3ca7a) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@375136 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_linux.cpp')
-rw-r--r--lib/sanitizer_common/sanitizer_linux.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/sanitizer_common/sanitizer_linux.cpp b/lib/sanitizer_common/sanitizer_linux.cpp
index 3807a79b1..0b53da6c3 100644
--- a/lib/sanitizer_common/sanitizer_linux.cpp
+++ b/lib/sanitizer_common/sanitizer_linux.cpp
@@ -407,10 +407,7 @@ uptr internal_unlink(const char *path) {
}
uptr internal_rename(const char *oldpath, const char *newpath) {
-#if defined(__riscv)
- return internal_syscall(SYSCALL(renameat2), AT_FDCWD, (uptr)oldpath, AT_FDCWD,
- (uptr)newpath, 0);
-#elif SANITIZER_USES_CANONICAL_LINUX_SYSCALLS || SANITIZER_OPENBSD
+#if SANITIZER_USES_CANONICAL_LINUX_SYSCALLS || SANITIZER_OPENBSD
return internal_syscall(SYSCALL(renameat), AT_FDCWD, (uptr)oldpath, AT_FDCWD,
(uptr)newpath);
#else
@@ -1975,11 +1972,6 @@ static void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) {
# endif
*bp = ucontext->uc_mcontext.gregs[11];
*sp = ucontext->uc_mcontext.gregs[15];
-#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];
#else
# error "Unsupported arch"
#endif