2003-08-05 Jason Eckhardt <jle@rice.edu>
authorJason Eckhardt <jle@rice.edu>
Wed, 6 Aug 2003 04:31:58 +0000 (04:31 +0000)
committerJason Eckhardt <jle@rice.edu>
Wed, 6 Aug 2003 04:31:58 +0000 (04:31 +0000)
        * config/tc-i860.c (i860_process_insn): Don't handle dual-bit
        setting during flop argument parsing.  Instead, do it after
        instruction is fully parsed.

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

index 5dfb5e9915eefee638b6f8c6d689b9496f9a6091..06114a037b3681a3d77899a5af1002cd4ddb3779 100644 (file)
@@ -1,3 +1,9 @@
+2003-08-05  Jason Eckhardt  <jle@rice.edu>
+
+        * config/tc-i860.c (i860_process_insn): Don't handle dual-bit
+       setting during flop argument parsing.  Instead, do it after
+       instruction is fully parsed.
+
 2003-08-05  Jason Eckhardt  <jle@rice.edu>
 
         * doc/c-i860.texi: Mention that .dual, .enddual, and .atmp
index 2418997e874abd78540ea100e62fa448155c8395..37aff49efa41261a76a16b3dcdc4141734daf267 100644 (file)
@@ -638,12 +638,6 @@ i860_process_insn (char *str)
 
                    case 'g':
                      opcode |= mask << 16;
-                     if (dual_mode != DUAL_OFF)
-                       opcode |= (1 << 9);
-                     if (dual_mode == DUAL_DDOT)
-                       dual_mode = DUAL_OFF;
-                     if (dual_mode == DUAL_ONDDOT)
-                       dual_mode = DUAL_ON;
                      if ((opcode & (1 << 10)) && mask != 0
                          && (mask == ((opcode >> 11) & 0x1f)))
                        as_warn (_("Pipelined instruction: fsrc1 = fdest"));
@@ -934,6 +928,21 @@ i860_process_insn (char *str)
       break;
     }
 
+  /* Set the dual bit on this instruction if necessary.  */
+  if (dual_mode != DUAL_OFF)
+    {
+      if ((opcode & 0xfc000000) == 0x48000000 || opcode == 0xb0000000)
+        {
+         opcode |= (1 << 9);
+          if (dual_mode == DUAL_DDOT)
+           dual_mode = DUAL_OFF;
+          else if (dual_mode == DUAL_ONDDOT)
+           dual_mode = DUAL_ON;
+        }
+      else if (dual_mode == DUAL_DDOT || dual_mode == DUAL_ONDDOT)
+        as_bad (_("Prefix 'd.' invalid for instruction `%s'"), insn->name);
+    }
+
   the_insn.opcode = opcode;
 
   /* Only recognize XP instructions when the user has requested it.  */