[EMAIL PROTECTED] wrote:

Submitted By: Meihui Fan (mhfan)

Is the following a toolchain bug or expected?

 $ cat foo.S
 .text
 ������� P0 = [FP+20] || R0 = [I2++];

$ bfin-linux-uclibc-gcc-4.1.2 -c foo.S
foo.S: Assembler messages:
foo.S:2: Error: resource conflict in multi-issue instruction.

I've committed the patch below to fix it.


Bernd
--
This footer brought to you by insane German lawmakers.
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif
Index: gas/testsuite/ChangeLog.bfin
===================================================================
--- gas/testsuite/ChangeLog.bfin	(revision 2239)
+++ gas/testsuite/ChangeLog.bfin	(working copy)
@@ -1,3 +1,8 @@
+2008-04-11  Bernd Schmidt  <[EMAIL PROTECTED]>
+
+	* gas/bfin/parallel.s: Add a test case.
+	* gas/bfin/parallel.d: Update accordingly.
+
 2008-03-31  Bernd Schmidt  <[EMAIL PROTECTED]>
 
 	* gas/bfin/resource_conflict.l: New test.
Index: gas/testsuite/gas/bfin/parallel.s
===================================================================
--- gas/testsuite/gas/bfin/parallel.s	(revision 2239)
+++ gas/testsuite/gas/bfin/parallel.s	(working copy)
@@ -139,3 +139,5 @@
 	r0.H = r3.l - r3.h (NS) || r5 = w [p2++] (x) || [i2] = r2;
 
 	R1 = [I0++] || R2 = ABS R2 || NOP;
+
+	P0 = [FP+20] || R0 = [I2++];
Index: gas/testsuite/gas/bfin/parallel.d
===================================================================
--- gas/testsuite/gas/bfin/parallel.d	(revision 2239)
+++ gas/testsuite/gas/bfin/parallel.d	(working copy)
@@ -223,4 +223,5 @@ Disassembly of section .text:
  35c:	55 94 12 9f 
  360:	07 cc 10 84 	R2 = ABS R2 \|\| R1 = \[I0\+\+\] \|\| NOP;
  364:	01 9c 00 00 
-
+ 368:	03 c8 00 18 	MNOP \|\| P0 = \[FP \+ 0x14\] \|\| R0 = \[I2\+\+\];
+ 36c:	78 ad 10 9c 
Index: gas/config/tc-bfin.c
===================================================================
--- gas/config/tc-bfin.c	(revision 2239)
+++ gas/config/tc-bfin.c	(working copy)
@@ -2258,8 +2258,10 @@ decode_LDSTii_0 (int iw0)
   int op = ((iw0 >> LDSTii_op_bit) & LDSTii_op_mask);
   int W = ((iw0 >> LDSTii_W_bit) & LDSTii_W_mask);
 
-  if (W == 0)
+  if (W == 0 && op != 3)
     return DREG_MASK (reg);
+  else if (W == 0 && op == 3)
+   return 0;
   else if (W == 1 && op == 0)
     return 0;
   else if (W == 1 && op == 1)
Index: gas/ChangeLog.bfin
===================================================================
--- gas/ChangeLog.bfin	(revision 2239)
+++ gas/ChangeLog.bfin	(working copy)
@@ -1,3 +1,8 @@
+2008-04-11  Bernd Schmidt  <[EMAIL PROTECTED]>
+
+	* config/tc-bfin.c (decode_LDSTii_0): Treat loads to DREG different
+	from loads to PREG.
+
 2008-04-09  Michael Frysinger  <[EMAIL PROTECTED]>
 
 	* bfin-parse.y (binary): Change "compiler" to "assembler".
@@ -8,6 +13,19 @@
 	* config/bfin-defs.h (Expr_Node_Value): Declare the i_value
 	member as long long.
 
+2008-03-31  Bernd Schmidt  <[EMAIL PROTECTED]>
+
+	* config/bfin-parse.y (gen_multi_instr_1): New function.
+	(asm): Use it instead of bfin_gen_multi_instr.
+	* config/bfin-defs.h (insn_regmask): Declare.
+	* config/tc-bfin.c (DREG_MASK, DREGH_MASK, DREGL_MASK, IREG_MASK): New
+	macros.
+	(decode_ProgCtrl_0, decode_LDSTpmod_0, decode_dagMODim_0,
+	decode_dagMODik_0, decode_dspLDST_0, decode_LDST_0, decode_LDSTiiFP_0,
+	decode_LDSTii_0, decode_dsp32mac_0, decode_dsp32mult_0,
+	decode_dsp32alu_0, decode_dsp32shift_0, decode_dsp32shitimm_0,
+	insn_regmask): New functions.
+
 2008-03-17  Bernd Schmidt  <[EMAIL PROTECTED]>
 
 	* config/gas/bfin-parse.y (asm_1): Clean up and unify error handling
_______________________________________________
Toolchain-devel mailing list
Toolchain-devel@blackfin.uclinux.org
http://blackfin.uclinux.org/mailman/listinfo/toolchain-devel

Reply via email to