Use inline sqrt.s instruction
This commit is contained in:
parent
86feae85c1
commit
c9879d9516
|
|
@ -157,7 +157,6 @@
|
|||
build/ROMID/lib/ultra/os/thread.o (section); \
|
||||
build/ROMID/lib/ultra/os/destroythread.o (section); \
|
||||
build/ROMID/lib/ultra/gu/mtxutil.o (section); \
|
||||
build/ROMID/lib/ultra/gu/sqrtf.o (section); \
|
||||
build/ROMID/lib/ultra/libc/string.o (section); \
|
||||
build/ROMID/lib/ultra/libc/ldiv.o (section); \
|
||||
build/ROMID/lib/ultra/io/siacs.o (section); \
|
||||
|
|
|
|||
|
|
@ -42,6 +42,13 @@
|
|||
#define FRAMEBUFFER_SIZE (320 * 220 * sizeof(u16))
|
||||
#define UNCACHED(x) ((void *)((u32)(x)|0xa0000000))
|
||||
|
||||
inline float sqrtf(float value)
|
||||
{
|
||||
float ret;
|
||||
__asm__ ("sqrt.s %0, %1" : "=f"(ret) : "f"(value));
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define VALIDWEAPON() (g_Vars.currentplayer->gunctrl.weaponnum >= WEAPON_UNARMED && g_Vars.currentplayer->gunctrl.weaponnum <= WEAPON_COMBATBOOST)
|
||||
#define FUNCISSEC() (VALIDWEAPON() && (g_PlayerConfigsArray[g_Vars.currentplayerstats->mpindex].gunfuncs[(g_Vars.currentplayer->gunctrl.weaponnum - 1) >> 3] & (1 << ((g_Vars.currentplayer->gunctrl.weaponnum - 1) & 7))))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
#include "macros.inc"
|
||||
|
||||
.section .text
|
||||
|
||||
glabel sqrtf
|
||||
sqrt.s $f0, $f12
|
||||
jr $ra
|
||||
Loading…
Reference in New Issue