summaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorDavid Guillen Fandos2021-03-06 21:15:22 +0100
committerDavid Guillen Fandos2021-03-06 21:15:22 +0100
commit3d558413fd42078f112dfee4ccc2e3c36978923f (patch)
tree7ac42b4df1e7f2332f1a32c432dd12d685035874 /common.h
parentd21478e06edb61d2f0565c06fc6665799a6d7e72 (diff)
downloadpicogpsp-3d558413fd42078f112dfee4ccc2e3c36978923f.tar.gz
picogpsp-3d558413fd42078f112dfee4ccc2e3c36978923f.tar.bz2
picogpsp-3d558413fd42078f112dfee4ccc2e3c36978923f.zip
Fix x86 dynarec, broken by d10c4afe
The dynarec expects function args to be located in registers instead of the stack, which is not the default calling convetion in GCC/clang.
Diffstat (limited to 'common.h')
-rw-r--r--common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/common.h b/common.h
index e3539f6..a85bc57 100644
--- a/common.h
+++ b/common.h
@@ -31,6 +31,12 @@
#define PATH_SEPARATOR_CHAR '/'
#endif
+#ifdef X86_ARCH
+ #define function_cc __attribute__((regparm(2)))
+#else
+ #define function_cc
+#endif
+
#ifdef ARM_ARCH
#define _BSD_SOURCE // sync