[libc-commits] [PATCH] D145594: [libc] Add fenv_t and signal macros in riscv

Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Mar 8 12:34:47 PST 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe9be85da8bad: [libc] Add fenv_t and signal macros in riscv (authored by Mikhail R. Gadelha <mikhail at igalia.com>).

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.503473.patch
Type: text/x-patch
Size: 1341 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230308/38302f65/attachment.bin>


More information about the libc-commits mailing list