summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Street <luke@street.dev>2024-10-12 22:43:10 -0600
committerGitHub <noreply@github.com>2024-10-12 21:43:10 -0700
commit0db466edfa84378d1450abbef25b378f4664528c (patch)
tree354dfe63a65baf6f9fe83b69a938d8cb9313a581 /src
parent7ec2d804142b0809ddd9893fd54169805467ab26 (diff)
Add clangd support for VS Code (#2207)
* Add clangd support for VS Code * Revert accidental change
Diffstat (limited to 'src')
-rw-r--r--src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stddef.h2
-rw-r--r--src/PowerPC_EABI_Support/Runtime/Inc/__va_arg.h4
-rw-r--r--src/dolphin/card/CARDMount.c4
-rw-r--r--src/dolphin/os/OS.c4
-rw-r--r--src/dolphin/os/OSExec.c12
-rw-r--r--src/dolphin/os/OSInterrupt.c6
-rw-r--r--src/dolphin/os/OSMemory.c4
-rw-r--r--src/dolphin/os/OSReset.c4
8 files changed, 20 insertions, 20 deletions
diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stddef.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stddef.h
index dacf399772..7a3e963fcc 100644
--- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stddef.h
+++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/stddef.h
@@ -23,4 +23,4 @@ typedef long ptrdiff_t;
};
#endif
-#endif \ No newline at end of file
+#endif
diff --git a/src/PowerPC_EABI_Support/Runtime/Inc/__va_arg.h b/src/PowerPC_EABI_Support/Runtime/Inc/__va_arg.h
index 5d55401291..2297564021 100644
--- a/src/PowerPC_EABI_Support/Runtime/Inc/__va_arg.h
+++ b/src/PowerPC_EABI_Support/Runtime/Inc/__va_arg.h
@@ -19,7 +19,7 @@ extern "C" void* __va_arg(_va_list_struct*, int);
void* __va_arg(_va_list_struct*, int);
#endif
-#if IN_VSCODE_EDITOR
+#ifndef __MWERKS__
#define __builtin_va_info(...)
#define _var_arg_typeof(...)
#endif
@@ -37,4 +37,4 @@ void* __va_arg(_va_list_struct*, int);
#define __va_copy(a, b) (*(a) = *(b))
-#endif /* __VA_ARG_H */ \ No newline at end of file
+#endif /* __VA_ARG_H */
diff --git a/src/dolphin/card/CARDMount.c b/src/dolphin/card/CARDMount.c
index bdc8a7176c..0b0c200a1a 100644
--- a/src/dolphin/card/CARDMount.c
+++ b/src/dolphin/card/CARDMount.c
@@ -3,7 +3,7 @@
#include "dolphin/card/CARDPriv.h"
#include "dolphin/os/OSRtc.h"
-u8 GameChoice : 0x800030E3;
+u8 GameChoice AT_ADDRESS(0x800030E3);
static BOOL IsCard(u32 id);
static s32 DoMount(s32 chan);
@@ -395,4 +395,4 @@ s32 CARDUnmount(s32 chan) {
}
DoUnmount(chan, CARD_RESULT_NOCARD);
return CARD_RESULT_READY;
-} \ No newline at end of file
+}
diff --git a/src/dolphin/os/OS.c b/src/dolphin/os/OS.c
index 8e54083b99..eff7103adb 100644
--- a/src/dolphin/os/OS.c
+++ b/src/dolphin/os/OS.c
@@ -678,7 +678,7 @@ asm void __OSPSInit(void){
// clang-format on
}
-vu32 __DIRegs[16] : 0xCC006000;
+vu32 __DIRegs[16] AT_ADDRESS(0xCC006000);
#define DI_CONFIG_IDX 0x9
#define DI_CONFIG_CONFIG_MASK 0xFF
@@ -690,4 +690,4 @@ u32 __OSGetDIConfig(void) {
/* 8033A874-8033A8A0 3351B4 002C+00 1/1 11/11 0/0 .text OSRegisterVersion */
void OSRegisterVersion(const char* version) {
OSReport("%s\n", version);
-} \ No newline at end of file
+}
diff --git a/src/dolphin/os/OSExec.c b/src/dolphin/os/OSExec.c
index 07c7c4da8e..1f20351ec8 100644
--- a/src/dolphin/os/OSExec.c
+++ b/src/dolphin/os/OSExec.c
@@ -104,7 +104,7 @@ static void Callback(s32, DVDCommandBlock*) {
Prepared = TRUE;
}
-OSExecParams* osExecParams : 0x800030f0;
+OSExecParams* osExecParams AT_ADDRESS(0x800030f0);
static int IsStreamEnabled() {
if (DVDGetCurrentDiskID()->is_streaming) {
@@ -148,7 +148,7 @@ static void StopStreaming() {
}
/* 8033CCFC-8033CDC0 33763C 00C4+00 1/1 0/0 0/0 .text GetApploaderPosition */
-s32 __OSAppLoaderOffset : 0x800030f4;
+s32 __OSAppLoaderOffset AT_ADDRESS(0x800030f4);
static int GetApploaderPosition(void) {
static s32 apploaderPosition;
@@ -220,9 +220,9 @@ static BOOL IsNewApploader(AppLoaderStruct* header) {
return strncmp(header->date, "2004/02/01", 10) > 0 ? TRUE : FALSE;
}
-extern volatile u32 BOOT_REGION_START : 0x812FDFF0;
-extern volatile u32 BOOT_REGION_END : 0x812FDFEC;
-extern volatile u8 g_unk_800030E2 : 0x800030E2;
+extern volatile u32 BOOT_REGION_START AT_ADDRESS(0x812FDFF0);
+extern volatile u32 BOOT_REGION_END AT_ADDRESS(0x812FDFEC);
+extern volatile u8 g_unk_800030E2 AT_ADDRESS(0x800030E2);
/* 8033CDC0-8033D244 337700 0484+00 1/1 0/0 0/0 .text __OSBootDolSimple */
void __OSBootDolSimple(u32 doloffset, u32 restartCode, void* regionStart, void* regionEnd, BOOL argsUseDefault, s32 argc, char** argv) {
@@ -312,4 +312,4 @@ void __OSBootDol(u32 doloffset, u32 restartCode, const char** argv) {
}
__OSBootDolSimple(-1, restartCode, saveStart, saveEnd, FALSE, argvlen, argvToPass);
-} \ No newline at end of file
+}
diff --git a/src/dolphin/os/OSInterrupt.c b/src/dolphin/os/OSInterrupt.c
index 6c0b8b22bf..1168572aff 100644
--- a/src/dolphin/os/OSInterrupt.c
+++ b/src/dolphin/os/OSInterrupt.c
@@ -3,8 +3,8 @@
#include "dolphin/exi/EXIBios.h"
#include "dolphin/os.h"
-vu32 __PIRegs[12] : 0xCC003000;
-vu16 __MEMRegs[64] : 0xCC004000;
+vu32 __PIRegs[12] AT_ADDRESS(0xCC003000);
+vu16 __MEMRegs[64] AT_ADDRESS(0xCC004000);
/* 8033D6F4-8033D700 338034 000C+00 2/2 200/200 5/5 .text OSDisableInterrupts */
asm BOOL OSDisableInterrupts(void) {
@@ -445,4 +445,4 @@ static asm void ExternalInterruptHandler(register __OSInterrupt type, register O
stwu r1, -8(r1)
b __OSDispatchInterrupt
// clang-format on
-} \ No newline at end of file
+}
diff --git a/src/dolphin/os/OSMemory.c b/src/dolphin/os/OSMemory.c
index 5e3854e451..a9eb77848b 100644
--- a/src/dolphin/os/OSMemory.c
+++ b/src/dolphin/os/OSMemory.c
@@ -4,7 +4,7 @@
#define TRUNC(n, a) (((u32)(n)) & ~((a)-1))
#define ROUND(n, a) (((u32)(n) + (a)-1) & ~((a)-1))
-vu16 __MEMRegs[64] : 0xCC004000;
+vu16 __MEMRegs[64] AT_ADDRESS(0xCC004000);
extern OSErrorHandlerEx __OSErrorTable[16];
@@ -216,4 +216,4 @@ void __OSInitMemoryProtection() {
__OSUnmaskInterrupts(OS_INTERRUPTMASK_MEM_ADDRESS);
OSRestoreInterrupts(enabled);
-} \ No newline at end of file
+}
diff --git a/src/dolphin/os/OSReset.c b/src/dolphin/os/OSReset.c
index c28691601f..c9a5054e60 100644
--- a/src/dolphin/os/OSReset.c
+++ b/src/dolphin/os/OSReset.c
@@ -1,7 +1,7 @@
#include "dolphin/os/OSReset.h"
#include "dolphin/os.h"
-vu16 __VIRegs[59] : 0xCC002000;
+vu16 __VIRegs[59] AT_ADDRESS(0xCC002000);
OSThreadQueue __OSActiveThreadQueue : (OS_BASE_CACHED | 0x00DC);
extern OSExecParams __OSRebootParams;
@@ -217,4 +217,4 @@ u32 OSGetResetCode(void) {
return 0x80000000 | __OSRebootParams.restartCode;
return ((__PIRegs[9] & ~7) >> 3);
-} \ No newline at end of file
+}