opcodes: Fix definition of "in rd,imm16" opcode.
authorNick Clifton <nickc@redhat.com>
Thu, 22 Aug 2002 19:22:35 +0000 (19:22 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 22 Aug 2002 19:22:35 +0000 (19:22 +0000)
gas: Adjust ptr variable also in "case 0" case.

gas/ChangeLog
gas/config/tc-z8k.c
opcodes/ChangeLog
opcodes/z8k-dis.c
opcodes/z8k-opc.h
opcodes/z8kgen.c

index 93f62cd38792ed65ab13c25cabacd9dbc884b14e..bd522a94b4169173173c483764428d71fdc7291c 100644 (file)
@@ -1,3 +1,8 @@
+2002-08-22  Christian Groessler <chris@groessler.org>
+
+       * config/tc-z8k.c (get_operands): Adjust ptr variable also in
+       "case 0" case.
+
 2002-08-12  Graeme Peterson  <gp@qnx.com>
 
        * configure.in: Add support for sh-**-nto* target.
index 04723f8d834e2b4abe48a2a56ca8e80720eb5423..bde058ab652b8fbbd045370d25f2876e82eb1b14 100644 (file)
@@ -731,6 +731,7 @@ get_operands (opcode, op_end, operand)
   char *ptr = op_end;
   char *savptr;
 
+  ptr++;
   switch (opcode->noperands)
     {
     case 0:
@@ -739,40 +740,35 @@ get_operands (opcode, op_end, operand)
       break;
 
     case 1:
-      ptr++;
       if (opcode->arg_info[0] == CLASS_CC)
-       {
-         get_cc_operand (&ptr, operand + 0, 0);
-       }
+       get_cc_operand (&ptr, operand + 0, 0);
+
       else if (opcode->arg_info[0] == CLASS_FLAGS)
-       {
-         get_flags_operand (&ptr, operand + 0, 0);
-       }
+       get_flags_operand (&ptr, operand + 0, 0);
+
       else if (opcode->arg_info[0] == (CLASS_IMM + (ARG_IMM2)))
-       {
-         get_interrupt_operand (&ptr, operand + 0, 0);
-       }
+       get_interrupt_operand (&ptr, operand + 0, 0);
+
       else
-       {
-         get_operand (&ptr, operand + 0, 0);
-       }
+       get_operand (&ptr, operand + 0, 0);
+
       operand[1].mode = 0;
       break;
 
     case 2:
-      ptr++;
       savptr = ptr;
       if (opcode->arg_info[0] == CLASS_CC)
-       {
-         get_cc_operand (&ptr, operand + 0, 0);
-       }
+       get_cc_operand (&ptr, operand + 0, 0);
+
       else if (opcode->arg_info[0] == CLASS_CTRL)
        {
          get_ctrl_operand (&ptr, operand + 0, 0);
+
          if (the_ctrl == 0)
            {
              ptr = savptr;
              get_operand (&ptr, operand + 0, 0);
+
              if (ptr == 0)
                return NULL;
              if (*ptr == ',')
@@ -782,9 +778,8 @@ get_operands (opcode, op_end, operand)
            }
        }
       else
-       {
-         get_operand (&ptr, operand + 0, 0);
-       }
+       get_operand (&ptr, operand + 0, 0);
+
       if (ptr == 0)
        return NULL;
       if (*ptr == ',')
@@ -793,7 +788,6 @@ get_operands (opcode, op_end, operand)
       break;
 
     case 3:
-      ptr++;
       get_operand (&ptr, operand + 0, 0);
       if (*ptr == ',')
        ptr++;
@@ -804,7 +798,6 @@ get_operands (opcode, op_end, operand)
       break;
 
     case 4:
-      ptr++;
       get_operand (&ptr, operand + 0, 0);
       if (*ptr == ',')
        ptr++;
@@ -1413,7 +1406,7 @@ md_section_align (seg, size)
 
 void
 md_apply_fix3 (fixP, valP, segment)
-     fixS *fixP;
+     fixS * fixP;
      valueT * valP;
      segT segment ATTRIBUTE_UNUSED;
 {
@@ -1483,7 +1476,7 @@ md_estimate_size_before_relax (fragP, segment_type)
      register fragS *fragP ATTRIBUTE_UNUSED;
      register segT segment_type ATTRIBUTE_UNUSED;
 {
-  printf (_("call tomd_estimate_size_before_relax \n"));
+  printf (_("call tomd_estimate_size_before_relax\n"));
   abort ();
 }
 
index b7c59eb1b5b9f218ec1d2624343c58ceda25a476..8bbcdffb45bdcfbcebec84b970acd5bcdc199529 100644 (file)
@@ -1,3 +1,10 @@
+2002-08-16  Christian Groessler <chris@groessler.org>
+
+       * z8k-dis.c (unparse_instr): case CLASS_BA: Designate hex
+       values as those.
+       * z8kgen.c (opt): Fix definition of "in rd,imm16" opcode.
+       * z8k-opc.h: Regenerated with new z8kgen.c.
+
 2002-08-19  Elena Zannoni  <ezannoni@redhat.com> 
 
         From  matthew green  <mrg@redhat.com>
index d375e6908d223fc4170487d9ebe5cf6d58d1a11a..6c1913892c841e8edf3b7415b36ef7388699da52 100644 (file)
@@ -515,10 +515,10 @@ unparse_instr (instr_data, is_segmented)
          break;
        case CLASS_BA:
           if (is_segmented)
-            sprintf (tmp_str, "rr%ld(#%lx)", instr_data->arg_reg[datum_value],
+            sprintf (tmp_str, "rr%ld(#0x%lx)", instr_data->arg_reg[datum_value],
                      instr_data->immediate);
           else
-            sprintf (tmp_str, "r%ld(#%lx)", instr_data->arg_reg[datum_value],
+            sprintf (tmp_str, "r%ld(#0x%lx)", instr_data->arg_reg[datum_value],
                      instr_data->immediate);
          strcat (out_str, tmp_str);
          break;
index 025cfabdd65ec679f1aa24ed738a9e5c22d18f21..0e478bfd0e8c8c30b7e6f21286a9c85873fc4609 100644 (file)
@@ -1621,14 +1621,14 @@ opcode_entry_type z8k_table[] = {
        {CLASS_BIT+3,CLASS_BIT+0xd,CLASS_REGN0+(ARG_RS),CLASS_REG+(ARG_RD),0,0,0,0,0,},2,2,135},
 
 
-/* 0011 1101 dddd 0100 imm16 *** in rd,imm16 */
+/* 0011 1011 dddd 0100 imm16 *** in rd,imm16 */
 {
 #ifdef NICENAMES
 "in rd,imm16",16,12,
 0x00,
 #endif
 "in",OPC_in,0,{CLASS_REG_WORD+(ARG_RD),CLASS_IMM+(ARG_IMM16),},
-       {CLASS_BIT+3,CLASS_BIT+0xd,CLASS_REG+(ARG_RD),CLASS_BIT+4,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,136},
+       {CLASS_BIT+3,CLASS_BIT+0xb,CLASS_REG+(ARG_RD),CLASS_BIT+4,CLASS_IMM+(ARG_IMM16),0,0,0,0,},2,4,136},
 
 
 /* 0011 1100 ssN0 dddd *** inb rbd,@rs */
index fa8505939a97005f9c15383be3bab4df2c4d8de4..5bd9240c0213455031cc01e4ac70d1e424cd81be 100644 (file)
@@ -209,8 +209,8 @@ struct op opt[] =
 
   "------", 8, 16, "0111 1010 0000 0000", "halt", 0,
   "------", 10, 16, "0011 1101 ssN0 dddd", "in rd,@rs", 0,
-  "------", 12, 16, "0011 1101 dddd 0100 imm16", "in rd,imm16", 0,
   "------", 12, 8, "0011 1100 ssN0 dddd", "inb rbd,@rs", 0,
+  "------", 12, 16, "0011 1011 dddd 0100 imm16", "in rd,imm16", 0,
   "------", 10, 8, "0011 1010 dddd 0100 imm16", "inb rbd,imm16", 0,
   "-ZSV--", 11, 16, "0010 1001 ddN0 imm4m1", "inc @rd,imm4m1", 0,
   "-ZSV--", 14, 16, "0110 1001 ddN0 imm4m1 address_dst", "inc address_dst(rd),imm4m1", 0,
This page took 0.124083 seconds and 4 git commands to generate.