Fix spurious differences when using ninja diff (#2294)

* Fix spurious differences when using ninja diff

* Fix some clangd errors/warnings
This commit is contained in:
LagoLunatic
2025-01-27 01:01:05 -05:00
committed by GitHub
parent 5644936254
commit bf4053fefa
48 changed files with 296 additions and 140 deletions
+6 -1
View File
@@ -39,6 +39,7 @@ inline void C_VECAdd(register const Vec* a, register const Vec* b, register Vec*
register f32 az;
register f32 sumz;
register f32 bz;
#ifdef __MWERKS__
asm {
psq_l axy, 0(a), 0, 0
psq_l bxy, 0(b), 0, 0
@@ -49,6 +50,7 @@ inline void C_VECAdd(register const Vec* a, register const Vec* b, register Vec*
ps_add sumz, az, bz
psq_st sumz, 8(ab), 1, 0
}
#endif
}
inline void C_VECSubtract(register const Vec* a, register const Vec* b, register Vec* ab) {
@@ -57,6 +59,7 @@ inline void C_VECSubtract(register const Vec* a, register const Vec* b, register
register f32 az;
register f32 subz;
register f32 bz;
#ifdef __MWERKS__
asm {
psq_l axy, 0(a), 0, 0
psq_l bxy, 0(b), 0, 0
@@ -67,6 +70,7 @@ inline void C_VECSubtract(register const Vec* a, register const Vec* b, register
ps_sub subz, az, bz
psq_st subz, 8(ab), 1, 0
}
#endif
}
inline f32 C_VECSquareMag(const Vec* v) {
@@ -74,6 +78,7 @@ inline f32 C_VECSquareMag(const Vec* v) {
register f32 z;
register f32 res;
register const f32* src = &v->x;
#ifdef __MWERKS__
asm {
psq_l x_y, 0(src), 0, 0
ps_mul x_y, x_y, x_y
@@ -81,7 +86,7 @@ inline f32 C_VECSquareMag(const Vec* v) {
ps_madd res, z, z, x_y
ps_sum0 res, res, x_y, x_y
}
;
#endif
return res;
}
+27 -21
View File
@@ -5,27 +5,27 @@
#include "macros.h"
#include "dolphin/dvd.h"
#include "dolphin/os/OSAlarm.h"
#include "dolphin/os/OSAlloc.h"
#include "dolphin/os/OSArena.h"
#include "dolphin/os/OSAudioSystem.h"
#include "dolphin/os/OSCache.h"
#include "dolphin/os/OSContext.h"
#include "dolphin/os/OSError.h"
#include "dolphin/os/OSExec.h"
#include "dolphin/os/OSFont.h"
#include "dolphin/os/OSInterrupt.h"
#include "dolphin/os/OSLink.h"
#include "dolphin/os/OSMemory.h"
#include "dolphin/os/OSMessage.h"
#include "dolphin/os/OSMutex.h"
#include "dolphin/os/OSReboot.h"
#include "dolphin/os/OSReset.h"
#include "dolphin/os/OSResetSW.h"
#include "dolphin/os/OSRtc.h"
#include "dolphin/os/OSSync.h"
#include "dolphin/os/OSThread.h"
#include "dolphin/os/OSTime.h"
#include "dolphin/os/OSAlarm.h" // IWYU pragma: export
#include "dolphin/os/OSAlloc.h" // IWYU pragma: export
#include "dolphin/os/OSArena.h" // IWYU pragma: export
#include "dolphin/os/OSAudioSystem.h" // IWYU pragma: export
#include "dolphin/os/OSCache.h" // IWYU pragma: export
#include "dolphin/os/OSContext.h" // IWYU pragma: export
#include "dolphin/os/OSError.h" // IWYU pragma: export
#include "dolphin/os/OSExec.h" // IWYU pragma: export
#include "dolphin/os/OSFont.h" // IWYU pragma: export
#include "dolphin/os/OSInterrupt.h" // IWYU pragma: export
#include "dolphin/os/OSLink.h" // IWYU pragma: export
#include "dolphin/os/OSMemory.h" // IWYU pragma: export
#include "dolphin/os/OSMessage.h" // IWYU pragma: export
#include "dolphin/os/OSMutex.h" // IWYU pragma: export
#include "dolphin/os/OSReboot.h" // IWYU pragma: export
#include "dolphin/os/OSReset.h" // IWYU pragma: export
#include "dolphin/os/OSResetSW.h" // IWYU pragma: export
#include "dolphin/os/OSRtc.h" // IWYU pragma: export
#include "dolphin/os/OSSync.h" // IWYU pragma: export
#include "dolphin/os/OSThread.h" // IWYU pragma: export
#include "dolphin/os/OSTime.h" // IWYU pragma: export
void OSReportInit(void);
void OSSwitchFiberEx(u32, u32, u32, u32, u32, u32);
@@ -145,10 +145,12 @@ inline s16 __OSf32tos16(register f32 inF) {
u32 tmp;
register u32* tmpPtr = &tmp;
// clang-format off
#ifdef __MWERKS__
asm {
psq_st inF, 0(tmpPtr), 0x1, 5
lha out, 0(tmpPtr)
}
#endif
// clang-format on
return out;
@@ -163,10 +165,12 @@ inline u8 __OSf32tou8(register f32 inF) {
u32 tmp;
register u32* tmpPtr = &tmp;
// clang-format off
#ifdef __MWERKS__
asm {
psq_st inF, 0(tmpPtr), 0x1, 2
lbz out, 0(tmpPtr)
}
#endif
// clang-format on
return out;
@@ -178,6 +182,7 @@ inline void OSf32tou8(f32* f, u8* out) {
static inline void OSInitFastCast(void) {
// clang-format off
#ifdef __MWERKS__
asm {
li r3, 4
oris r3, r3, 4
@@ -192,6 +197,7 @@ static inline void OSInitFastCast(void) {
oris r3, r3, 7
mtspr 0x395, r3
}
#endif
// clang-format on
}