diff --git a/libc/include/llvm-libc-macros/linux/signal-macros.h b/libc/include/llvm-libc-macros/linux/signal-macros.h index 069a233477979..4dc39dec47de8 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 3e33a1727b333..6d2bea74560db 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 diff --git a/libc/src/__support/FPUtil/FEnvImpl.h b/libc/src/__support/FPUtil/FEnvImpl.h index 43980a87afc64..ee2bd16e821d9 100644 --- a/libc/src/__support/FPUtil/FEnvImpl.h +++ b/libc/src/__support/FPUtil/FEnvImpl.h @@ -46,6 +46,10 @@ LIBC_INLINE int set_except(int) { return 0; } 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; }