summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/command_macros_base.h10
-rw-r--r--include/macros.h6
2 files changed, 14 insertions, 2 deletions
diff --git a/include/command_macros_base.h b/include/command_macros_base.h
index c0d2ac4e8..bb5ce1648 100644
--- a/include/command_macros_base.h
+++ b/include/command_macros_base.h
@@ -3,7 +3,7 @@
/**
* Command Base macros intended for use in designing of more specific command macros
- * Each macro packs bytes (B), halfowrds (H) and words (W, for consistency) into a single word
+ * Each macro packs bytes (B), halfwords (H) and words (W, for consistency) into a single word
*/
#define CMD_BBBB(a, b, c, d) (_SHIFTL(a, 24, 8) | _SHIFTL(b, 16, 8) | _SHIFTL(c, 8, 8) | _SHIFTL(d, 0, 8))
@@ -16,6 +16,12 @@
#define CMD_W(a) (a)
-#define CMD_PTR(a) (u32)(a)
+#ifdef __GNUC__
+#define CMD_F(a) {.f = (a)}
+#else
+#define CMD_F(a) {(a)}
+#endif
+
+#define CMD_PTR(a) (uintptr_t)(a)
#endif
diff --git a/include/macros.h b/include/macros.h
index 7020fc01c..7dd84fc8e 100644
--- a/include/macros.h
+++ b/include/macros.h
@@ -139,4 +139,10 @@ extern GraphicsContext* __gfxCtx;
(b) = _temp; \
}
+#ifdef __GNUC__
+#define ALIGNED8 __attribute__ ((aligned (8)))
+#else
+#define ALIGNED8
+#endif
+
#endif // _MACROS_H_