From 279edac53db8fa6482ee3e305c9627f788fd2699 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 29 Jun 2020 10:07:56 +0930 Subject: 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. --- opcodes/ChangeLog | 10 ++++++++++ opcodes/arm-dis.c | 6 +++--- opcodes/cr16-opc.c | 2 +- opcodes/ft32-dis.c | 2 +- opcodes/moxie-opc.c | 4 ++-- opcodes/s12z-opc.c | 2 +- opcodes/tic54x-dis.c | 2 +- opcodes/xgate-dis.c | 1 - 8 files changed, 19 insertions(+), 10 deletions(-) (limited to 'opcodes') diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 17806b4..46300b5 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,13 @@ +2020-06-29 Alan Modra + + * 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 * i386-opc.tbl: Add a blank line. diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index de62328..1b63bd3 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -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: diff --git a/opcodes/cr16-opc.c b/opcodes/cr16-opc.c index f303263..a9d1378 100644 --- a/opcodes/cr16-opc.c +++ b/opcodes/cr16-opc.c @@ -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), }; diff --git a/opcodes/ft32-dis.c b/opcodes/ft32-dis.c index 5f42fff..f486b38 100644 --- a/opcodes/ft32-dis.c +++ b/opcodes/ft32-dis.c @@ -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) diff --git a/opcodes/moxie-opc.c b/opcodes/moxie-opc.c index beff0373..b5a6ae8 100644 --- a/opcodes/moxie-opc.c +++ b/opcodes/moxie-opc.c @@ -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. */ }; diff --git a/opcodes/s12z-opc.c b/opcodes/s12z-opc.c index b68a4b8..980fa78 100644 --- a/opcodes/s12z-opc.c +++ b/opcodes/s12z-opc.c @@ -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}, diff --git a/opcodes/tic54x-dis.c b/opcodes/tic54x-dis.c index 2ec5851..1885168 100644 --- a/opcodes/tic54x-dis.c +++ b/opcodes/tic54x-dis.c @@ -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); diff --git a/opcodes/xgate-dis.c b/opcodes/xgate-dis.c index 61eeb99..810fbc4 100644 --- a/opcodes/xgate-dis.c +++ b/opcodes/xgate-dis.c @@ -254,7 +254,6 @@ print_insn (bfd_vma memaddr, struct disassemble_info* info) } else if (!strcmp (decodePTR->opcodePTR->constraints, XGATE_OP_INH)) { - // } else { -- cgit v1.1