From fd647fc2e84034f42609a2b174cd354e20f62a29 Mon Sep 17 00:00:00 2001 From: Maschell Date: Fri, 13 May 2022 01:23:42 +0200 Subject: [PATCH] Avoid compiler optimizations for kernel code --- source/kernel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/kernel.cpp b/source/kernel.cpp index a38842a..16e6a25 100644 --- a/source/kernel.cpp +++ b/source/kernel.cpp @@ -1,5 +1,8 @@ #include +#pragma GCC push_options +#pragma GCC optimize("O0") + #define k_memset ((void (*)(uint32_t, uint32_t, uint32_t)) 0xfff09d60) #define KiReport ((void (*)(const char *, ...)) 0xfff0ad0c) #define IopShell_AsyncCallback (0xfff1b7d8) @@ -89,4 +92,5 @@ void IopShellInitInternal() { return; } KiReport("IopShellInit was successful\n"); -} \ No newline at end of file +} +#pragma GCC pop_options \ No newline at end of file