[libc-commits] [PATCH] D145594: [libc] Add fenv_t and signal macros in riscv
Mikhail Ramalho via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Mar 8 10:08:18 PST 2023
mikhail.ramalho updated this revision to Diff 503430.
mikhail.ramalho added a comment.
- Removed unnecessary define from app.h (for full build)
- Fix riscv define in the wrong place in fenv_t.h
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145594/new/
https://reviews.llvm.org/D145594
Files:
libc/include/llvm-libc-macros/linux/signal-macros.h
libc/include/llvm-libc-types/fenv_t.h
libc/src/__support/FPUtil/FEnvImpl.h
Index: libc/src/__support/FPUtil/FEnvImpl.h
===================================================================
--- libc/src/__support/FPUtil/FEnvImpl.h
+++ libc/src/__support/FPUtil/FEnvImpl.h
@@ -46,6 +46,10 @@
LIBC_INLINE int raise_except(int) { return 0; }
+LIBC_INLINE int enable_except(int) { return 0; }
+
+LIBC_INLINE int disable_except(int) { return 0; }
+
LIBC_INLINE int get_round() { return FE_TONEAREST; }
LIBC_INLINE int set_round(int) { return 0; }
Index: libc/include/llvm-libc-types/fenv_t.h
===================================================================
--- libc/include/llvm-libc-types/fenv_t.h
+++ libc/include/llvm-libc-types/fenv_t.h
@@ -23,6 +23,8 @@
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
Index: libc/include/llvm-libc-macros/linux/signal-macros.h
===================================================================
--- libc/include/llvm-libc-macros/linux/signal-macros.h
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145594.503430.patch
Type: text/x-patch
Size: 1341 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230308/74e5797d/attachment.bin>
More information about the libc-commits
mailing list