summaryrefslogtreecommitdiff
path: root/apps/codecs/demac/libdemac/demac_config.h
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-11-24 18:40:49 +0000
committerJens Arnold <amiconn@rockbox.org>2008-11-24 18:40:49 +0000
commit3761c0108cbfc6f88c4bf43fc13a38a2f7db0d6f (patch)
treea064992dc69635d60e7bc1cb106fc43c6a4e3a40 /apps/codecs/demac/libdemac/demac_config.h
parent66c0cf2eb17158eec9d0cd2553481a2caf86e611 (diff)
downloadrockbox-3761c0108cbfc6f88c4bf43fc13a38a2f7db0d6f.tar.gz
rockbox-3761c0108cbfc6f88c4bf43fc13a38a2f7db0d6f.zip
Branch optimisation in both C (giving hints to gcc - verified using -fprofile-arcs and gcov) and asm files. Biggest effect on coldfire (-c1000: +8%, -c2000: +5%), but ARM also profits a bit (less than 1% on ARM7TDMI, around 1% on ARM1136).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19199 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/demac/libdemac/demac_config.h')
-rw-r--r--apps/codecs/demac/libdemac/demac_config.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/codecs/demac/libdemac/demac_config.h b/apps/codecs/demac/libdemac/demac_config.h
index dd3aaa3f9c..986e5376c4 100644
--- a/apps/codecs/demac/libdemac/demac_config.h
+++ b/apps/codecs/demac/libdemac/demac_config.h
@@ -70,6 +70,15 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
70#define ICODE_ATTR 70#define ICODE_ATTR
71#define ICODE_ATTR_DEMAC 71#define ICODE_ATTR_DEMAC
72 72
73/* Use to give gcc hints on which branch is most likely taken */
74#if defined(__GNUC__) && __GNUC__ >= 3
75#define LIKELY(x) __builtin_expect(!!(x), 1)
76#define UNLIKELY(x) __builtin_expect(!!(x), 0)
77#else
78#define LIKELY(x) (x)
79#define UNLIKELY(x) (x)
80#endif
81
73#endif /* !ROCKBOX */ 82#endif /* !ROCKBOX */
74 83
75/* Defaults */ 84/* Defaults */