diff --git a/.clangd b/.clangd index aed8f88e8..893158290 100644 --- a/.clangd +++ b/.clangd @@ -1,7 +1,6 @@ # https://clangd.llvm.org/config CompileFlags: Add: [ - "-fdeclspec", "-Wno-c++11-compat-deprecated-writable-strings", "-Wno-undefined-inline", "-Wno-multichar", diff --git a/include/global.h b/include/global.h index 42687f340..a9b9932b3 100644 --- a/include/global.h +++ b/include/global.h @@ -44,7 +44,6 @@ extern int __cntlzw(uint); extern int __rlwimi(int, int, int, int, int); extern void __dcbz(void*, int); -extern void __sync(); #define VERSION_JPN 0 #define VERSION_USA 1 diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c index 81d812560..5a7863be0 100644 --- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/e_atan2.c @@ -40,7 +40,6 @@ */ #include "fdlibm.h" -#include "math.h" #ifdef __STDC__ static const double @@ -141,4 +140,4 @@ double __ieee754_atan2(y, x) double y, x; default: /* case 3 */ return (z - pi_lo) - pi; /* atan(-,-) */ } -} +} \ No newline at end of file diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_atan.c b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_atan.c index e771307b9..0f88ef2fc 100644 --- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_atan.c +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common_Embedded/Math/Double_precision/s_atan.c @@ -33,7 +33,6 @@ */ #include "fdlibm.h" -#include "math.h" #ifdef __STDC__ static const double atanhi[] = { @@ -141,4 +140,4 @@ double atan(x) double x; z = atanhi[id] - ((x * (s1 + s2) - atanlo[id]) - x); return (hx < 0) ? -z : z; } -} +} \ No newline at end of file diff --git a/src/dolphin/os/OSCache.c b/src/dolphin/os/OSCache.c index 99a41efb2..d39e8b143 100644 --- a/src/dolphin/os/OSCache.c +++ b/src/dolphin/os/OSCache.c @@ -5,7 +5,6 @@ static ASM void DCEnable(void) { // clang-format off -#ifdef __MWERKS__ nofralloc sync @@ -14,13 +13,11 @@ static ASM void DCEnable(void) { mtspr 0x3F0, r3 blr -#endif // clang-format on } ASM void DCInvalidateRange(register void* start, register u32 nBytes) { // clang-format off -#ifdef __MWERKS__ nofralloc cmplwi nBytes, 0 @@ -38,13 +35,11 @@ do_invalidate: bdnz do_invalidate blr -#endif // clang-format on } ASM void DCFlushRange(register void* start, register u32 nBytes) { // clang-format off -#ifdef __MWERKS__ nofralloc cmplwi nBytes, 0 @@ -63,13 +58,11 @@ do_flush: sc blr -#endif // clang-format on } ASM void DCStoreRange(register void* start, register u32 nBytes) { // clang-format off -#ifdef __MWERKS__ nofralloc cmplwi nBytes, 0 @@ -88,13 +81,11 @@ do_store: sc blr -#endif // clang-format on } ASM void DCFlushRangeNoSync(register void* start, register u32 nBytes) { // clang-format off -#ifdef __MWERKS__ nofralloc cmplwi nBytes, 0 @@ -112,13 +103,11 @@ do_flush: bdnz do_flush blr -#endif // clang-format on } ASM void DCStoreRangeNoSync(register void* start, register u32 nBytes) { // clang-format off -#ifdef __MWERKS__ nofralloc cmplwi nBytes, 0 @@ -136,13 +125,11 @@ do_store: bdnz do_store blr -#endif // clang-format on } ASM void DCZeroRange(register void* start, register u32 nBytes) { // clang-format off -#ifdef __MWERKS__ nofralloc cmplwi nBytes, 0 @@ -160,13 +147,11 @@ do_zero: bdnz do_zero blr -#endif // clang-format on } ASM void ICInvalidateRange(register void* start, register u32 nBytes) { // clang-format off -#ifdef __MWERKS__ nofralloc cmplwi nBytes, 0 @@ -187,13 +172,11 @@ do_invalidate: isync blr -#endif // clang-format on } ASM void ICFlashInvalidate(void) { // clang-format off -#ifdef __MWERKS__ nofralloc mfspr r3, 0x3F0 @@ -201,13 +184,11 @@ ASM void ICFlashInvalidate(void) { mtspr 0x3F0, r3 blr -#endif // clang-format on } static ASM void ICEnable(void) { // clang-format off -#ifdef __MWERKS__ nofralloc isync @@ -216,13 +197,11 @@ static ASM void ICEnable(void) { mtspr 0x3F0, r3 blr -#endif // clang-format on } ASM void __LCEnable(void) { // clang-format off -#ifdef __MWERKS__ nofralloc mfmsr r5 @@ -286,7 +265,6 @@ do_load: nop blr -#endif // clang-format on } @@ -298,7 +276,6 @@ void LCEnable(void) { ASM void LCDisable(void) { // clang-format off -#ifdef __MWERKS__ nofralloc lis r3, 0xE000 @@ -314,14 +291,12 @@ do_invalidate: mtspr 0x398, r4 blr -#endif // clang-format on } static ASM void LCStoreBlocks(register void* destAddr, register void* srcAddr, register u32 blockNum){ // clang-format off -#ifdef __MWERKS__ nofralloc rlwinm r6, blockNum, 0x1E, 0x1B, 0x1F @@ -334,11 +309,8 @@ static ASM void LCStoreBlocks(register void* destAddr, register void* srcAddr, mtspr 0x39B, r6 blr -#endif // clang-format on -} - -/* 8033B838-8033B8E4 336178 00AC+00 0/0 0/0 3/3 .text LCStoreData */ +} /* 8033B838-8033B8E4 336178 00AC+00 0/0 0/0 3/3 .text LCStoreData */ u32 LCStoreData(void* destAddr, void* srcAddr, u32 nBytes) { u32 blocks = (nBytes + 31) / 32; u32 ret = (blocks + 127) / 128; @@ -361,7 +333,6 @@ u32 LCStoreData(void* destAddr, void* srcAddr, u32 nBytes) { ASM void LCQueueWait(register u32 len) { // clang-format off -#ifdef __MWERKS__ nofralloc addi len, len, 1 @@ -372,7 +343,6 @@ LCQueueWait_04: bge cr2, LCQueueWait_04 blr -#endif // clang-format on } diff --git a/src/dolphin/os/OSLink.c b/src/dolphin/os/OSLink.c index 86480fa86..6acb67921 100644 --- a/src/dolphin/os/OSLink.c +++ b/src/dolphin/os/OSLink.c @@ -1,5 +1,4 @@ #include "dolphin/os/OS.h" -#include #define SHN_UNDEF 0 #define SHN_LORESERVE 0xff00 diff --git a/src/dolphin/os/__start.c b/src/dolphin/os/__start.c index b1187aa53..b029387c3 100644 --- a/src/dolphin/os/__start.c +++ b/src/dolphin/os/__start.c @@ -5,7 +5,7 @@ #include "dolphin/os/__start.h" void DBInit(); -void __init_registers(void); +static void __init_registers(void); SECTION_INIT void __check_pad3(void) { if ((*(u16*)0x800030E4 & 0xEEF) == 0xEEF) {