"Do" s_copysign.c

This commit is contained in:
intns 2021-10-17 21:53:37 +01:00
parent aef7c5ca0e
commit 6e234bc1ad
2 changed files with 6 additions and 15 deletions

View File

@ -312,7 +312,7 @@ TEXT_O_FILES:=\
$(BUILD_DIR)/asm/Dolphin/k_tan.o\
$(BUILD_DIR)/asm/Dolphin/s_atan.o\
$(BUILD_DIR)/asm/Dolphin/s_ceil.o\
$(BUILD_DIR)/asm/Dolphin/s_copysign.o\
$(BUILD_DIR)/src/Dolphin/s_copysign.o\
$(BUILD_DIR)/asm/Dolphin/s_cos.o\
$(BUILD_DIR)/asm/Dolphin/s_floor.o\
$(BUILD_DIR)/asm/Dolphin/s_frexp.o\

View File

@ -5,19 +5,10 @@
* Address: 800CF28C
* Size: 000028
*/
void copysign(void)
#define GET_4BYTE(x) (*(int*)&x)
double copysign(double x, double y)
{
/*
.loc_0x0:
stwu r1, -0x20(r1)
stfd f1, 0x8(r1)
stfd f2, 0x10(r1)
lwz r3, 0x8(r1)
lwz r0, 0x10(r1)
rlwimi r0,r3,0,1,31
stw r0, 0x8(r1)
lfd f1, 0x8(r1)
addi r1, r1, 0x20
blr
*/
GET_4BYTE(x) = (GET_4BYTE(x) & 0x7fffffff) | (GET_4BYTE(y) & 0x80000000);
return x;
}