* config/tc-mn10300.c (md_assemble): Use FMT_* macros for
authorJeff Law <law@redhat.com>
Thu, 10 Oct 1996 20:33:47 +0000 (20:33 +0000)
committerJeff Law <law@redhat.com>
Thu, 10 Oct 1996 20:33:47 +0000 (20:33 +0000)
        formats rather than hard-coded constants.
Minor cleanup.

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

index c7b4363..8c3118b 100644 (file)
@@ -1,5 +1,8 @@
 Thu Oct 10 12:05:45 1996  Jeffrey A Law  (law@cygnus.com)
 
+       * config/tc-mn10300.c (md_assemble): Use FMT_* macros for
+       formats rather than hard-coded constants.
+
        * config/tc-mn10300.c (md_assemble): Format D5 instructions
        are 7 bytes long.  Write out instructions in big-endian format.
 
index f1de133..601a860 100644 (file)
@@ -664,26 +664,26 @@ keep_going:
 
   input_line_pointer = str;
 
-  /* XXX */
-  if (opcode->format == 1)
+  /* Determine the size of the instruction.  */
+  if (opcode->format == FMT_S0)
     size = 1;
 
-  if (opcode->format == 2 || opcode->format == 6)
+  if (opcode->format == FMT_S1 || opcode->format == FMT_D0)
     size = 2;
 
-  if (opcode->format == 3 || opcode->format == 7)
+  if (opcode->format == FMT_S2 || opcode->format == FMT_D1)
     size = 3;
 
-  if (opcode->format == 4)
+  if (opcode->format == FMT_S4)
     size = 5;
 
-  if (opcode->format == 5 || opcode->format == 10)
+  if (opcode->format == FMT_S6 || opcode->format == FMT_D5)
     size = 7;
 
-  if (opcode->format == 8)
+  if (opcode->format == FMT_D2)
     size = 4;
 
-  if (opcode->format == 9)
+  if (opcode->format == FMT_D4)
     size = 6;
 
   /* Write out the instruction.  */