summaryrefslogtreecommitdiff
path: root/libc/include
diff options
context:
space:
mode:
authorMikhail R. Gadelha <mikhail@igalia.com>2023-03-08 17:31:18 -0300
committerMikhail R. Gadelha <mikhail@igalia.com>2023-03-08 17:31:58 -0300
commite9be85da8bad26146078f6888cc516ff83d5e7b4 (patch)
treec84a0e5c0f6fe663cbb629ad52e71fdc5e4d3a26 /libc/include
parent117db47d02c174e2ec039fa8b6a97381106e6238 (diff)
downloadllvm-e9be85da8bad26146078f6888cc516ff83d5e7b4.tar.gz
[libc] Add fenv_t and signal macros in riscv
This patch now enables full build. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D145594
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/llvm-libc-macros/linux/signal-macros.h3
-rw-r--r--libc/include/llvm-libc-types/fenv_t.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/libc/include/llvm-libc-macros/linux/signal-macros.h b/libc/include/llvm-libc-macros/linux/signal-macros.h
index 069a23347797..4dc39dec47de 100644
--- a/libc/include/llvm-libc-macros/linux/signal-macros.h
+++ b/libc/include/llvm-libc-macros/linux/signal-macros.h
@@ -82,6 +82,9 @@
#elif defined(__aarch64__)
#define MINSIGSTKSZ 5120
#define SIGSTKSZ 16384
+#elif defined(__riscv)
+#define MINSIGSTKSZ 2048
+#define SIGSTKSZ 8192
#else
#error "Signal stack sizes not defined for your platform."
#endif
diff --git a/libc/include/llvm-libc-types/fenv_t.h b/libc/include/llvm-libc-types/fenv_t.h
index 3e33a1727b33..6d2bea74560d 100644
--- a/libc/include/llvm-libc-types/fenv_t.h
+++ b/libc/include/llvm-libc-types/fenv_t.h
@@ -23,6 +23,8 @@ typedef struct {
typedef struct {
unsigned int __fpscr;
} fenv_t;
+#elif defined(__riscv)
+typedef unsigned int fenv_t;
#else
#error "fenv_t not defined for your platform"
#endif