public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gas: blackfin: reject multiple store insns in parallel insns
@ 2010-09-21  8:08 Mike Frysinger
  2010-09-22 21:37 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2010-09-21  8:08 UTC (permalink / raw)
  To: binutils; +Cc: Robin Getz

From: Robin Getz <robin.getz@analog.com>

Check for & reject attempts to use multiple store insns in a single
parallel insn combination.  These are illegal per the Blackfin ISA.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>

2010-09-21  Robin Getz  <robin.getz@analog.com>

	* config/bfin-parse.y (is_store): New function.
	(gen_multi_instr_1): Check parallel slots for store insns.
---
 gas/config/bfin-parse.y |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/gas/config/bfin-parse.y b/gas/config/bfin-parse.y
index 0dd729c..90d3b04 100644
--- a/gas/config/bfin-parse.y
+++ b/gas/config/bfin-parse.y
@@ -380,6 +380,36 @@ is_group2 (INSTR_T x)
   return 0;
 }
 
+static int
+is_store (INSTR_T x)
+{
+  if (!x)
+    return 0;
+
+  if ((x->value & 0xf000) == 0x8000)
+    {
+      int aop = ((x->value >> 9) & 0x3);
+      int w = ((x->value >> 11) & 0x1);
+      if (!w || aop == 3)
+	return 0;
+      return 1;
+    }
+
+  if (((x->value & 0xFF60) == 0x9E60) ||  /* dagMODim_0 */
+      ((x->value & 0xFFF0) == 0x9F60))    /* dagMODik_0 */
+    return 0;
+
+  /* decode_dspLDST_0 */
+  if ((x->value & 0xFC00) == 0x9C00)
+    {
+      int w = ((x->value >> 9) & 0x1);
+      if (w)
+	return 1;
+    }
+
+  return 0;
+}
+
 static INSTR_T
 gen_multi_instr_1 (INSTR_T dsp32, INSTR_T dsp16_grp1, INSTR_T dsp16_grp2)
 {
@@ -400,6 +430,9 @@ gen_multi_instr_1 (INSTR_T dsp32, INSTR_T dsp16_grp1, INSTR_T dsp16_grp2)
     yyerror ("anomaly 05000074 - Multi-Issue Instruction with \
 dsp32shiftimm in slot1 and P-reg Store in slot2 Not Supported");
 
+  if (is_store (dsp16_grp1) && is_store (dsp16_grp2))
+    yyerror ("Only one instruction in multi-issue instruction can be a store");
+
   return bfin_gen_multi_instr (dsp32, dsp16_grp1, dsp16_grp2);
 }
 
-- 
1.7.2

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] gas: blackfin: reject multiple store insns in parallel insns
  2010-09-21  8:08 [PATCH] gas: blackfin: reject multiple store insns in parallel insns Mike Frysinger
@ 2010-09-22 21:37 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2010-09-22 21:37 UTC (permalink / raw)
  To: binutils; +Cc: Robin Getz

[-- Attachment #1: Type: Text/Plain, Size: 273 bytes --]

On Tuesday, September 21, 2010 04:07:49 Mike Frysinger wrote:
> From: Robin Getz <robin.getz@analog.com>
> 
> Check for & reject attempts to use multiple store insns in a single
> parallel insn combination.  These are illegal per the Blackfin ISA.

committed
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-22 21:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-21  8:08 [PATCH] gas: blackfin: reject multiple store insns in parallel insns Mike Frysinger
2010-09-22 21:37 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).