libroot/riscv64: minor riscv64 fixes
Change-Id: I96b604aabe18307d7376473b8d9cd50eccb537d1 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4709 Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
This commit is contained in:
parent
5070f59750
commit
ec8a8f1c02
@ -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
|
||||
|
11
src/system/libroot/os/arch/riscv64/cachectl.cpp
Normal file
11
src/system/libroot/os/arch/riscv64/cachectl.cpp
Normal file
@ -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");
|
||||
}
|
@ -32,6 +32,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
|
||||
l64a.c
|
||||
lcong48.c
|
||||
lcong48_r.c
|
||||
longlong.c
|
||||
lrand48.c
|
||||
lrand48_r.c
|
||||
mrand48.c
|
||||
|
17
src/system/libroot/posix/glibc/stdlib/longlong.c
Normal file
17
src/system/libroot/posix/glibc/stdlib/longlong.c
Normal file
@ -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
|
||||
};
|
Loading…
Reference in New Issue
Block a user