Fix GCC building (#702)

This commit is contained in:
Fazana
2025-08-30 17:30:43 +01:00
committed by GitHub
parent 055f9db867
commit d389f4b9bd
2 changed files with 7 additions and 3 deletions
+3 -3
View File
@@ -36,15 +36,15 @@ lldiv_t lldiv(long long num, long long denom) {
#ifdef __GNUC__
u64 __lshrdi3(u64 u, unsigned int b) {
__attribute__((optimize("O2"))) u64 __lshrdi3(u64 u, unsigned int b) {
return u >> b;
}
u64 __ashldi3(u64 u, unsigned int b) {
__attribute__((optimize("O2"))) u64 __ashldi3(u64 u, unsigned int b) {
return u << b;
}
s64 __ashrdi3(s64 u, unsigned int b) {
__attribute__((optimize("O2"))) s64 __ashrdi3(s64 u, unsigned int b) {
return u >> b;
}
#endif
+4
View File
@@ -10554,7 +10554,11 @@ void postrace_load(void) {
gPostRace.unk0_s32++;
return;
}
#ifdef AVOID_UB
temp_a0 = gRaceResultsObjectIndices[gPostRace.unk0_s32 - 10];
#else // This relies on the data laid out as is in memory, since the var itself is only 2 entries big.
temp_a0 = D_800E0A10[gPostRace.unk0_s32];
#endif
if (temp_a0 == -1) {
menu_imagegroup_load(gRaceResultsImageIndices);
menu_racer_portraits();