summaryrefslogtreecommitdiff
path: root/include/ppc4xx.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ppc4xx.h')
-rw-r--r--include/ppc4xx.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/ppc4xx.h b/include/ppc4xx.h
index 76fe872..4a6eb86 100644
--- a/include/ppc4xx.h
+++ b/include/ppc4xx.h
@@ -29,6 +29,21 @@
#endif
/*
+ * Macro for generating register field mnemonics
+ */
+#define PPC_REG_BITS 32
+#define PPC_REG_VAL(bit, value) ((value) << ((PPC_REG_BITS - 1) - (bit)))
+
+/*
+ * Elide casts when assembling register mnemonics
+ */
+#ifndef __ASSEMBLY__
+#define static_cast(type, val) (type)(val)
+#else
+#define static_cast(type, val) (val)
+#endif
+
+/*
* Common stuff for 4xx (405 and 440)
*/