Thu Nov 14 11:17:49 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
authorMartin Hunt <hunt@redhat.com>
Thu, 14 Nov 1996 19:20:02 +0000 (19:20 +0000)
committerMartin Hunt <hunt@redhat.com>
Thu, 14 Nov 1996 19:20:02 +0000 (19:20 +0000)
* config/tc-d10v.c (write_2_short): Fix bug that wouldn't
allow a branch and link in parallel with an exe instruction.

gas/ChangeLog
gas/config/tc-d10v.c

index a569e5c..0259ce5 100644 (file)
@@ -1,3 +1,14 @@
+start-sanitize-d10v
+Thu Nov 14 11:17:49 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
+
+       * config/tc-d10v.c (write_2_short): Fix bug that wouldn't
+       allow a branch and link in parallel with an exe instruction.
+
+Fri Nov  8 13:55:03 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
+
+       * doc/c-d10v.texi: Add info on @word modifier.
+
+end-sanitize-d10v      
 Wed Nov  6 13:46:07 1996  Jeffrey A Law  (law@cygnus.com)
        
        * config/tc-mn10300.c (mn10300_insert_operand): MN10300_OPERAND_SPLIT
index 6c800b2..4a466fd 100644 (file)
@@ -75,7 +75,7 @@ static unsigned long do_assemble PARAMS ((char *str, struct d10v_opcode **opcode
 static unsigned long d10v_insert_operand PARAMS (( unsigned long insn, int op_type,
                                                   offsetT value, int left, fixS *fix));
 static int parallel_ok PARAMS ((struct d10v_opcode *opcode1, unsigned long insn1, 
-                                 struct d10v_opcode *opcode2, unsigned long insn2));
+                               struct d10v_opcode *opcode2, unsigned long insn2));
 
 
 struct option md_longopts[] = {
@@ -694,7 +694,7 @@ write_2_short (opcode1, insn1, opcode2, insn2, exec_type, fx)
   if ( (opcode1->format & LONG_OPCODE) || (opcode2->format & LONG_OPCODE))
     as_fatal ("Long instructions may not be combined.");
 
-  if(opcode1->exec_type & BRANCH_LINK)
+  if(opcode1->exec_type & BRANCH_LINK && opcode2->exec_type != PARONLY)
     {
       /* subroutines must be called from 32-bit boundaries */
       /* so the return address will be correct */
@@ -822,7 +822,11 @@ parallel_ok (op1, insn1, op2, insn2)
   unsigned long ins, mod[2], used[2];
   struct d10v_opcode *op;
 
-  if (op1->exec_type & SEQ || op2->exec_type & SEQ)
+  if ((op1->exec_type & SEQ) != 0 || (op2->exec_type & SEQ) != 0
+      || (op1->exec_type & PAR) == 0 || (op2->exec_type & PAR) == 0
+      || (op1->unit == BOTH) || (op2->unit == BOTH)
+      || (op1->unit == IU && op2->unit == IU)
+      || (op1->unit == MU && op2->unit == MU))
     return 0;
 
   /* The idea here is to create two sets of bitmasks (mod and used) */