Add byteorder.S for ARM64
Change-Id: I346e83683ad2318948914c5027123f84d4038451 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3737 Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com> Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
parent
fecc9c1295
commit
d81df6ce84
@ -9,6 +9,7 @@ SEARCH_SOURCE += [ FDirName $(librootSources) os arch $(TARGET_ARCH) ] ;
|
||||
SEARCH_SOURCE += [ FDirName $(librootSources) os arch generic ] ;
|
||||
|
||||
KernelMergeObject kernel_os_arch_$(TARGET_ARCH).o :
|
||||
byteorder.S
|
||||
generic_atomic.cpp
|
||||
generic_system_time_nsecs.cpp
|
||||
|
||||
@ -24,7 +25,7 @@ KernelMergeObject kernel_lib_posix_arch_$(TARGET_ARCH).o :
|
||||
sigsetjmp.S
|
||||
kernel_longjmp_return.c
|
||||
kernel_setjmp_save_sigs.c
|
||||
|
||||
|
||||
arch_string.S
|
||||
memset.c
|
||||
memcpy.c
|
||||
|
@ -13,11 +13,12 @@ for architectureObject in [ MultiArchSubDirSetup arm64 ] {
|
||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ;
|
||||
|
||||
MergeObject <$(architecture)>os_arch_$(TARGET_ARCH).o :
|
||||
tls.c
|
||||
thread.c
|
||||
system_time.c
|
||||
time.c
|
||||
byteorder.S
|
||||
get_stack_frame.S
|
||||
system_time.c
|
||||
thread.c
|
||||
time.c
|
||||
tls.c
|
||||
|
||||
generic_atomic.cpp
|
||||
generic_stack_trace.cpp
|
||||
|
26
src/system/libroot/os/arch/arm64/byteorder.S
Normal file
26
src/system/libroot/os/arch/arm64/byteorder.S
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright 2021, Haiku, Inc. All rights reserved.
|
||||
* Released under the terms of the MIT License
|
||||
*/
|
||||
|
||||
|
||||
#include <asm_defs.h>
|
||||
|
||||
.text
|
||||
|
||||
/* float __swap_float(float value) */
|
||||
FUNCTION(__swap_float):
|
||||
fmov s0, w0 // Bitcopy float to general register
|
||||
rev w0, w0 // GCC8.3 does this for __builtin_bswap32
|
||||
fmov w0, s0 // and back
|
||||
ret
|
||||
FUNCTION_END(__swap_float)
|
||||
|
||||
|
||||
/* double __swap_double(double value) */
|
||||
FUNCTION(__swap_double):
|
||||
fmov d0, x0 // Bitcopy double to general register
|
||||
rev x0, x0 // GCC8.3 does this for __builtin_bswap64
|
||||
fmov x0, d0 // and back
|
||||
ret
|
||||
FUNCTION_END(__swap_double)
|
Loading…
Reference in New Issue
Block a user