Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Frysinger <vapier@gentoo.org>2011-02-12 22:36:31 +0300
committerMichael Frysinger <vapier@gentoo.org>2011-02-12 22:36:31 +0300
commit8447bf9f9f971b6b20564bb6f9df37c316b01c6e (patch)
tree5908472e7f8cad4f1f0562a145674401f316c764 /include
parente7e950024cd23a1de5009eac957480b234b8a6cc (diff)
gas/opcodes: blackfin: move dsp mac func defines to common header
The mmod field is decoded in a few places (gas/opcodes/sim), so move it to a common place to avoid duplication. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'include')
-rw-r--r--include/opcode/ChangeLog5
-rwxr-xr-xinclude/opcode/bfin.h23
2 files changed, 28 insertions, 0 deletions
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index 968de81bb..61fcbee5c 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,8 @@
+2011-02-12 Mike Frysinger <vapier@gentoo.org>
+
+ * bfin-dis.c (M_S2RND, M_T, M_W32, M_FU, M_TFU, M_IS, M_ISS2,
+ M_IH, M_IU): Delete.
+
2011-02-11 Mike Frysinger <vapier@gentoo.org>
* bfin.h: Add OPCODE_BFIN_H ifdef multiple include protection.
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...|