C++ comments

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.
This commit is contained in:
Alan Modra 2020-06-29 10:07:56 +09:30
parent 290a25dc2d
commit 279edac53d
25 changed files with 78 additions and 53 deletions

View 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.

View 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;

View 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;

View 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

View 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 ++)

View 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;
}

View 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

View 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;

View 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)

View 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

View 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},

View 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); */
}
}
}

View File

@ -2390,7 +2390,6 @@ emit_ld_r_n (expressionS *dst, expressionS *src)
break;
default:
ill_op ();
// return;
}
q = frag_more (prefix ? 2 : 1);

View 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.

View 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. */

View 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
{

View 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)
{

View 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.

View 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:

View 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),
};

View 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)

View 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. */
};

View 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},

View 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);

View File

@ -254,7 +254,6 @@ print_insn (bfd_vma memaddr, struct disassemble_info* info)
}
else if (!strcmp (decodePTR->opcodePTR->constraints, XGATE_OP_INH))
{
//
}
else
{