6 changes: 3 additions & 3 deletions libc/src/__support/threads/linux/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static constexpr unsigned CLONE_SYSCALL_FLAGS =

#ifdef LIBC_TARGET_ARCH_IS_AARCH64
#define CLONE_RESULT_REGISTER "x0"
#elif defined(LIBC_TARGET_ARCH_IS_RISCV64)
#elif defined(LIBC_TARGET_ARCH_IS_ANY_RISCV)
#define CLONE_RESULT_REGISTER "t0"
#elif defined(LIBC_TARGET_ARCH_IS_X86_64)
#define CLONE_RESULT_REGISTER "rax"
Expand Down Expand Up @@ -169,7 +169,7 @@ cleanup_thread_resources(ThreadAttributes *attrib) {
// is set to the stack pointer where start args are stored. So, we fetch
// from there.
return reinterpret_cast<uintptr_t>(__builtin_frame_address(1));
#elif defined(LIBC_TARGET_ARCH_IS_RISCV64)
#elif defined(LIBC_TARGET_ARCH_IS_ANY_RISCV)
// The current frame pointer is the previous stack pointer where the start
// args are stored.
return reinterpret_cast<uintptr_t>(__builtin_frame_address(0));
Expand Down Expand Up @@ -306,7 +306,7 @@ int Thread::run(ThreadStyle style, ThreadRunner runner, void *arg, void *stack,
tls.tp // The thread pointer value for the new thread.
);
#elif defined(LIBC_TARGET_ARCH_IS_AARCH64) || \
defined(LIBC_TARGET_ARCH_IS_RISCV64)
defined(LIBC_TARGET_ARCH_IS_ANY_RISCV)
long register clone_result asm(CLONE_RESULT_REGISTER);
clone_result = LIBC_NAMESPACE::syscall_impl<long>(
SYS_clone, CLONE_SYSCALL_FLAGS, adjusted_stack,
Expand Down
2 changes: 1 addition & 1 deletion libc/src/__support/threads/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ union ThreadReturnValue {

#if (defined(LIBC_TARGET_ARCH_IS_AARCH64) || \
defined(LIBC_TARGET_ARCH_IS_X86_64) || \
defined(LIBC_TARGET_ARCH_IS_RISCV64))
defined(LIBC_TARGET_ARCH_IS_ANY_RISCV))
constexpr unsigned int STACK_ALIGNMENT = 16;
#endif
// TODO: Provide stack alignment requirements for other architectures.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include <setjmp.h>

#if !defined(LIBC_TARGET_ARCH_IS_RISCV64)
#if !defined(LIBC_TARGET_ARCH_IS_ANY_RISCV)
#error "Invalid file include"
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <setjmp.h>

#if !defined(LIBC_TARGET_ARCH_IS_RISCV64)
#if !defined(LIBC_TARGET_ARCH_IS_ANY_RISCV)
#error "Invalid file include"
#endif

Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion libc/test/src/fenv/enabled_exceptions_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
// This test enables an exception and verifies that raising that exception
// triggers SIGFPE.
TEST(LlvmLibcExceptionStatusTest, RaiseAndCrash) {
#if defined(LIBC_TARGET_ARCH_IS_ANY_ARM) || defined(LIBC_TARGET_ARCH_IS_RISCV64)
#if defined(LIBC_TARGET_ARCH_IS_ANY_ARM) || \
defined(LIBC_TARGET_ARCH_IS_ANY_RISCV)
// Few Arm HW implementations do not trap exceptions. We skip this test
// completely on such HW.
//
Expand Down
3 changes: 2 additions & 1 deletion libc/test/src/fenv/feenableexcept_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
#include <fenv.h>

TEST(LlvmLibcFEnvTest, EnableTest) {
#if defined(LIBC_TARGET_ARCH_IS_ANY_ARM) || defined(LIBC_TARGET_ARCH_IS_RISCV64)
#if defined(LIBC_TARGET_ARCH_IS_ANY_ARM) || \
defined(LIBC_TARGET_ARCH_IS_ANY_RISCV)
// Few Arm HW implementations do not trap exceptions. We skip this test
// completely on such HW.
//
Expand Down
3 changes: 2 additions & 1 deletion libc/test/src/fenv/feholdexcept_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
#include <fenv.h>

TEST(LlvmLibcFEnvTest, RaiseAndCrash) {
#if defined(LIBC_TARGET_ARCH_IS_ANY_ARM) || defined(LIBC_TARGET_ARCH_IS_RISCV64)
#if defined(LIBC_TARGET_ARCH_IS_ANY_ARM) || \
defined(LIBC_TARGET_ARCH_IS_ANY_RISCV)
// Few Arm HW implementations do not trap exceptions. We skip this test
// completely on such HW.
//
Expand Down