sparc: add float/double swapping functions.
Change-Id: I07590af796d689b5e97c03a97727edfd58f5a811 Reviewed-on: https://review.haiku-os.org/c/1183 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
c3ba570c08
commit
464b202703
@ -13,6 +13,8 @@ for architectureObject in [ MultiArchSubDirSetup sparc ] {
|
|||||||
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ;
|
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ;
|
||||||
|
|
||||||
MergeObject <$(architecture)>os_arch_$(TARGET_ARCH).o :
|
MergeObject <$(architecture)>os_arch_$(TARGET_ARCH).o :
|
||||||
|
byteorder.S
|
||||||
|
|
||||||
stack_frame.c
|
stack_frame.c
|
||||||
system_time.c
|
system_time.c
|
||||||
thread.c
|
thread.c
|
||||||
|
32
src/system/libroot/os/arch/sparc/byteorder.S
Normal file
32
src/system/libroot/os/arch/sparc/byteorder.S
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2019, Adrien Destugues, pulkomandy@pulkomandy.tk
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <asm_defs.h>
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
|
// These function use the unused parameters slots on the stack (reserved for
|
||||||
|
// arguments that are in fact passed in registers) for temporary storage.
|
||||||
|
// %o0 is corrupt, but it is a scratch register so this should be fine.
|
||||||
|
|
||||||
|
/* float __swap_float(float value)
|
||||||
|
*/
|
||||||
|
FUNCTION(__swap_float):
|
||||||
|
add %sp, 2175, %o0
|
||||||
|
st %d0, [%o0]
|
||||||
|
lda [%o0] 0x88, %d0
|
||||||
|
return
|
||||||
|
FUNCTION_END(__swap_float)
|
||||||
|
|
||||||
|
|
||||||
|
/* double __swap_double(double value)
|
||||||
|
*/
|
||||||
|
FUNCTION(__swap_double):
|
||||||
|
add %sp, 2175, %o0
|
||||||
|
std %d0, [%o0]
|
||||||
|
ldda [%o0] 0x88, %d0
|
||||||
|
return
|
||||||
|
FUNCTION_END(__swap_double)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user