S12Z: opcodes: Replace "operator" with "optr".
authorJohn Darrington <john@darrington.wattle.id.au>
Fri, 12 Apr 2019 16:39:01 +0000 (18:39 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Fri, 12 Apr 2019 16:39:01 +0000 (18:39 +0200)
opcodes/
* s12z-dis.c, s12z-opc.c, s12z-opc.h: Replace operator with optr.

opcodes/ChangeLog
opcodes/s12z-dis.c
opcodes/s12z-opc.c
opcodes/s12z-opc.h

index a04c4defb46b639eb25b7d8ba0cc683d94b1dbab..043e9fe1e6608e23cef937d6e07a72ee27797986 100644 (file)
@@ -1,3 +1,8 @@
+2019-04-12  John Darrington <john@darrington.wattle.id.au>
+
+       s12z-dis.c, s12z-opc.c, s12z-opc.h: Replace "operator" with
+       "optr". ("operator" is a reserved word in c++).
+
 2019-04-11  Sudakshina Das  <sudi.das@arm.com>
 
        * aarch64-opc.c (aarch64_print_operand): Add case for
index d4d5fd7217f03523d2f4a21c8a0998cd768d98e9..6086f1635da2dd61969f40d64f5ddb65c8acc354 100644 (file)
@@ -331,7 +331,7 @@ int
 print_insn_s12z (bfd_vma memaddr, struct disassemble_info* info)
 {
   int o;
-  enum operator operator = OP_INVALID;
+  enum optr operator = OP_INVALID;
   int n_operands = 0;
 
   /* The longest instruction in S12Z can have 6 operands.
index 36509b58dcd8bb52278d3d5755c6ef47c41c79ec..1f02f5dc6a452a45fcd579f10d968832d586e43a 100644 (file)
@@ -36,8 +36,8 @@ typedef int (* insn_bytes_f) (struct mem_read_abstraction_base *);
 typedef void (*operands_f) (struct mem_read_abstraction_base *,
                            int *n_operands, struct operand **operand);
 
-typedef enum operator (*discriminator_f) (struct mem_read_abstraction_base *,
-                                         enum operator hint);
+typedef enum optr (*discriminator_f) (struct mem_read_abstraction_base *,
+                                         enum optr hint);
 
 enum OPR_MODE
   {
@@ -969,12 +969,12 @@ static void bit_field_decode (struct mem_read_abstraction_base *mra, int *n_oper
 static void exg_sex_decode (struct mem_read_abstraction_base *mra, int *n_operands, struct operand **operands);
 
 
-static enum operator shift_discrim (struct mem_read_abstraction_base *mra, enum operator hint);
-static enum operator psh_pul_discrim (struct mem_read_abstraction_base *mra, enum operator hint);
-static enum operator mul_discrim (struct mem_read_abstraction_base *mra, enum operator hint);
-static enum operator loop_primitive_discrim (struct mem_read_abstraction_base *mra, enum operator hint);
-static enum operator bit_field_discrim (struct mem_read_abstraction_base *mra, enum operator hint);
-static enum operator exg_sex_discrim (struct mem_read_abstraction_base *mra, enum operator hint);
+static enum optr shift_discrim (struct mem_read_abstraction_base *mra, enum optr hint);
+static enum optr psh_pul_discrim (struct mem_read_abstraction_base *mra, enum optr hint);
+static enum optr mul_discrim (struct mem_read_abstraction_base *mra, enum optr hint);
+static enum optr loop_primitive_discrim (struct mem_read_abstraction_base *mra, enum optr hint);
+static enum optr bit_field_discrim (struct mem_read_abstraction_base *mra, enum optr hint);
+static enum optr exg_sex_discrim (struct mem_read_abstraction_base *mra, enum optr hint);
 
 
 static void
@@ -1005,8 +1005,8 @@ sub_d6_y_x (struct mem_read_abstraction_base *mra ATTRIBUTE_UNUSED,
 
 static void ld_18bit_decode (struct mem_read_abstraction_base *mra, int *n_operands, struct operand **operand);
 
-static enum operator
-mul_discrim (struct mem_read_abstraction_base *mra, enum operator hint)
+static enum optr
+mul_discrim (struct mem_read_abstraction_base *mra, enum optr hint)
 {
   uint8_t mb;
   int status = mra->read (mra, 0, 1, &mb);
@@ -1042,7 +1042,7 @@ mul_discrim (struct mem_read_abstraction_base *mra, enum operator hint)
 struct opcode
 {
   /* The operation that this opcode performs.  */
-  enum operator operator;
+  enum optr operator;
 
   /* The size of this operation.  May be -1 if it is implied
      in the operands or if size is not applicable.  */
@@ -2196,8 +2196,8 @@ loop_prim_n_bytes (struct mem_read_abstraction_base *mra)
 
 \f
 
-static enum operator
-exg_sex_discrim (struct mem_read_abstraction_base *mra, enum operator hint ATTRIBUTE_UNUSED)
+static enum optr
+exg_sex_discrim (struct mem_read_abstraction_base *mra, enum optr hint ATTRIBUTE_UNUSED)
 {
   uint8_t eb;
   int status = mra->read (mra, 0, 1, &eb);
@@ -2210,7 +2210,7 @@ exg_sex_discrim (struct mem_read_abstraction_base *mra, enum operator hint ATTRI
   const struct reg *r0 = registers + ((struct register_operand *) op0)->reg;
   const struct reg *r1 = registers + ((struct register_operand *) op1)->reg;
 
-  enum operator operator = (r0->bytes < r1->bytes) ? OP_sex : OP_exg;
+  enum optr operator = (r0->bytes < r1->bytes) ? OP_sex : OP_exg;
 
   free (op0);
   free (op1);
@@ -2233,16 +2233,16 @@ exg_sex_decode (struct mem_read_abstraction_base *mra,
   operands[(*n_operands)++] =  create_register_operand (eb & 0xf);
 }
 
-static enum operator
+static enum optr
 loop_primitive_discrim (struct mem_read_abstraction_base *mra,
-                       enum operator hint ATTRIBUTE_UNUSED)
+                       enum optr hint ATTRIBUTE_UNUSED)
 {
   uint8_t lb;
   int status = mra->read (mra, 0, 1, &lb);
   if (status < 0)
     return OP_INVALID;
 
-  enum operator opbase = (lb & 0x80) ? OP_dbNE : OP_tbNE;
+  enum optr opbase = (lb & 0x80) ? OP_dbNE : OP_tbNE;
   return opbase + ((lb & 0x70) >> 4);
 }
 
@@ -2287,8 +2287,8 @@ loop_primitive_decode (struct mem_read_abstraction_base *mra,
 }
 
 
-static enum operator
-shift_discrim (struct mem_read_abstraction_base *mra,  enum operator hint ATTRIBUTE_UNUSED)
+static enum optr
+shift_discrim (struct mem_read_abstraction_base *mra,  enum optr hint ATTRIBUTE_UNUSED)
 {
   size_t i;
   uint8_t sb;
@@ -2474,9 +2474,9 @@ shift_decode (struct mem_read_abstraction_base *mra,  int *n_operands, struct op
     }
 }
 
-static enum operator
+static enum optr
 psh_pul_discrim (struct mem_read_abstraction_base *mra,
-                enum operator hint ATTRIBUTE_UNUSED)
+                enum optr hint ATTRIBUTE_UNUSED)
 {
   uint8_t byte;
   int status = mra->read (mra, 0, 1, &byte);
@@ -2528,8 +2528,8 @@ psh_pul_decode (struct mem_read_abstraction_base *mra,
     }
 }
 
-static enum operator
-bit_field_discrim (struct mem_read_abstraction_base *mra, enum operator hint ATTRIBUTE_UNUSED)
+static enum optr
+bit_field_discrim (struct mem_read_abstraction_base *mra, enum optr hint ATTRIBUTE_UNUSED)
 {
   int status;
   bfd_byte bb;
@@ -2647,12 +2647,12 @@ bit_field_decode (struct mem_read_abstraction_base *mra,
    The operation to be performed is returned.
    The number of operands, will be placed in N_OPERANDS.
    The operands themselved into OPERANDS.  */
-static enum operator
+static enum optr
 decode_operation (const struct opcode *opc,
                  struct mem_read_abstraction_base *mra,
                  int *n_operands, struct operand **operands)
 {
-  enum operator op = opc->operator;
+  enum optr op = opc->operator;
   if (opc->discriminator)
     op = opc->discriminator (mra, opc->operator);
 
@@ -2666,7 +2666,7 @@ decode_operation (const struct opcode *opc,
 }
 
 int
-decode_s12z (enum operator *myoperator, short *osize,
+decode_s12z (enum optr *myoperator, short *osize,
             int *n_operands, struct operand **operands,
             struct mem_read_abstraction_base *mra)
 {
index 186a7f29c3f0d3485388b9f6835465461ba7d1d5..04e15595b3876279877b43a69d86ae1d12ae8b5e 100644 (file)
@@ -34,7 +34,7 @@ struct mem_read_abstraction_base
 /* Machine code operators.
    These *roughly* correspond to opcodes.
    But describe their purpose rather than their form.  */
-enum operator
+enum optr
   {
     OP_INVALID = 0,
 
@@ -259,7 +259,7 @@ struct memory_operand
    It is the responsibility of the caller to free all operands
    when they are no longer needed.
    Returns the number of bytes read.  */
-int decode_s12z (enum operator *myoperator, short *osize,
+int decode_s12z (enum optr *myoperator, short *osize,
                 int *n_operands, struct operand **operands,
                 struct mem_read_abstraction_base *);
 
This page took 0.033114 seconds and 4 git commands to generate.