1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-10 19:20:13 +00:00

fix warnings

This commit is contained in:
fig02 2022-02-12 20:45:32 -05:00
parent 94af6977b3
commit d729ddf457
2 changed files with 32 additions and 13 deletions

View file

@ -9,7 +9,6 @@ f32 fabsf(f32 f);
f32 __floatundisf(u32 c); f32 __floatundisf(u32 c);
f64 __floatundidf(u32 c); f64 __floatundidf(u32 c);
f32 __powisf2(f32 a, s32 b); f32 __powisf2(f32 a, s32 b);
unsigned long __udivdi3(unsigned long a, unsigned long b);
#else #else
#pragma intrinsic(fabsf) #pragma intrinsic(fabsf)
#endif #endif

View file

@ -91,7 +91,9 @@ f32 __powisf2(f32 a, s32 b) {
return recip ? 1 / r : r; return recip ? 1 / r : r;
} }
unsigned long __umoddi3(unsigned long a, unsigned long b) { u64 __umoddi3(u64 a, u64 b) {
u64 ret;
__asm__(".set push;" __asm__(".set push;"
".set noat;" ".set noat;"
".set noreorder;" ".set noreorder;"
@ -110,11 +112,16 @@ unsigned long __umoddi3(unsigned long a, unsigned long b) {
"mfhi $v0;" "mfhi $v0;"
"dsll32 $v1, $v0, 0;" "dsll32 $v1, $v0, 0;"
"dsra32 $v1, $v1, 0;" "dsra32 $v1, $v1, 0;"
"dsra32 $v0, $v0, 0;" "dsra32 %0, $v0, 0;"
".set pop;"); ".set pop;"
: "=r"(ret));
return ret;
} }
unsigned long __udivdi3(unsigned long a, unsigned long b) { u64 __udivdi3(u64 a, u64 b) {
u64 ret;
__asm__(".set push;" __asm__(".set push;"
".set noat;" ".set noat;"
".set noreorder;" ".set noreorder;"
@ -133,11 +140,16 @@ unsigned long __udivdi3(unsigned long a, unsigned long b) {
"mflo $v0;" "mflo $v0;"
"dsll32 $v1, $v0, 0;" "dsll32 $v1, $v0, 0;"
"dsra32 $v1, $v1, 0;" "dsra32 $v1, $v1, 0;"
" dsra32 $v0, $v0, 0;" " dsra32 %0, $v0, 0;"
".set pop;"); ".set pop;"
: "=r"(ret));
return ret;
} }
long __moddi3(long a, long b) { s64 __moddi3(s64 a, s64 b) {
s64 ret;
__asm__(".set push;" __asm__(".set push;"
".set noat;" ".set noat;"
".set noreorder;" ".set noreorder;"
@ -156,11 +168,16 @@ long __moddi3(long a, long b) {
"mfhi $v0;" "mfhi $v0;"
"dsll32 $v1, $v0, 0;" "dsll32 $v1, $v0, 0;"
"dsra32 $v1, $v1, 0;" "dsra32 $v1, $v1, 0;"
" dsra32 $v0, $v0, 0;" " dsra32 %0, $v0, 0;"
".set pop;"); ".set pop;"
: "=r"(ret));
return ret;
} }
long __divdi3(long a, long b) { s64 __divdi3(s64 a, s64 b) {
s64 ret;
__asm__(".set push;" __asm__(".set push;"
".set noat;" ".set noat;"
".set noreorder;" ".set noreorder;"
@ -188,8 +205,11 @@ long __divdi3(long a, long b) {
"mflo $v0;" "mflo $v0;"
"dsll32 $v1, $v0, 0;" "dsll32 $v1, $v0, 0;"
"dsra32 $v1, $v1, 0;" "dsra32 $v1, $v1, 0;"
" dsra32 $v0, $v0, 0;" " dsra32 %0, $v0, 0;"
".set pop;"); ".set pop;"
: "=r"(ret));
return ret;
} }
#endif #endif