summaryrefslogtreecommitdiff
path: root/gnu/llvm
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2021-01-02 17:14:14 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2021-01-02 17:14:14 +0000
commitf464c1b5bc5aff4dc6d59927841daf6837d7411c (patch)
tree34a91496ecef2da3c0a1246c4a46662b1fef5665 /gnu/llvm
parent98a47b3820e541e4dbac6622f3296e9b3727458b (diff)
Merge compiler-rt 11.0.0.
ok kettenis@
Diffstat (limited to 'gnu/llvm')
-rw-r--r--gnu/llvm/compiler-rt/.arcconfig4
-rw-r--r--gnu/llvm/compiler-rt/lib/builtins/clear_cache.c10
-rw-r--r--gnu/llvm/compiler-rt/lib/builtins/hexagon/fabs_opt.S36
-rw-r--r--gnu/llvm/compiler-rt/lib/builtins/hexagon/fma_opt.S30
-rw-r--r--gnu/llvm/compiler-rt/lib/builtins/hexagon/fmax_opt.S29
-rw-r--r--gnu/llvm/compiler-rt/lib/builtins/hexagon/fmin_opt.S29
-rw-r--r--gnu/llvm/compiler-rt/lib/scudo/standalone/interface.h29
7 files changed, 10 insertions, 157 deletions
diff --git a/gnu/llvm/compiler-rt/.arcconfig b/gnu/llvm/compiler-rt/.arcconfig
deleted file mode 100644
index 74604d35b6f..00000000000
--- a/gnu/llvm/compiler-rt/.arcconfig
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "repository.callsign" : "CRT",
- "conduit_uri" : "https://reviews.llvm.org/"
-}
diff --git a/gnu/llvm/compiler-rt/lib/builtins/clear_cache.c b/gnu/llvm/compiler-rt/lib/builtins/clear_cache.c
index 4bcbd113310..29e31f55d49 100644
--- a/gnu/llvm/compiler-rt/lib/builtins/clear_cache.c
+++ b/gnu/llvm/compiler-rt/lib/builtins/clear_cache.c
@@ -147,6 +147,16 @@ void __clear_cache(void *start, void *end) {
for (uintptr_t dword = start_dword; dword < end_dword; dword += dword_size)
__asm__ volatile("flush %0" : : "r"(dword));
+#elif defined(__riscv) && defined(__linux__)
+#define __NR_riscv_flush_icache (244 + 15)
+ register void *start_reg __asm("a0") = start;
+ const register void *end_reg __asm("a1") = end;
+ const register long flags __asm("a2") = 0;
+ const register long syscall_nr __asm("a7") = __NR_riscv_flush_icache;
+ __asm __volatile("ecall"
+ : "=r"(start_reg)
+ : "r"(start_reg), "r"(end_reg), "r"(flags), "r"(syscall_nr));
+ assert(start_reg == 0 && "Cache flush syscall failed.");
#else
#if __APPLE__
// On Darwin, sys_icache_invalidate() provides this functionality
diff --git a/gnu/llvm/compiler-rt/lib/builtins/hexagon/fabs_opt.S b/gnu/llvm/compiler-rt/lib/builtins/hexagon/fabs_opt.S
deleted file mode 100644
index 6bf9b84b3d2..00000000000
--- a/gnu/llvm/compiler-rt/lib/builtins/hexagon/fabs_opt.S
+++ /dev/null
@@ -1,36 +0,0 @@
-//===----------------------Hexagon builtin routine ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-.macro FUNCTION_BEGIN name
-.text
-.p2align 5
-.globl \name
-.type \name, @function
-\name:
-.endm
-
-.macro FUNCTION_END name
-.size \name, . - \name
-.endm
-
-FUNCTION_BEGIN fabs
- {
- r1 = clrbit(r1, #31)
- jumpr r31
- }
-FUNCTION_END fabs
-
-FUNCTION_BEGIN fabsf
- {
- r0 = clrbit(r0, #31)
- jumpr r31
- }
-FUNCTION_END fabsf
-
- .globl fabsl
- .set fabsl, fabs
diff --git a/gnu/llvm/compiler-rt/lib/builtins/hexagon/fma_opt.S b/gnu/llvm/compiler-rt/lib/builtins/hexagon/fma_opt.S
deleted file mode 100644
index 7f566adffd6..00000000000
--- a/gnu/llvm/compiler-rt/lib/builtins/hexagon/fma_opt.S
+++ /dev/null
@@ -1,30 +0,0 @@
-//===----------------------Hexagon builtin routine ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-.macro FUNCTION_BEGIN name
-.text
-.p2align 5
-.globl \name
-.type \name, @function
-\name:
-.endm
-
-.macro FUNCTION_END name
-.size \name, . - \name
-.endm
-
-FUNCTION_BEGIN fmaf
- r2 += sfmpy(r0, r1)
- {
- r0 = r2
- jumpr r31
- }
-FUNCTION_END fmaf
-
- .globl fmal
- .set fmal, fma
diff --git a/gnu/llvm/compiler-rt/lib/builtins/hexagon/fmax_opt.S b/gnu/llvm/compiler-rt/lib/builtins/hexagon/fmax_opt.S
deleted file mode 100644
index 81d711dff8d..00000000000
--- a/gnu/llvm/compiler-rt/lib/builtins/hexagon/fmax_opt.S
+++ /dev/null
@@ -1,29 +0,0 @@
-//===----------------------Hexagon builtin routine ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-.macro FUNCTION_BEGIN name
-.text
-.p2align 5
-.globl \name
-.type \name, @function
-\name:
-.endm
-
-.macro FUNCTION_END name
-.size \name, . - \name
-.endm
-
-FUNCTION_BEGIN fmaxf
- {
- r0 = sfmax(r0, r1)
- jumpr r31
- }
-FUNCTION_END fmaxf
-
- .globl fmaxl
- .set fmaxl, fmax
diff --git a/gnu/llvm/compiler-rt/lib/builtins/hexagon/fmin_opt.S b/gnu/llvm/compiler-rt/lib/builtins/hexagon/fmin_opt.S
deleted file mode 100644
index d043f1d7a69..00000000000
--- a/gnu/llvm/compiler-rt/lib/builtins/hexagon/fmin_opt.S
+++ /dev/null
@@ -1,29 +0,0 @@
-//===----------------------Hexagon builtin routine ------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-.macro FUNCTION_BEGIN name
-.text
-.p2align 5
-.globl \name
-.type \name, @function
-\name:
-.endm
-
-.macro FUNCTION_END name
-.size \name, . - \name
-.endm
-
-FUNCTION_BEGIN fminf
- {
- r0 = sfmin(r0, r1)
- jumpr r31
- }
-FUNCTION_END fminf
-
- .globl fminl
- .set fminl, fmin
diff --git a/gnu/llvm/compiler-rt/lib/scudo/standalone/interface.h b/gnu/llvm/compiler-rt/lib/scudo/standalone/interface.h
deleted file mode 100644
index e2639823f42..00000000000
--- a/gnu/llvm/compiler-rt/lib/scudo/standalone/interface.h
+++ /dev/null
@@ -1,29 +0,0 @@
-//===-- interface.h ---------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef SCUDO_INTERFACE_H_
-#define SCUDO_INTERFACE_H_
-
-#include "internal_defs.h"
-
-extern "C" {
-
-WEAK INTERFACE const char *__scudo_default_options();
-
-// Post-allocation & pre-deallocation hooks.
-// They must be thread-safe and not use heap related functions.
-WEAK INTERFACE void __scudo_allocate_hook(void *ptr, size_t size);
-WEAK INTERFACE void __scudo_deallocate_hook(void *ptr);
-
-WEAK INTERFACE void __scudo_print_stats(void);
-
-typedef void (*iterate_callback)(uintptr_t base, size_t size, void *arg);
-
-} // extern "C"
-
-#endif // SCUDO_INTERFACE_H_