From eda685ae415995f5c01750f6505e6831a8a432b9 Mon Sep 17 00:00:00 2001 From: mara Date: Mon, 27 Dec 2021 09:28:22 +0100 Subject: [PATCH] Macros to allow compiling code as thumb or arm with attributes this change allows to force the compiler to put the code of a function in thumb or arm mode. --- include/gba_base.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/gba_base.h b/include/gba_base.h index b09b7c8..486bd82 100644 --- a/include/gba_base.h +++ b/include/gba_base.h @@ -101,6 +101,10 @@ #define IWRAM_DATA __attribute__((section(".iwram_data"))) #define EWRAM_DATA __attribute__((section(".ewram_data"))) + +#define ARM_CODE __attribute__((target("arm"))) +#define THUMB_CODE __attribute__((target("thumb"))) + #define EWRAM_BSS __attribute__((section(".sbss"))) #define ALIGN(m) __attribute__((aligned (m)))