summaryrefslogtreecommitdiffstats
path: root/include/opcode/bfin.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/opcode/bfin.h')
-rwxr-xr-xinclude/opcode/bfin.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/opcode/bfin.h b/include/opcode/bfin.h
index 4a8a6bc3a..730f63c24 100755
--- a/include/opcode/bfin.h
+++ b/include/opcode/bfin.h
@@ -30,6 +30,29 @@
/* DSP instructions (32 bit) */
+/* mmod field. */
+#define M_S2RND 1
+#define M_T 2
+#define M_W32 3
+#define M_FU 4
+#define M_TFU 6
+#define M_IS 8
+#define M_ISS2 9
+#define M_IH 11
+#define M_IU 12
+
+static inline int is_macmod_pmove(int x)
+{
+ return (x == 0) || (x == M_IS) || (x == M_FU) || (x == M_S2RND)
+ || (x == M_ISS2) || (x == M_IU);
+}
+
+static inline int is_macmod_hmove(int x)
+{
+ return (x == 0) || (x == M_IS) || (x == M_FU) || (x == M_IU) || (x == M_T)
+ || (x == M_TFU) || (x == M_S2RND) || (x == M_ISS2) || (x == M_IH);
+}
+
/* dsp32mac
+----+----+---+---|---+----+----+---|---+---+---+---|---+---+---+---+
| 1 | 1 | 0 | 0 |.M.| 0 | 0 |.mmod..........|.MM|.P.|.w1|.op1...|