mirror of
https://github.com/projectPiki/pikmin2.git
synced 2024-11-23 05:20:06 +00:00
Missed a few asms (#189)
This commit is contained in:
parent
6a063cf4fc
commit
bdfec551a2
@ -14,7 +14,9 @@ inline f32 sqrtf(f32& __sqrtf_g)
|
||||
{
|
||||
if ((__sqrtf_g > 0.0f)) {
|
||||
f32 __sqrtf_h;
|
||||
#ifdef __MWERKS__ // clang-format off
|
||||
FRSQRTE(__sqrtf_g, &__sqrtf_h);
|
||||
#endif // clang-format on
|
||||
__sqrtf_g = __sqrtf_h * __sqrtf_g;
|
||||
}
|
||||
return __sqrtf_g;
|
||||
@ -24,7 +26,9 @@ inline f32 sqrtf2(f32& __sqrtf_g)
|
||||
{
|
||||
if ((__sqrtf_g > 0.0f)) {
|
||||
f32 __sqrtf_h;
|
||||
#ifdef __MWERKS__ // clang-format off
|
||||
FRSQRTE(__sqrtf_g, &__sqrtf_h);
|
||||
#endif // clang-format on
|
||||
__sqrtf_g = __sqrtf_h * __sqrtf_g;
|
||||
return __sqrtf_g;
|
||||
}
|
||||
@ -47,9 +51,9 @@ inline void __sqrtf(register f32 x, f32* val)
|
||||
if (x > 0.0f) {
|
||||
if (x > 0.0f) {
|
||||
register f32 reg_f0;
|
||||
asm {
|
||||
frsqrte reg_f0, x
|
||||
}
|
||||
#ifdef __MWERKS__ // clang-format off
|
||||
asm { frsqrte reg_f0, x }
|
||||
#endif // clang-format on
|
||||
*val = reg_f0 * x;
|
||||
}
|
||||
} else {
|
||||
|
@ -1388,7 +1388,7 @@ _FCEB_Done:
|
||||
#endif // clang-format on
|
||||
return tmp;
|
||||
|
||||
_Read4 : {
|
||||
_Read4: {
|
||||
register u32 maxcodebase = (u32) & (h->maxCode);
|
||||
register u32 tmp2;
|
||||
|
||||
@ -1454,7 +1454,7 @@ _FailedCheckEnoughbits_Updated:
|
||||
goto __CODE_PLUS_VP_CNT;
|
||||
|
||||
_FailedCheckNoBits0:
|
||||
_FailedCheckNoBits1 :
|
||||
_FailedCheckNoBits1:
|
||||
|
||||
{
|
||||
register u32 mask = 0xFFFFFFFF << (33 - cnt);
|
||||
@ -1837,7 +1837,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block)
|
||||
cnt = (u32)code;
|
||||
goto _DoneDecodeTab;
|
||||
|
||||
_getfullword : {
|
||||
_getfullword: {
|
||||
#ifdef __MWERKS__ // clang-format off
|
||||
asm {
|
||||
lwzu cb, 4(tmp);
|
||||
@ -1886,7 +1886,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block)
|
||||
|
||||
goto _DoneDecodeTab;
|
||||
|
||||
_Read4 : {
|
||||
_Read4: {
|
||||
register u32 maxcodebase = (u32) & (h->maxCode);
|
||||
register u32 tmp2;
|
||||
|
||||
@ -1916,7 +1916,7 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block)
|
||||
|
||||
_FailedCheckNoBits0:
|
||||
_FailedCheckNoBits1:
|
||||
_REALFAILEDCHECKNOBITS : {
|
||||
_REALFAILEDCHECKNOBITS: {
|
||||
register u32 mask = 0xFFFFFFFF << (33 - cnt);
|
||||
register u32 tmp2;
|
||||
register u32 tmp3;
|
||||
@ -1982,10 +1982,6 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block)
|
||||
slw tmp1,cb,cnt1;
|
||||
subfic v,rrrr,32;
|
||||
srw ssss,tmp1,v;
|
||||
}
|
||||
#endif // clang-format on
|
||||
#ifdef __MWERKS__ // clang-format off
|
||||
asm {
|
||||
b _RECVDone;
|
||||
_RECVnotEnoughBits:
|
||||
lwz tmp1, info->c;
|
||||
@ -2021,10 +2017,10 @@ static void __THPHuffDecodeDCTCompY(register THPFileInfo* info, THPCoeff* block)
|
||||
};
|
||||
|
||||
#ifdef __MWERKS__ // clang-format off
|
||||
asm {
|
||||
_RECV_END:
|
||||
}
|
||||
#endif // clang-format on
|
||||
asm { _RECV_END: }
|
||||
#else // clang-format on
|
||||
_RECV_END: // Exists just to shut up VSCode
|
||||
#endif
|
||||
}
|
||||
info->cnt = cnt;
|
||||
info->currByte = cb;
|
||||
|
@ -217,10 +217,12 @@ u32 CellPyramid::getCheckCount() { return mPassID; }
|
||||
// register float reg2 = 0.0f;
|
||||
// register float result;
|
||||
|
||||
// #ifdef __MWERKS__ // clang-format off
|
||||
// asm {
|
||||
// frsqrte reg2, reg1
|
||||
// fmuls result, reg2, reg1
|
||||
// }
|
||||
// #endif // clang-format on
|
||||
|
||||
// return result;
|
||||
// }
|
||||
|
@ -66,9 +66,9 @@ f32 pikmin2_sqrtf(register f32 x)
|
||||
{
|
||||
if (x > 0.0f) {
|
||||
register f32 reg_f0;
|
||||
asm {
|
||||
frsqrte reg_f0, x
|
||||
}
|
||||
#ifdef __MWERKS__ // clang-format off
|
||||
asm { frsqrte reg_f0, x }
|
||||
#endif // clang-format off
|
||||
return reg_f0 * x;
|
||||
}
|
||||
return x;
|
||||
|
Loading…
Reference in New Issue
Block a user