C++ comments
authorAlan Modra <amodra@gmail.com>
Mon, 29 Jun 2020 00:37:56 +0000 (10:07 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 29 Jun 2020 00:37:56 +0000 (10:07 +0930)
binutils isn't c99 (yet).  This replaces or removes some C++ style
comments.

bfd/
* arc-got.h: Use C style comments.
* coff-z80.c: Likewise.
* elf32-csky.c: Likewise.
* peXXigen.c: Likewise.
* elf32-m32c.c (m32c_elf_relax_delete_bytes): Remove commented out
code.
binutils/
* dwarf.c: Use C style comments.
* resrc.c: Likewise.
gas/
* config/tc-s12z.c: Use C style comments.
* config/tc-z80.c: Likewise.
* config/tc-xtensa.c (emit_ld_r_n): Remove commented out code.
include/
* coff/internal.h: Use C style comments.
* coff/pe.h: Likewise.
* elf/ppc64.h: Likewise.
opcodes/
* arm-dis.c: Use C style comments.
* cr16-opc.c: Likewise.
* ft32-dis.c: Likewise.
* moxie-opc.c: Likewise.
* tic54x-dis.c: Likewise.
* s12z-opc.c: Remove useless comment.
* xgate-dis.c: Likewise.

25 files changed:
bfd/ChangeLog
bfd/arc-got.h
bfd/coff-z80.c
bfd/elf32-csky.c
bfd/elf32-m32c.c
bfd/peXXigen.c
binutils/ChangeLog
binutils/dwarf.c
binutils/resrc.c
gas/ChangeLog
gas/config/tc-s12z.c
gas/config/tc-xtensa.c
gas/config/tc-z80.c
include/ChangeLog
include/coff/internal.h
include/coff/pe.h
include/elf/ppc64.h
opcodes/ChangeLog
opcodes/arm-dis.c
opcodes/cr16-opc.c
opcodes/ft32-dis.c
opcodes/moxie-opc.c
opcodes/s12z-opc.c
opcodes/tic54x-dis.c
opcodes/xgate-dis.c

index 7b6375a0f712142b3cbf9cd1ca018721b58718c7..4a87b3bb5c2f4bc3afe888b502d3f9a8aa6cb856 100644 (file)
@@ -1,3 +1,12 @@
+2020-06-29  Alan Modra  <amodra@gmail.com>
+
+       * arc-got.h: Use C style comments.
+       * coff-z80.c: Likewise.
+       * elf32-csky.c: Likewise.
+       * peXXigen.c: Likewise.
+       * elf32-m32c.c (m32c_elf_relax_delete_bytes): Remove commented out
+       code.
+
 2020-06-26  Pat Bernardi  <bernardi@adacore.com>
 
        * elf32-m68k.c (m68k_elf_merge_obj_attributes): New function.
index 762d84dab09672f33893bed692eda8cb1ee6ff60..8053a2d9077ed449b3107c1d857d8d8f7a5ad520 100644 (file)
@@ -296,7 +296,7 @@ relocate_fix_got_relocs_for_got_info (struct got_entry **      list_p,
 
       if (h != NULL)
        {
-         // TODO: This should not be here.
+         /* TODO: This should not be here.  */
          reloc_data->sym_value = h->root.u.def.value;
          reloc_data->sym_section = h->root.u.def.section;
 
index 8913fb5bf956fa6cc353318eeaa710b35d647fd3..16f83cfeef7370aa110676eb9b41534090fb665c 100644 (file)
@@ -373,7 +373,7 @@ extra_case (bfd *in_abfd,
     case R_IMM8:
       if (reloc->howto->partial_inplace)
         val += bfd_get_8 ( in_abfd, data+*src_ptr) & reloc->howto->src_mask;
-      //fallthrough
+      /* Fall through.  */
     case R_BYTE0:
       bfd_put_8 (in_abfd, val, data + *dst_ptr);
       (*dst_ptr) += 1;
@@ -389,7 +389,7 @@ extra_case (bfd *in_abfd,
     case R_IMM16:
       if (reloc->howto->partial_inplace)
         val += bfd_get_16 ( in_abfd, data+*src_ptr) & reloc->howto->src_mask;
-      //fallthrough
+      /* Fall through.  */
     case R_WORD0:
       bfd_put_16 (in_abfd, val, data + *dst_ptr);
       (*dst_ptr) += 2;
index ea58e14c004b6075e4d4ca11395dfc24fde07774..669284bcfa19f17b0ca56b15f0de2a235434ada8 100644 (file)
@@ -3738,8 +3738,8 @@ csky_relocate_contents (reloc_howto_type *howto,
 
   /* FIXME: these macros should be defined at file head or head file head.  */
 #define CSKY_INSN_ADDI_TO_SUBI        0x04000000
-#define CSKY_INSN_MOV_RTB             0xc41d4820   // mov32 rx, r29, 0
-#define CSKY_INSN_MOV_RDB             0xc41c4820   // mov32 rx, r28, 0
+#define CSKY_INSN_MOV_RTB             0xc41d4820   /* mov32 rx, r29, 0 */
+#define CSKY_INSN_MOV_RDB             0xc41c4820   /* mov32 rx, r28, 0 */
 #define CSKY_INSN_GET_ADDI_RZ(x)      (((x) & 0x03e00000) >> 21)
 #define CSKY_INSN_SET_MOV_RZ(x)       ((x) & 0x0000001f)
 #define CSKY_INSN_JSRI_TO_LRW         0xea9a0000
index 7a97d6d9092f8a66a62549acafa602840b49866f..d839f62483070427e2518210b8e17a1f9a743ca8 100644 (file)
@@ -2072,7 +2072,6 @@ m32c_elf_relax_delete_bytes
   symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
              - symtab_hdr->sh_info);
   sym_hashes = elf_sym_hashes (abfd);
-  //  sym_hashes += symtab_hdr->sh_info;
   end_hashes = sym_hashes + symcount;
 
   for (; sym_hashes < end_hashes; sym_hashes ++)
index c33c495a0f6a4e4ac741d0b77d7a50a7e1c721a1..b3b68085ddcaaf9cb64cded9215a74f219678a5c 100644 (file)
@@ -1176,7 +1176,7 @@ _bfd_XXi_slurp_codeview_record (bfd * abfd, file_ptr where, unsigned long length
       memcpy (&(cvinfo->Signature[8]), &(cvinfo70->Signature[8]), 8);
 
       cvinfo->SignatureLength = CV_INFO_SIGNATURE_LENGTH;
-      // cvinfo->PdbFileName = cvinfo70->PdbFileName;
+      /* cvinfo->PdbFileName = cvinfo70->PdbFileName;  */
 
       return cvinfo;
     }
@@ -1187,7 +1187,7 @@ _bfd_XXi_slurp_codeview_record (bfd * abfd, file_ptr where, unsigned long length
       cvinfo->Age = H_GET_32(abfd, cvinfo20->Age);
       memcpy (cvinfo->Signature, cvinfo20->Signature, 4);
       cvinfo->SignatureLength = 4;
-      // cvinfo->PdbFileName = cvinfo20->PdbFileName;
+      /* cvinfo->PdbFileName = cvinfo20->PdbFileName;  */
 
       return cvinfo;
     }
@@ -2929,7 +2929,7 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile)
     case IMAGE_SUBSYSTEM_WINDOWS_CE_GUI:
       subsystem_name = "Wince CUI";
       break;
-    // These are from UEFI Platform Initialization Specification 1.1.
+    /* These are from UEFI Platform Initialization Specification 1.1.  */
     case IMAGE_SUBSYSTEM_EFI_APPLICATION:
       subsystem_name = "EFI application";
       break;
@@ -2942,11 +2942,11 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile)
     case IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER:
       subsystem_name = "SAL runtime driver";
       break;
-    // This is from revision 8.0 of the MS PE/COFF spec
+    /* This is from revision 8.0 of the MS PE/COFF spec  */
     case IMAGE_SUBSYSTEM_XBOX:
       subsystem_name = "XBOX";
       break;
-    // Added default case for clarity - subsystem_name is NULL anyway.
+    /* Added default case for clarity - subsystem_name is NULL anyway.  */
     default:
       subsystem_name = NULL;
     }
index 13d9c3e0576a967358ff5dfdf085120aaf2c6759..657bc9591b703b39ec92d0f1c03b1fd38b3ce7c2 100644 (file)
@@ -1,3 +1,8 @@
+2020-06-29  Alan Modra  <amodra@gmail.com>
+
+       * dwarf.c: Use C style comments.
+       * resrc.c: Likewise.
+
 2020-06-27  Alan Modra  <amodra@gmail.com>
 
        * elfcomm.c (setup_nested_archive): Set nested_arch->file to NULL
index e2f217ee0ba9961145c253ec1e986bcce08967f6..6e61bfdca16ae830937d37a99841793015e090c1 100644 (file)
@@ -9216,10 +9216,10 @@ display_debug_names (struct dwarf_section *section, void *file)
 
          unsigned char *entryptr = entry_pool + entry_offset;
 
-         // We need to scan first whether there is a single or multiple
-         // entries.  TAGNO is -2 for the first entry, it is -1 for the
-         // initial tag read of the second entry, then it becomes 0 for the
-         // first entry for real printing etc.
+         /* We need to scan first whether there is a single or multiple
+            entries.  TAGNO is -2 for the first entry, it is -1 for the
+            initial tag read of the second entry, then it becomes 0 for the
+            first entry for real printing etc.  */
          int tagno = -2;
          /* Initialize it due to a false compiler warning.  */
          dwarf_vma second_abbrev_tag = -1;
index 1d4335591567013904ce20181820f89a5b21f2a8..a875c3a4ac5bb47b0959d843d085904c99111179 100644 (file)
@@ -674,7 +674,7 @@ get_long (FILE *e, const char *msg)
 static void
 get_data (FILE *e, bfd_byte *p, rc_uint_type c, const char *msg)
 {
-  rc_uint_type got; // $$$d
+  rc_uint_type got; /* $$$d */
 
   got = (rc_uint_type) fread (p, 1, c, e);
   if (got == c)
index af34ad85ae137bc17efd87819bacdf471991eece..a498748a9a4cd98c57bd012a159019d57193f1b4 100644 (file)
@@ -1,3 +1,9 @@
+2020-06-29  Alan Modra  <amodra@gmail.com>
+
+       * config/tc-s12z.c: Use C style comments.
+       * config/tc-z80.c: Likewise.
+       * config/tc-xtensa.c (emit_ld_r_n): Remove commented out code.
+
 2020-06-26  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/tc-i386.c (md_assemble): Process ImmExt without
index 91480de405884ae6e7dffd965a1df99c56c13ce9..d89fb0c21ff3cd88a3bef527c012490eb2f6191a 100644 (file)
@@ -1325,20 +1325,20 @@ mul_reg_opr_opr (const struct instruction *insn)
 
 static const uint8_t reg_map [] =
   {
-    0x02,  // D2
-    0x01,  // D3
+    0x02,  /* D2 */
+    0x01,  /* D3 */
     0x20,
-    0x10,  // D5
-    0x08,  // D0
-    0x04,  // D1
-    0x08,  // D6
-    0x04,  // D7
+    0x10,  /* D5 */
+    0x08,  /* D0 */
+    0x04,  /* D1 */
+    0x08,  /* D6 */
+    0x04,  /* D7 */
     0x02,
-    0x01,  // Y
+    0x01,  /* Y */
     0x00,
     0x00,
-    0x20,   // CCH
-    0x10,   // CCL
+    0x20,  /* CCH */
+    0x10,  /* CCL */
     0x00
   };
 
@@ -3595,8 +3595,6 @@ static const struct instruction opcodes[] = {
   {"divu.lp", 2,  0x30,  mul_reg_opr_opr, 0},
   {"divu.ll", 2,  0x30,  mul_reg_opr_opr, 0},
 
-  //
-
   {"qmuls",   2,  0xb0,  mul_reg_reg_reg, 0},
   {"qmulu",   2,  0xb0,  mul_reg_reg_reg, 0},
 
@@ -3656,9 +3654,6 @@ static const struct instruction opcodes[] = {
   {"qmulu.lp", 2,  0xb0,  mul_reg_opr_opr, 0},
   {"qmulu.ll", 2,  0xb0,  mul_reg_opr_opr, 0},
 
-
-  //
-
   {"macs",   2,  0x48,  mul_reg_reg_reg, 0},
   {"macu",   2,  0x48,  mul_reg_reg_reg, 0},
 
@@ -3718,9 +3713,6 @@ static const struct instruction opcodes[] = {
   {"macu.lp", 2,  0x48,  mul_reg_opr_opr, 0},
   {"macu.ll", 2,  0x48,  mul_reg_opr_opr, 0},
 
-
-  //
-
   {"mods",   2,  0x38,  mul_reg_reg_reg, 0},
   {"modu",   2,  0x38,  mul_reg_reg_reg, 0},
 
index b512f7a36bace6b48773f959469371dffbcf306f..e4a234abb17abc5585706bea6e30e124da123740 100644 (file)
@@ -7882,7 +7882,7 @@ dump_litpools (void)
          printf("   %ld <%d:%d> (%d) [%d]: ",
                 lpf->addr, lpf->priority, lpf->original_priority,
                 lpf->fragP->fr_line, count);
-         //dump_frag(lpf->fragP);
+         /* dump_frag(lpf->fragP);  */
        }
     }
 }
index 59cda3d03c1756e25c7efa53881f39bbb84ac463..d9a8aa5fb8b984cbe09405eb311a784344f79b2b 100644 (file)
@@ -2390,7 +2390,6 @@ emit_ld_r_n (expressionS *dst, expressionS *src)
       break;
     default:
       ill_op ();
-//      return;
     }
 
   q = frag_more (prefix ? 2 : 1);
index dc7089ef80a05a9bce1f0c16593f84e4c1d56181..850da739a1a6862baba35fc263c870a8bcfac5b9 100644 (file)
@@ -1,3 +1,9 @@
+2020-06-29  Alan Modra  <amodra@gmail.com>
+
+       * coff/internal.h: Use C style comments.
+       * coff/pe.h: Likewise.
+       * elf/ppc64.h: Likewise.
+
 2020-06-26  Nick Alcock  <nick.alcock@oracle.com>
 
        * ctf-api.h (ctf_arc_bufopen): New.
index 2b6c08cb508b89e7c735bdaa21551dabd0d3cf2c..9f62699c244732aa1fc78cfe8084c04034e4b1c0 100644 (file)
@@ -161,7 +161,7 @@ typedef struct _CODEVIEW_INFO
   char          Signature[CV_INFO_SIGNATURE_LENGTH];
   unsigned int  SignatureLength;
   unsigned long Age;
-  // char PdbFileName[];
+  /* char PdbFileName[];  */
 } CODEVIEW_INFO;
 
 /* Default image base for NT.  */
index efb7075754886dd23e87440efc2bb70dadfcab78..c83a958eee08eff0d1e4ed0fee0f32b5059163a2 100644 (file)
@@ -578,10 +578,10 @@ struct external_IMAGE_DEBUG_DIRECTORY
 /* Extra structures used in codeview debug record.  */
 /* This is not part of the PE specification.  */
 
-#define CVINFO_PDB70_CVSIGNATURE 0x53445352 // "RSDS"
-#define CVINFO_PDB20_CVSIGNATURE 0x3031424e // "NB10"
-#define CVINFO_CV50_CVSIGNATURE  0x3131424e // "NB11"
-#define CVINFO_CV41_CVSIGNATURE  0x3930424e // "NB09"
+#define CVINFO_PDB70_CVSIGNATURE 0x53445352 /* "RSDS" */
+#define CVINFO_PDB20_CVSIGNATURE 0x3031424e /* "NB10" */
+#define CVINFO_CV50_CVSIGNATURE  0x3131424e /* "NB11" */
+#define CVINFO_CV41_CVSIGNATURE  0x3930424e /* "NB09" */
 
 typedef struct _CV_INFO_PDB70
 {
index f7034ec24b1d2617bd31dfbf17ec36ff4e50fa8f..f3e478fdfd064632d02b36e064d336bbf3b31b62 100644 (file)
@@ -256,14 +256,14 @@ END_RELOC_NUMBERS (R_PPC64_max)
 #define STO_PPC64_LOCAL_BIT            5
 #define STO_PPC64_LOCAL_MASK           (7 << STO_PPC64_LOCAL_BIT)
 
-// 3 bit other field to bytes.
+/* 3 bit other field to bytes.  */
 static inline unsigned int
 ppc64_decode_local_entry(unsigned int other)
 {
   return ((1 << other) >> 2) << 2;
 }
 
-// bytes to field value.
+/* bytes to field value.  */
 static inline unsigned int
 ppc64_encode_local_entry(unsigned int val)
 {
index 17806b432bb22b6fbf8e4278e1165c638af53215..46300b55acb02f433be415588d3a74e73923e750 100644 (file)
@@ -1,3 +1,13 @@
+2020-06-29  Alan Modra  <amodra@gmail.com>
+
+       * arm-dis.c: Use C style comments.
+       * cr16-opc.c: Likewise.
+       * ft32-dis.c: Likewise.
+       * moxie-opc.c: Likewise.
+       * tic54x-dis.c: Likewise.
+       * s12z-opc.c: Remove useless comment.
+       * xgate-dis.c: Likewise.
+
 2020-06-26  H.J. Lu  <hongjiu.lu@intel.com>
 
        * i386-opc.tbl: Add a blank line.
index de62328ec9b43cad1c196c62a66e038d76fd272f..1b63bd3d5f2c3ebac5bbcef0d7feb4466a6f6aae 100644 (file)
@@ -7034,14 +7034,14 @@ print_simd_imm8 (struct disassemble_info *info, unsigned long given,
       return;
     }
 
-  // printU determines whether the immediate value should be printed as
-  // unsigned.
+  /* printU determines whether the immediate value should be printed as
+     unsigned.  */
   unsigned printU = 0;
   switch (insn->mve_op)
     {
     default:
       break;
-    // We want this for instructions that don't have a 'signed' type
+    /* We want this for instructions that don't have a 'signed' type.  */
     case MVE_VBIC_IMM:
     case MVE_VORR_IMM:
     case MVE_VMVN_IMM:
index f3032634b58e4bba6675415b9d351e816de1346f..a9d1378b3b1e29d31cf9a446ead3c2cf7bb42e17 100644 (file)
@@ -493,7 +493,7 @@ const reg_entry cr16_regptab[] =
   REG_RP(9,8), REG_RP(10,9), REG_RP(11,10), REG_RP(12,11),
   REG((r12), 0xc, CR16_RP_REGTYPE),
   REG((r13), 0xd, CR16_RP_REGTYPE),
-  //REG((r14), 0xe, CR16_RP_REGTYPE),
+  /* REG((r14), 0xe, CR16_RP_REGTYPE), */
   REG((ra), 0xe, CR16_RP_REGTYPE),
   REG((sp), 0xf, CR16_RP_REGTYPE),
 };
index 5f42fff4f514b36619a60b07f9c535b30c2bb6aa..f486b38d9c1984f611f17c4ea5ca2a028bde3cf3 100644 (file)
@@ -81,7 +81,7 @@ ft32_opcode(bfd_vma addr ATTRIBUTE_UNUSED,
               switch (lobit)
               {
               case  FT32_FLD_CBCRCV:
-                // imm is {CB, CV}
+                /* imm is {CB, CV}  */
                 imm = ((iword >> FT32_FLD_CB_BIT) & ((1 << FT32_FLD_CB_SIZ) - 1)) << 4;
                 imm |= ((iword >> FT32_FLD_CV_BIT) & ((1 << FT32_FLD_CV_SIZ) - 1));
                 switch (imm)
index beff0373b1903a2336ea4f120d1cb1940dbae2e6..b5a6ae8fc756f95378806e24f0f7d4520f123f84 100644 (file)
@@ -52,7 +52,7 @@
 
 const moxie_opc_info_t moxie_form1_opc_info[128] =
   {
-    { 0x00, MOXIE_BAD,     "bad" },  // Reserved as bad.
+    { 0x00, MOXIE_BAD,     "bad" },  /* Reserved as bad.  */
     { 0x01, MOXIE_F1_A4,   "ldi.l" },
     { 0x02, MOXIE_F1_AB,   "mov" },
     { 0x03, MOXIE_F1_M,    "jsra" },
@@ -207,5 +207,5 @@ const moxie_opc_info_t moxie_form3_opc_info[16] =
     { 0x0c, MOXIE_BAD,     "bad" },
     { 0x0d, MOXIE_BAD,     "bad" },
     { 0x0e, MOXIE_BAD,     "bad" },
-    { 0x0f, MOXIE_BAD,     "bad" }  // Reserved as bad.
+    { 0x0f, MOXIE_BAD,     "bad" }  /* Reserved as bad.  */
   };
index b68a4b815c42c69c4e4e6f6e25d6086f84147ad0..980fa7875a7b9771b046600a140f7cfa7c830221 100644 (file)
@@ -1962,7 +1962,7 @@ static const  struct bm bm_table[] = {
   { 0x84, 0x00,     BM_REG_IMM},
   { 0x06, 0x06,     BM_REG_IMM},
   { 0xC6, 0x44,     BM_RESERVED0},
-  // 00
+
   { 0x8F, 0x80,     BM_OPR_B},
   { 0x8E, 0x82,     BM_OPR_W},
   { 0x8C, 0x88,     BM_OPR_L},
index 2ec585181d4e006ea601aca877324c68ef00aca5..18851680beb00f83e7b84d07cc08354159c73451 100644 (file)
@@ -117,7 +117,7 @@ tic54x_get_insn (disassemble_info *info, bfd_vma addr,
           bfd_byte opbuf[2];
           bfd_vma addr2 = addr + 1 + has_lkaddr (memdata, tm);
           int status = (*info->read_memory_func) (addr2, opbuf, 2, info);
-          // FIXME handle errors
+          /* FIXME handle errors.  */
           if (status == 0)
             {
               unsigned short data2 = bfd_getl16 (opbuf);
index 61eeb9971c6c94123a7af3ef4e4de076f47fe45c..810fbc4917d629c1901694cdeb6e2d6c930045cc 100644 (file)
@@ -254,7 +254,6 @@ print_insn (bfd_vma memaddr, struct disassemble_info* info)
             }
           else if (!strcmp (decodePTR->opcodePTR->constraints, XGATE_OP_INH))
             {
-                 //
             }
           else
             {
This page took 0.045535 seconds and 4 git commands to generate.