[libc-commits] [PATCH] D145452: [libc] Add riscv64 syscall implementation.

Mikhail Ramalho via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Mar 7 04:40:26 PST 2023


mikhail.ramalho added a comment.

This was enough to fix compilation, and all tests are passing:

  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/src/__support/FPUtil/FEnvImpl.h b/libc/src/__support/FPUtil/FEnvImpl.h
  index ec21555071c8..179140ae6b9b 100644
  --- a/libc/src/__support/FPUtil/FEnvImpl.h
  +++ b/libc/src/__support/FPUtil/FEnvImpl.h
  @@ -48,9 +48,9 @@ LIBC_INLINE int get_round() { return FE_TONEAREST; }
   
   LIBC_INLINE int set_round(int) { return 0; }
   
  -LIBC_INLINE int get_env(fenv_t *) { return 0; }
  +LIBC_INLINE int get_env(void *) { return 0; }
   
  -LIBC_INLINE int set_env(const fenv_t *) { return 0; }
  +LIBC_INLINE int set_env(const void *) { return 0; }
   
   } // namespace __llvm_libc::fputil
   #endif


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145452/new/

https://reviews.llvm.org/D145452



More information about the libc-commits mailing list