diff --git a/src/system/libroot/os/arch/riscv64/Jamfile b/src/system/libroot/os/arch/riscv64/Jamfile index 57a3befd34..9b7898685c 100644 --- a/src/system/libroot/os/arch/riscv64/Jamfile +++ b/src/system/libroot/os/arch/riscv64/Jamfile @@ -22,6 +22,8 @@ for architectureObject in [ MultiArchSubDirSetup riscv64 ] { time.cpp thread.cpp + cachectl.cpp + generic_atomic.cpp generic_stack_trace.cpp generic_system_time_nsecs.cpp diff --git a/src/system/libroot/os/arch/riscv64/cachectl.cpp b/src/system/libroot/os/arch/riscv64/cachectl.cpp new file mode 100644 index 0000000000..616290c169 --- /dev/null +++ b/src/system/libroot/os/arch/riscv64/cachectl.cpp @@ -0,0 +1,11 @@ +/* + * Copyright 2021, Haiku, Inc. + * Distributed under the terms of the MIT License. + */ + + +extern "C" void +__riscv_flush_icache(void *start, void *end, unsigned long int flags) +{ + __asm__ volatile ("fence.i"); +} diff --git a/src/system/libroot/posix/glibc/stdlib/Jamfile b/src/system/libroot/posix/glibc/stdlib/Jamfile index 7cbfd480d5..39626b462b 100644 --- a/src/system/libroot/posix/glibc/stdlib/Jamfile +++ b/src/system/libroot/posix/glibc/stdlib/Jamfile @@ -32,6 +32,7 @@ for architectureObject in [ MultiArchSubDirSetup ] { l64a.c lcong48.c lcong48_r.c + longlong.c lrand48.c lrand48_r.c mrand48.c diff --git a/src/system/libroot/posix/glibc/stdlib/longlong.c b/src/system/libroot/posix/glibc/stdlib/longlong.c new file mode 100644 index 0000000000..064c4ef1b6 --- /dev/null +++ b/src/system/libroot/posix/glibc/stdlib/longlong.c @@ -0,0 +1,17 @@ +/* + * Copyright 2021, Haiku, Inc. + * Distributed under the terms of the MIT License. + */ + + +const char __clz_tab[256] = +{ + 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8 +};