summaryrefslogtreecommitdiff
path: root/firmware/include/gcc_extensions.h
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2011-05-24 10:44:12 +0000
committerNils Wallménius <nils@rockbox.org>2011-05-24 10:44:12 +0000
commit5fd9471c156ca054fbe5fc5d2b002f94645f473c (patch)
tree9cc94d5448c3a421b37a21d7a4d2567ec197782b /firmware/include/gcc_extensions.h
parentecb4d2d9a72f223f792e435c3c50d19022a708d4 (diff)
downloadrockbox-5fd9471c156ca054fbe5fc5d2b002f94645f473c.zip
rockbox-5fd9471c156ca054fbe5fc5d2b002f94645f473c.tar.gz
rockbox-5fd9471c156ca054fbe5fc5d2b002f94645f473c.tar.bz2
rockbox-5fd9471c156ca054fbe5fc5d2b002f94645f473c.tar.xz
FS#12120. Convert FRACMUL macros into inline functions and fix typecasting for 64 bit platforms so that sims produce the same results as targets. Tweak the cf inline asm to not require an immediate value but add a FORCE_INLINE attribute to one of the cf functions to make sure it gets inlined as that saves both codesize and cycles.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29921 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/include/gcc_extensions.h')
-rw-r--r--firmware/include/gcc_extensions.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/include/gcc_extensions.h b/firmware/include/gcc_extensions.h
index f7580f6..7109eda 100644
--- a/firmware/include/gcc_extensions.h
+++ b/firmware/include/gcc_extensions.h
@@ -50,4 +50,11 @@
#define NORETURN_ATTR
#endif
+
+#if defined(__GNUC__)
+#define FORCE_INLINE inline __attribute__((always_inline))
+#else
+#define FORCE_INLINE inline
+#endif
+
#endif /* _GCC_EXTENSIONS_H_ */