diff options
96 files changed, 415 insertions, 63 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 11381ea..a276240 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,44 @@ 2016-10-06 Alan Modra <amodra@gmail.com> + * coff-h8300.c: Spell fall through comments consistently. + * coffgen.c: Likewise. + * elf32-hppa.c: Likewise. + * elf32-ppc.c: Likewise. + * elf32-score.c: Likewise. + * elf32-score7.c: Likewise. + * elf64-ppc.c: Likewise. + * elfxx-aarch64.c: Likewise. + * elfxx-mips.c: Likewise. + * cpu-ns32k.c: Add missing fall through comments. + * elf-m10300.c: Likewise. + * elf32-arm.c: Likewise. + * elf32-avr.c: Likewise. + * elf32-bfin.c: Likewise. + * elf32-frv.c: Likewise. + * elf32-i386.c: Likewise. + * elf32-microblaze.c: Likewise. + * elf32-nds32.c: Likewise. + * elf32-ppc.c: Likewise. + * elf32-rl78.c: Likewise. + * elf32-rx.c: Likewise. + * elf32-s390.c: Likewise. + * elf32-sh.c: Likewise. + * elf32-tic6x.c: Likewise. + * elf64-ia64-vms.c: Likewise. + * elf64-ppc.c: Likewise. + * elf64-s390.c: Likewise. + * elf64-x86-64.c: Likewise. + * elflink.c: Likewise. + * elfnn-aarch64.c: Likewise. + * elfnn-ia64.c: Likewise. + * ieee.c: Likewise. + * oasys.c: Likewise. + * pdp11.c: Likewise. + * srec.c: Likewise. + * versados.c: Likewise. + +2016-10-06 Alan Modra <amodra@gmail.com> + * coffcode.h (coff_slurp_symbol_table): Revert accidental commit made 2015-01-08. * elf32-nds32.c (nds32_elf_grok_psinfo): Add missing break. diff --git a/bfd/coff-h8300.c b/bfd/coff-h8300.c index 3e4722c..a687708 100644 --- a/bfd/coff-h8300.c +++ b/bfd/coff-h8300.c @@ -579,9 +579,7 @@ h8300_reloc16_estimate (bfd *abfd, asection *input_section, arelent *reloc, /* Done with this reloc. */ break; } - - /* FALLTHROUGH and try to turn the 24-/32-bit reloc into a 16-bit - reloc. */ + /* Fall through. */ /* This is a 24-/32-bit absolute address in a mov insn, which can become an 16-bit absolute address if it's in the right range. */ diff --git a/bfd/coffgen.c b/bfd/coffgen.c index 216102e..1dc77a4 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -2134,7 +2134,7 @@ coff_print_symbol (bfd *abfd, auxp->u.auxent.x_scn.x_comdat); break; } - /* Otherwise fall through. */ + /* Fall through. */ case C_EXT: case C_AIX_WEAKEXT: if (ISFCN (combined->u.syment.n_type)) @@ -2154,7 +2154,7 @@ coff_print_symbol (bfd *abfd, llnos, next); break; } - /* Otherwise fall through. */ + /* Fall through. */ default: fprintf (file, "AUX lnno %d size 0x%x tagndx %ld", auxp->u.auxent.x_sym.x_misc.x_lnsz.x_lnno, diff --git a/bfd/cpu-ns32k.c b/bfd/cpu-ns32k.c index b11318c..98f22e1 100644 --- a/bfd/cpu-ns32k.c +++ b/bfd/cpu-ns32k.c @@ -106,8 +106,10 @@ _bfd_ns32k_get_immediate (bfd_byte *buffer, int size) case 4: value = (value << 8) | (*buffer++ & 0xff); value = (value << 8) | (*buffer++ & 0xff); + /* Fall through. */ case 2: value = (value << 8) | (*buffer++ & 0xff); + /* Fall through. */ case 1: value = (value << 8) | (*buffer++ & 0xff); break; @@ -126,8 +128,10 @@ _bfd_ns32k_put_immediate (bfd_vma value, bfd_byte *buffer, int size) case 4: *buffer-- = (value & 0xff); value >>= 8; *buffer-- = (value & 0xff); value >>= 8; + /* Fall through. */ case 2: *buffer-- = (value & 0xff); value >>= 8; + /* Fall through. */ case 1: *buffer-- = (value & 0xff); value >>= 8; } diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c index 9b44c0a..25f1668 100644 --- a/bfd/elf-m10300.c +++ b/bfd/elf-m10300.c @@ -1470,6 +1470,7 @@ mn10300_elf_final_link_relocate (reloc_howto_type *howto, && h != NULL && ! SYMBOL_REFERENCES_LOCAL (info, h)) return bfd_reloc_dangerous; + /* Fall through. */ case R_MN10300_GOT32: /* Issue 2052223: Taking the address of a protected function in a shared library diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index cafe1a2..8dcc6d8 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -10041,6 +10041,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, case R_ARM_ABS12: if (!globals->vxworks_p) return elf32_arm_abs12_reloc (input_bfd, hit_data, value + addend); + /* Fall through. */ case R_ARM_PC24: case R_ARM_ABS32: diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index ecea3d7..ef88f02 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -2682,6 +2682,7 @@ elf32_avr_relax_section (bfd *abfd, } } } + /* Fall through. */ default: { diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index 6a3dabc..0a00803 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -2695,6 +2695,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, case R_BFIN_BYTE4_DATA: if (! IS_FDPIC (output_bfd)) goto non_fdpic; + /* Fall through. */ case R_BFIN_GOT17M4: case R_BFIN_GOTHI: diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c index 5d8d330..80f6959 100644 --- a/bfd/elf32-frv.c +++ b/bfd/elf32-frv.c @@ -2775,6 +2775,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, case R_FRV_32: if (! IS_FDPIC (output_bfd)) goto non_fdpic; + /* Fall through. */ case R_FRV_GOT12: case R_FRV_GOTHI: diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 439e0d8..8d9638f 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -3951,7 +3951,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, } plabel = 1; } - /* Fall through and possibly emit a dynamic relocation. */ + /* Fall through. */ case R_PARISC_DIR17F: case R_PARISC_DIR17R: diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 14a99ba..c6f2fd6 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -1947,6 +1947,7 @@ elf_i386_check_relocs (bfd *abfd, case R_386_GOTOFF: eh->gotoff_ref = 1; + /* Fall through. */ case R_386_32: case R_386_PC32: case R_386_PLT32: diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c index cc4b3cc..778c6f0 100644 --- a/bfd/elf32-microblaze.c +++ b/bfd/elf32-microblaze.c @@ -1197,6 +1197,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, goto dogot; case (int) R_MICROBLAZE_TLSLD: tls_type = (TLS_TLS | TLS_LD); + /* Fall through. */ dogot: case (int) R_MICROBLAZE_GOT_64: { @@ -2401,8 +2402,10 @@ microblaze_elf_check_relocs (bfd * abfd, goto dogottls; case R_MICROBLAZE_TLSLD: tls_type |= (TLS_TLS | TLS_LD); + /* Fall through. */ dogottls: sec->has_tls_reloc = 1; + /* Fall through. */ case R_MICROBLAZE_GOT_64: if (htab->sgot == NULL) { diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c index 0f2d6da..ac09e87 100644 --- a/bfd/elf32-nds32.c +++ b/bfd/elf32-nds32.c @@ -11229,6 +11229,7 @@ nds32_elf_relax_letlsls (struct bfd_link_info *link_info, bfd *abfd, success = 1; break; } + /* Fall through. */ case (N32_OP6_MEM << 8) | N32_MEM_LH: case (N32_OP6_MEM << 8) | N32_MEM_SH: case (N32_OP6_MEM << 8) | N32_MEM_LHS: @@ -11243,6 +11244,7 @@ nds32_elf_relax_letlsls (struct bfd_link_info *link_info, bfd *abfd, success = 1; break; } + /* Fall through. */ case (N32_OP6_MEM << 8) | N32_MEM_LW: case (N32_OP6_MEM << 8) | N32_MEM_SW: /* The range is +/-64k. */ @@ -11256,6 +11258,7 @@ nds32_elf_relax_letlsls (struct bfd_link_info *link_info, bfd *abfd, success = 1; break; } + /* Fall through. */ default: break; } diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index f631b27..627bff5 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -4160,7 +4160,7 @@ ppc_elf_check_relocs (bfd *abfd, tls_type = TLS_TLS | TLS_DTPREL; dogottls: sec->has_tls_reloc = 1; - /* Fall thru */ + /* Fall through. */ /* GOT16 relocations */ case R_PPC_GOT16: @@ -4232,7 +4232,7 @@ ppc_elf_check_relocs (bfd *abfd, case R_PPC_SDAREL16: htab->sdata[0].sym->ref_regular = 1; - /* Fall thru */ + /* Fall through. */ case R_PPC_VLE_SDAREL_LO16A: case R_PPC_VLE_SDAREL_LO16D: @@ -5167,7 +5167,7 @@ ppc_elf_gc_sweep_hook (bfd *abfd, case R_PPC_REL32: if (h == NULL || h == htab->elf.hgot) break; - /* Fall thru */ + /* Fall through. */ case R_PPC_ADDR32: case R_PPC_ADDR24: @@ -5182,6 +5182,7 @@ ppc_elf_gc_sweep_hook (bfd *abfd, case R_PPC_UADDR16: if (bfd_link_pic (info)) break; + /* Fall through. */ case R_PPC_PLT32: case R_PPC_PLTREL24: @@ -5409,7 +5410,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, case R_PPC_GOT_TLSLD16: case R_PPC_GOT_TLSLD16_LO: expecting_tls_get_addr = 1; - /* Fall thru */ + /* Fall through. */ case R_PPC_GOT_TLSLD16_HI: case R_PPC_GOT_TLSLD16_HA: @@ -5427,7 +5428,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, case R_PPC_GOT_TLSGD16: case R_PPC_GOT_TLSGD16_LO: expecting_tls_get_addr = 1; - /* Fall thru */ + /* Fall through. */ case R_PPC_GOT_TLSGD16_HI: case R_PPC_GOT_TLSGD16_HA: @@ -8154,7 +8155,7 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_ADDR14_BRTAKEN: case R_PPC_REL14_BRTAKEN: branch_bit = BRANCH_PREDICT_BIT; - /* Fall thru */ + /* Fall through. */ /* Branch not taken prediction relocations. */ case R_PPC_ADDR14_BRNTAKEN: @@ -8978,7 +8979,7 @@ ppc_elf_relocate_section (bfd *output_bfd, + htab->plt->output_offset + ent->plt.offset); } - /* Fall thru */ + /* Fall through. */ case R_PPC_RELAX: { @@ -9480,7 +9481,7 @@ ppc_elf_relocate_section (bfd *output_bfd, alone (it will be set to zero elsewhere in the link). */ if (sec == NULL) break; - /* Fall thru */ + /* Fall through. */ case R_PPC_PLT16_HA: case R_PPC_GOT16_HA: diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c index 3ba426f..6cfed33 100644 --- a/bfd/elf32-rl78.c +++ b/bfd/elf32-rl78.c @@ -1958,6 +1958,7 @@ rl78_offset_for_reloc (bfd * abfd, default: reloc_computes_value: symval = rl78_compute_complex_reloc (r_type, symval, input_section); + /* Fall through. */ case R_RL78_DIR32: case R_RL78_DIR24S: case R_RL78_DIR16: diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c index 49556d2..7d5dc73 100644 --- a/bfd/elf32-rx.c +++ b/bfd/elf32-rx.c @@ -704,6 +704,7 @@ rx_elf_relocate_section case R_RX_RH_8_NEG: WARN_REDHAT ("RX_RH_8_NEG"); relocation = - relocation; + /* Fall through. */ case R_RX_DIR8S_PCREL: UNSAFE_FOR_PID; RANGE (-128, 127); @@ -725,6 +726,7 @@ rx_elf_relocate_section case R_RX_RH_16_NEG: WARN_REDHAT ("RX_RH_16_NEG"); relocation = - relocation; + /* Fall through. */ case R_RX_DIR16S_PCREL: UNSAFE_FOR_PID; RANGE (-32768, 32767); @@ -809,6 +811,7 @@ rx_elf_relocate_section UNSAFE_FOR_PID; WARN_REDHAT ("RX_RH_24_NEG"); relocation = - relocation; + /* Fall through. */ case R_RX_DIR24S_PCREL: RANGE (-0x800000, 0x7fffff); #if RX_OPCODE_BIG_ENDIAN @@ -1232,6 +1235,7 @@ rx_elf_relocate_section case R_RX_ABS8S: UNSAFE_FOR_PID; + /* Fall through. */ case R_RX_ABS8S_PCREL: RX_STACK_POP (relocation); RANGE (-128, 127); diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index 921268f..7285ad6 100644 --- a/bfd/elf32-s390.c +++ b/bfd/elf32-s390.c @@ -1124,6 +1124,7 @@ elf_s390_check_relocs (bfd *abfd, case R_390_GOTOFF32: if (h == NULL || !s390_is_ifunc_symbol_p (h) || !h->def_regular) break; + /* Fall through. */ case R_390_PLT12DBL: case R_390_PLT16DBL: @@ -2802,6 +2803,7 @@ elf_s390_relocate_section (bfd *output_bfd, + h ->plt.offset); goto do_relocation; } + /* Fall through. */ case R_390_8: case R_390_16: diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c index ec88a42..9f84c4e 100644 --- a/bfd/elf32-score.c +++ b/bfd/elf32-score.c @@ -2746,7 +2746,7 @@ s3_bfd_score_elf_relocate_section (bfd *output_bfd, default: msg = _("internal error: unknown error"); - /* fall through */ + /* Fall through. */ common_error: (*info->callbacks->warning) (info, msg, name, input_bfd, @@ -3655,7 +3655,8 @@ s3_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, } /* In case if we don't have global got symbols we default to setting DT_SCORE_GOTSYM to the same value as - DT_SCORE_SYMTABNO, so we just fall through. */ + DT_SCORE_SYMTABNO. */ + /* Fall through. */ case DT_SCORE_SYMTABNO: name = ".dynsym"; diff --git a/bfd/elf32-score7.c b/bfd/elf32-score7.c index 2c6da80..3aad1c7 100644 --- a/bfd/elf32-score7.c +++ b/bfd/elf32-score7.c @@ -2551,7 +2551,7 @@ s7_bfd_score_elf_relocate_section (bfd *output_bfd, default: msg = _("internal error: unknown error"); - /* fall through */ + /* Fall through. */ common_error: (*info->callbacks->warning) (info, msg, name, input_bfd, @@ -3466,7 +3466,8 @@ s7_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, } /* In case if we don't have global got symbols we default to setting DT_SCORE_GOTSYM to the same value as - DT_SCORE_SYMTABNO, so we just fall through. */ + DT_SCORE_SYMTABNO. */ + /* Fall through. */ case DT_SCORE_SYMTABNO: name = ".dynsym"; diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index d43ac54..7f108fb 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -5881,6 +5881,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, /* This may require an rofixup. */ if (!htab->fdpic_p) break; + /* Fall through. */ case R_SH_GOTPLT32: case R_SH_GOT32: case R_SH_GOT20: diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c index c70b169..d2dddbf 100644 --- a/bfd/elf32-tic6x.c +++ b/bfd/elf32-tic6x.c @@ -2365,6 +2365,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, goto done_reloc; } } + /* Fall through. */ case R_C6000_PCR_S12: case R_C6000_PCR_S10: diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c index 6f6d5e3..a64e8db 100644 --- a/bfd/elf64-ia64-vms.c +++ b/bfd/elf64-ia64-vms.c @@ -3958,6 +3958,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, rel->r_offset, input_section->size); break; } + /* Fall through. */ default: (*info->callbacks->reloc_overflow) (info, &h->root, diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 2a9ea1e..3264ecf 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -5471,7 +5471,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, tls_type = TLS_TLS | TLS_DTPREL; dogottls: sec->has_tls_reloc = 1; - /* Fall thru */ + /* Fall through */ case R_PPC64_GOT16: case R_PPC64_GOT16_DS: @@ -5619,6 +5619,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_PPC64_TOC16_DS: htab->do_multi_toc = 1; ppc64_elf_tdata (abfd)->has_small_toc_reloc = 1; + /* Fall through. */ case R_PPC64_TOC16_LO: case R_PPC64_TOC16_HI: case R_PPC64_TOC16_HA: @@ -8524,7 +8525,7 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info) case R_PPC64_GOT_TLSLD16_LO: expecting_tls_get_addr = 1; found_tls_get_addr_arg = 1; - /* Fall thru */ + /* Fall through. */ case R_PPC64_GOT_TLSLD16_HI: case R_PPC64_GOT_TLSLD16_HA: @@ -8544,7 +8545,7 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info) case R_PPC64_GOT_TLSGD16_LO: expecting_tls_get_addr = 1; found_tls_get_addr_arg = 1; - /* Fall thru */ + /* Fall through. */ case R_PPC64_GOT_TLSGD16_HI: case R_PPC64_GOT_TLSGD16_HA: @@ -8575,7 +8576,7 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info) case R_PPC64_TLSGD: case R_PPC64_TLSLD: found_tls_get_addr_arg = 1; - /* Fall thru */ + /* Fall through. */ case R_PPC64_TLS: case R_PPC64_TOC16: @@ -9268,7 +9269,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info) } if ((opc & (0x3f << 2)) == (58u << 2)) break; - /* Fall thru */ + /* Fall through. */ default: /* Wrong sort of reloc, or not a ld. We may @@ -14073,18 +14074,18 @@ ppc64_elf_relocate_section (bfd *output_bfd, case R_PPC64_ADDR14_BRTAKEN: case R_PPC64_REL14_BRTAKEN: insn = 0x01 << 21; /* 'y' or 't' bit, lowest bit of BO field. */ - /* Fall thru. */ + /* Fall through. */ /* Branch not taken prediction relocations. */ case R_PPC64_ADDR14_BRNTAKEN: case R_PPC64_REL14_BRNTAKEN: insn |= bfd_get_32 (output_bfd, contents + rel->r_offset) & ~(0x01 << 21); - /* Fall thru. */ + /* Fall through. */ case R_PPC64_REL14: max_br_offset = 1 << 15; - /* Fall thru. */ + /* Fall through. */ case R_PPC64_REL24: /* Calls to functions with a different TOC, such as calls to @@ -14730,7 +14731,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, case R_PPC64_DTPREL64: if (htab->elf.tls_sec != NULL) addend -= htab->elf.tls_sec->vma + DTP_OFFSET; - /* Fall thru */ + /* Fall through. */ /* Relocations that may need to be propagated if this is a dynamic object. */ @@ -15073,7 +15074,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, alone (it will be set to zero elsewhere in the link). */ if (sec == NULL) break; - /* Fall thru */ + /* Fall through. */ case R_PPC64_GOT16_HA: case R_PPC64_PLTGOT16_HA: diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index 431d06c..f9057e3 100644 --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -1052,6 +1052,7 @@ elf_s390_check_relocs (bfd *abfd, case R_390_GOTOFF64: if (h == NULL || !s390_is_ifunc_symbol_p (h) || !h->def_regular) break; + /* Fall through. */ case R_390_PLT12DBL: case R_390_PLT16DBL: @@ -2758,6 +2759,7 @@ elf_s390_relocate_section (bfd *output_bfd, + h->plt.offset); goto do_relocation; } + /* Fall through. */ case R_390_8: case R_390_16: diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 3cb5c80..2a372a6 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -2327,6 +2327,7 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, goto error_return; } } + /* Fall through. */ case R_X86_64_32S: case R_X86_64_PC64: @@ -2525,6 +2526,7 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_X86_64_32: if (!ABI_64_P (abfd)) goto pointer; + /* Fall through. */ case R_X86_64_8: case R_X86_64_16: case R_X86_64_32S: diff --git a/bfd/elflink.c b/bfd/elflink.c index d7207ff..1591682 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -7940,6 +7940,7 @@ eval_symbol (bfd_vma *result, case 'S': symbol_is_section = TRUE; + /* Fall through. */ case 's': ++sym; symlen = strtol (sym, (char **) symp, 10); diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index b23db29..56b0943 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -5312,6 +5312,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, bfd_set_error (bfd_error_bad_value); return FALSE; } + /* Fall through. */ case BFD_RELOC_AARCH64_16: #if ARCH_SIZE == 64 @@ -7323,6 +7324,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, bfd_set_error (bfd_error_bad_value); return FALSE; } + /* Fall through. */ case BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL: case BFD_RELOC_AARCH64_ADR_HI21_PCREL: diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c index 0654091..a9a01fe 100644 --- a/bfd/elfnn-ia64.c +++ b/bfd/elfnn-ia64.c @@ -4485,6 +4485,7 @@ missing_tls_sec: rel->r_offset, input_section->size); break; } + /* Fall through. */ default: (*info->callbacks->reloc_overflow) (info, &h->root, diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c index c861170..bdfb394 100644 --- a/bfd/elfxx-aarch64.c +++ b/bfd/elfxx-aarch64.c @@ -319,7 +319,7 @@ _bfd_aarch64_elf_put_addend (bfd *abfd, /* Force use of MOVZ. */ contents = reencode_movzn_to_movz (contents); } - /* fall through */ + /* Fall through. */ /* Group relocations to create a 16, 32, 48 or 64 bit unsigned data or abs address inline. */ diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index c1eeb71..65f1ee4 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -11645,7 +11645,8 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, } /* In case if we don't have global got symbols we default to setting DT_MIPS_GOTSYM to the same value as - DT_MIPS_SYMTABNO, so we just fall through. */ + DT_MIPS_SYMTABNO. */ + /* Fall through. */ case DT_MIPS_SYMTABNO: name = ".dynsym"; @@ -2597,10 +2597,13 @@ write_int (int value) { case 4: OUT (value >> 24); + /* Fall through. */ case 3: OUT (value >> 16); + /* Fall through. */ case 2: OUT (value >> 8); + /* Fall through. */ case 1: OUT (value); } @@ -2753,15 +2756,19 @@ drop_int (struct output_buffer_struct *buf) case 0x84: ch = THIS (); NEXT (); + /* Fall through. */ case 0x83: ch = THIS (); NEXT (); + /* Fall through. */ case 0x82: ch = THIS (); NEXT (); + /* Fall through. */ case 0x81: ch = THIS (); NEXT (); + /* Fall through. */ case 0x80: break; } @@ -2791,18 +2798,22 @@ copy_int (void) ch = THIS (); NEXT (); OUT (ch); + /* Fall through. */ case 0x83: ch = THIS (); NEXT (); OUT (ch); + /* Fall through. */ case 0x82: ch = THIS (); NEXT (); OUT (ch); + /* Fall through. */ case 0x81: ch = THIS (); NEXT (); OUT (ch); + /* Fall through. */ case 0x80: break; } @@ -2833,12 +2844,15 @@ copy_till_end (void) case 0x84: OUT (THIS ()); NEXT (); + /* Fall through. */ case 0x83: OUT (THIS ()); NEXT (); + /* Fall through. */ case 0x82: OUT (THIS ()); NEXT (); + /* Fall through. */ case 0x81: OUT (THIS ()); NEXT (); diff --git a/bfd/oasys.c b/bfd/oasys.c index cbc3578..5560d38 100644 --- a/bfd/oasys.c +++ b/bfd/oasys.c @@ -612,6 +612,7 @@ oasys_object_p (bfd *abfd) break; case oasys_record_is_data_enum: oasys->first_data_record = bfd_tell (abfd) - record.header.length; + /* Fall through. */ case oasys_record_is_debug_enum: case oasys_record_is_module_enum: case oasys_record_is_named_section_enum: diff --git a/bfd/pdp11.c b/bfd/pdp11.c index 7daf52d..089c917 100644 --- a/bfd/pdp11.c +++ b/bfd/pdp11.c @@ -2985,6 +2985,7 @@ aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data) case bfd_link_hash_undefweak: type = N_WEAKU; val = 0; + /* Fall through. */ case bfd_link_hash_indirect: case bfd_link_hash_warning: /* FIXME: Ignore these for now. The circumstances under which @@ -972,10 +972,12 @@ srec_write_record (bfd *abfd, case 7: TOHEX (dst, (address >> 24), check_sum); dst += 2; + /* Fall through. */ case 8: case 2: TOHEX (dst, (address >> 16), check_sum); dst += 2; + /* Fall through. */ case 9: case 1: case 0: diff --git a/bfd/versados.c b/bfd/versados.c index ed46e3b..cef4b68 100644 --- a/bfd/versados.c +++ b/bfd/versados.c @@ -296,6 +296,7 @@ process_esd (bfd *abfd, struct ext_esd *esd, int pass) break; case ESD_XDEF_IN_ABS: sec = bfd_abs_section_ptr; + /* Fall through. */ case ESD_XDEF_IN_SEC: { int snum = VDATA (abfd)->def_idx++; diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 4380b63..8512827 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,15 @@ 2016-10-06 Alan Modra <amodra@gmail.com> + * dlltool.c: Spell fall through comments consistently. + * objcopy.c: Likewise. + * readelf.c: Likewise. + * dwarf.c: Add missing fall through comments. + * elfcomm.c: Likewise. + * sysinfo.y: Likewise. + * readelf.c: Likewise. Also remove extraneous comments. + +2016-10-06 Alan Modra <amodra@gmail.com> + * cxxfilt.c (usage): Add ATTRIBUTE_NORETURN. * elfedit.c (usage): Likewise. * nm.c (usage): Likewise. diff --git a/binutils/dlltool.c b/binutils/dlltool.c index e116e6b..e7b40ee 100644 --- a/binutils/dlltool.c +++ b/binutils/dlltool.c @@ -2708,7 +2708,8 @@ make_one_lib_file (export_type *exp, int i, int delay) sec->orelocation = rpp; break; } - /* else fall through */ + /* Fall through. */ + case IDATA4: /* An idata$4 or idata$5 is one word long, and has an rva to idata$6. */ diff --git a/binutils/dwarf.c b/binutils/dwarf.c index b4687e9..fee6a60 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -1824,6 +1824,7 @@ read_and_display_attr_value (unsigned long attribute, { case DW_AT_frame_base: have_frame_base = 1; + /* Fall through. */ case DW_AT_location: case DW_AT_string_length: case DW_AT_return_addr: @@ -2099,6 +2100,7 @@ read_and_display_attr_value (unsigned long attribute, case DW_AT_frame_base: have_frame_base = 1; + /* Fall through. */ case DW_AT_location: case DW_AT_string_length: case DW_AT_return_addr: @@ -7654,6 +7656,7 @@ dwarf_select_sections_by_letters (const char *letters) case 'F': do_debug_frames_interp = 1; + /* Fall through. */ case 'f': do_debug_frames = 1; break; diff --git a/binutils/elfcomm.c b/binutils/elfcomm.c index b17627a..1b32186 100644 --- a/binutils/elfcomm.c +++ b/binutils/elfcomm.c @@ -165,6 +165,7 @@ byte_get_little_endian (unsigned char *field, int size) | (((unsigned long) (field[1])) << 8) | (((unsigned long) (field[2])) << 16) | (((unsigned long) (field[3])) << 24); + /* Fall through. */ case 6: if (sizeof (elf_vma) == 8) @@ -182,6 +183,7 @@ byte_get_little_endian (unsigned char *field, int size) | (((unsigned long) (field[1])) << 8) | (((unsigned long) (field[2])) << 16) | (((unsigned long) (field[3])) << 24); + /* Fall through. */ case 7: if (sizeof (elf_vma) == 8) @@ -200,6 +202,7 @@ byte_get_little_endian (unsigned char *field, int size) | (((unsigned long) (field[1])) << 8) | (((unsigned long) (field[2])) << 16) | (((unsigned long) (field[3])) << 24); + /* Fall through. */ case 8: if (sizeof (elf_vma) == 8) @@ -219,6 +222,7 @@ byte_get_little_endian (unsigned char *field, int size) | (((unsigned long) (field[1])) << 8) | (((unsigned long) (field[2])) << 16) | (((unsigned long) (field[3])) << 24); + /* Fall through. */ default: error (_("Unhandled data length: %d\n"), size); @@ -265,6 +269,7 @@ byte_get_big_endian (unsigned char *field, int size) | (((unsigned long) (field[1])) << 16) | (((unsigned long) (field[0])) << 24); } + /* Fall through. */ case 6: if (sizeof (elf_vma) == 8) @@ -284,6 +289,7 @@ byte_get_big_endian (unsigned char *field, int size) | (((unsigned long) (field[1])) << 16) | (((unsigned long) (field[0])) << 24); } + /* Fall through. */ case 7: if (sizeof (elf_vma) == 8) @@ -304,6 +310,7 @@ byte_get_big_endian (unsigned char *field, int size) | (((unsigned long) (field[1])) << 16) | (((unsigned long) (field[0])) << 24); } + /* Fall through. */ case 8: if (sizeof (elf_vma) == 8) @@ -325,6 +332,7 @@ byte_get_big_endian (unsigned char *field, int size) | (((unsigned long) (field[1])) << 16) | (((unsigned long) (field[0])) << 24); } + /* Fall through. */ default: error (_("Unhandled data length: %d\n"), size); diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 9a64ec3..1821c0c 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -4302,7 +4302,7 @@ copy_main (int argc, char *argv[]) { case OPTION_CHANGE_SECTION_ADDRESS: p->vma_val = val; - /* Drop through. */ + /* Fall through. */ case OPTION_CHANGE_SECTION_LMA: p->lma_val = val; diff --git a/binutils/readelf.c b/binutils/readelf.c index 9a07158..8ca8f4b 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -426,7 +426,7 @@ print_vma (bfd_vma vma, print_mode mode) { case FULL_HEX: nc = printf ("0x"); - /* Drop through. */ + /* Fall through. */ case LONG_HEX: #ifdef BFD64 @@ -439,11 +439,11 @@ print_vma (bfd_vma vma, print_mode mode) case DEC_5: if (vma <= 99999) return printf ("%5" BFD_VMA_FMT "d", vma); - /* Drop through. */ + /* Fall through. */ case PREFIX_HEX: nc = printf ("0x"); - /* Drop through. */ + /* Fall through. */ case HEX: return nc + printf ("%" BFD_VMA_FMT "x", vma); @@ -1292,6 +1292,7 @@ dump_relocations (FILE * file, rtype = elf_msp430x_reloc_type (type); break; } + /* Fall through. */ case EM_MSP430_OLD: rtype = elf_msp430_reloc_type (type); break; @@ -4450,7 +4451,7 @@ parse_args (int argc, char ** argv) default: /* xgettext:c-format */ error (_("Invalid option '-%c'\n"), c); - /* Drop through. */ + /* Fall through. */ case '?': usage (stderr); } @@ -9679,6 +9680,7 @@ process_dynamic_section (FILE * file) case DT_SYMENT : case DT_RELENT : dynamic_info[entry->d_tag] = entry->d_un.d_val; + /* Fall through. */ case DT_PLTPADSZ: case DT_MOVEENT : case DT_MOVESZ : @@ -11494,6 +11496,7 @@ target_specific_reloc_handling (Elf_Internal_Rela * reloc, case 10: /* R_MSP430_SYM_DIFF */ if (uses_msp430x_relocs ()) break; + /* Fall through. */ case 21: /* R_MSP430X_SYM_DIFF */ saved_sym = symtab + get_reloc_symindex (reloc->r_info); return TRUE; @@ -12011,6 +12014,7 @@ is_16bit_abs_reloc (unsigned int reloc_type) case EM_MSP430: if (uses_msp430x_relocs ()) return reloc_type == 2; /* R_MSP430_ABS16. */ + /* Fall through. */ case EM_MSP430_OLD: return reloc_type == 5; /* R_MSP430_16_BYTE. */ case EM_NDS32: @@ -14241,6 +14245,7 @@ process_attributes (FILE * file, goto do_numlist; case 3: printf (_("Symbol Attributes:")); + /* Fall through. */ do_numlist: for (;;) { @@ -16418,8 +16423,8 @@ get_file_header (FILE * file) /* Determine how to read the rest of the header. */ switch (elf_header.e_ident[EI_DATA]) { - default: /* fall through */ - case ELFDATANONE: /* fall through */ + default: + case ELFDATANONE: case ELFDATA2LSB: byte_get = byte_get_little_endian; byte_put = byte_put_little_endian; diff --git a/binutils/sysinfo.y b/binutils/sysinfo.y index 9df3cb3..10fb49a 100644 --- a/binutils/sysinfo.y +++ b/binutils/sysinfo.y @@ -153,9 +153,8 @@ it: break; case 'g': printf("\tchecksum(ffile,raw, idx, IT_%s_CODE);\n", it); - + /* Fall through. */ case 'i': - case 'o': case 'c': printf("}\n"); @@ -182,6 +181,7 @@ repeat_it_field: '(' REPEAT NAME printf("\tprintf(\"repeat %%d\\n\", %s);\n",$3); if (rdepth==2) printf("\tprintf(\"repeat %%d\\n\", %s[n]);\n",$3); + /* Fall through. */ case 'i': case 'g': case 'o': diff --git a/gas/ChangeLog b/gas/ChangeLog index 5ccc133..d0b8489 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,53 @@ 2016-10-06 Alan Modra <amodra@gmail.com> + * app.c: Add missing fall through comments. + * dw2gencfi.c: Likewise. + * expr.c: Likewise. + * config/tc-alpha.c: Likewise. + * config/tc-arc.c: Likewise. + * config/tc-arm.c: Likewise. + * config/tc-cr16.c: Likewise. + * config/tc-crx.c: Likewise. + * config/tc-dlx.c: Likewise. + * config/tc-h8300.c: Likewise. + * config/tc-hppa.c: Likewise. + * config/tc-i370.c: Likewise. + * config/tc-i386.c: Likewise. + * config/tc-i960.c: Likewise. + * config/tc-ia64.c: Likewise. + * config/tc-m68hc11.c: Likewise. + * config/tc-m68k.c: Likewise. + * config/tc-mep.c: Likewise. + * config/tc-metag.c: Likewise. + * config/tc-microblaze.c: Likewise. + * config/tc-mips.c: Likewise. + * config/tc-ns32k.c: Likewise. + * config/tc-rx.c: Likewise. + * config/tc-score.c: Likewise. + * config/tc-score7.c: Likewise. + * config/tc-sh.c: Likewise. + * config/tc-tic4x.c: Likewise. + * config/tc-vax.c: Likewise. + * config/tc-xstormy16.c: Likewise. + * config/tc-z80.c: Likewise. + * config/tc-z8k.c: Likewise. + * config/obj-elf.c: Likewise. + * config/tc-i386.c: Likewise. + * depend.c: Spell fall through comments consistently. + * config/tc-arm.c: Likewise. + * config/tc-d10v.c: Likewise. + * config/tc-i960.c: Likewise. + * config/tc-ia64.c: Likewise. + * config/tc-m68k.c: Likewise. + * config/tc-mcore.c: Likewise. + * config/tc-mep.c: Likewise. + * config/tc-ns32k.c: Likewise. + * config/tc-visium.c: Likewise. + * config/tc-xstormy16.c: Likewise. + * config/tc-z8k.c: Likewise. + +2016-10-06 Alan Modra <amodra@gmail.com> + * as.h (as_assert): Add ATTRIBUTE_NORETURN. 2016-10-06 Alan Modra <amodra@gmail.com> @@ -695,6 +695,7 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen) state = 9; break; } + /* Fall through. */ case 17: /* We have seen "af" at the start of a symbol, a ' here is a part of that symbol. */ diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 8af563f..8d80c77 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -813,6 +813,7 @@ obj_elf_parse_section_letters (char *str, size_t len, bfd_boolean *is_clone) } break; } + /* Fall through. */ default: { const char *bad_msg = _("unrecognized .section attribute:" diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c index c70b164..f7656ec 100644 --- a/gas/config/tc-alpha.c +++ b/gas/config/tc-alpha.c @@ -1005,6 +1005,7 @@ tokenize_arguments (char *str, /* ... then fall through to plain expression. */ input_line_pointer = hold; } + /* Fall through. */ default: if (saw_arg && !saw_comma) @@ -5583,6 +5584,7 @@ md_atof (int type, char *litP, int *sizeP) case 'G': /* vax_md_atof() doesn't like "G" for some reason. */ type = 'g'; + /* Fall through. */ case 'F': case 'D': return vax_md_atof (type, litP, sizeP); diff --git a/gas/config/tc-arc.c b/gas/config/tc-arc.c index d480bf1..f28abf4 100644 --- a/gas/config/tc-arc.c +++ b/gas/config/tc-arc.c @@ -1836,7 +1836,7 @@ find_opcode_match (const struct arc_opcode_hash_entry *entry, if (tok[tokidx].X_op != O_constant) goto de_fault; } - /* Fall-through */ + /* Fall through. */ case O_constant: /* Check the range. */ if (operand->bits != 32 @@ -1908,6 +1908,7 @@ find_opcode_match (const struct arc_opcode_hash_entry *entry, goto match_failed; break; } + /* Fall through. */ default: de_fault: if (operand->default_reloc == 0) @@ -1926,6 +1927,7 @@ find_opcode_match (const struct arc_opcode_hash_entry *entry, case O_tlsie: if (!(operand->flags & ARC_OPERAND_LIMM)) goto match_failed; + /* Fall through. */ case O_absent: if (!generic_reloc_p (operand->default_reloc)) goto match_failed; @@ -3022,6 +3024,7 @@ md_apply_fix (fixS *fixP, case BFD_RELOC_ARC_TLS_LE_32: gas_assert (!fixP->fx_addsy); gas_assert (!fixP->fx_subsy); + /* Fall through. */ case BFD_RELOC_ARC_GOTOFF: case BFD_RELOC_ARC_32_ME: @@ -3047,6 +3050,7 @@ md_apply_fix (fixS *fixP, case BFD_RELOC_ARC_S21W_PCREL_PLT: reloc = BFD_RELOC_ARC_S21W_PCREL; + /* Fall through. */ case BFD_RELOC_ARC_S25W_PCREL: case BFD_RELOC_ARC_S21W_PCREL: @@ -3868,6 +3872,7 @@ assemble_insn (const struct arc_opcode *opcode, image = insert_operand (image, operand, regs, NULL, 0); break; } + /* Fall through. */ default: /* This operand needs a relocation. */ diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index db6dd68..526131c 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -1276,6 +1276,7 @@ arm_reg_alt_syntax (char **ccp, char *start, struct reg_entry *reg, if (*ccp != start && processor <= 15) return processor; } + /* Fall through. */ case REG_TYPE_MMXWC: /* WC includes WCG. ??? I'm not sure this is true for all @@ -17773,7 +17774,7 @@ opcode_lookup (char **str) case OT_odd_infix_unc: if (!unified_syntax) return 0; - /* else fall through */ + /* Fall through. */ case OT_csuffix: case OT_csuffixF: @@ -22842,6 +22843,7 @@ md_apply_fix (fixS * fixP, case BFD_RELOC_ARM_OFFSET_IMM: if (!fixP->fx_done && seg->use_rela_p) value = 0; + /* Fall through. */ case BFD_RELOC_ARM_LITERAL: sign = value > 0; @@ -23200,6 +23202,7 @@ md_apply_fix (fixS * fixP, newval = md_chars_to_number (buf, INSN_SIZE); fixP->fx_done = 0; } + /* Fall through. */ case BFD_RELOC_ARM_PLT32: #endif @@ -24092,6 +24095,7 @@ tc_gen_reloc (asection *section, fixS *fixp) code = BFD_RELOC_8_PCREL; break; } + /* Fall through. */ case BFD_RELOC_16: if (fixp->fx_pcrel) @@ -24099,6 +24103,7 @@ tc_gen_reloc (asection *section, fixS *fixp) code = BFD_RELOC_16_PCREL; break; } + /* Fall through. */ case BFD_RELOC_32: if (fixp->fx_pcrel) @@ -24106,6 +24111,7 @@ tc_gen_reloc (asection *section, fixS *fixp) code = BFD_RELOC_32_PCREL; break; } + /* Fall through. */ case BFD_RELOC_ARM_MOVW: if (fixp->fx_pcrel) @@ -24113,6 +24119,7 @@ tc_gen_reloc (asection *section, fixS *fixp) code = BFD_RELOC_ARM_MOVW_PCREL; break; } + /* Fall through. */ case BFD_RELOC_ARM_MOVT: if (fixp->fx_pcrel) @@ -24120,6 +24127,7 @@ tc_gen_reloc (asection *section, fixS *fixp) code = BFD_RELOC_ARM_MOVT_PCREL; break; } + /* Fall through. */ case BFD_RELOC_ARM_THUMB_MOVW: if (fixp->fx_pcrel) @@ -24127,6 +24135,7 @@ tc_gen_reloc (asection *section, fixS *fixp) code = BFD_RELOC_ARM_THUMB_MOVW_PCREL; break; } + /* Fall through. */ case BFD_RELOC_ARM_THUMB_MOVT: if (fixp->fx_pcrel) @@ -24134,6 +24143,7 @@ tc_gen_reloc (asection *section, fixS *fixp) code = BFD_RELOC_ARM_THUMB_MOVT_PCREL; break; } + /* Fall through. */ case BFD_RELOC_NONE: case BFD_RELOC_ARM_PCREL_BRANCH: diff --git a/gas/config/tc-cr16.c b/gas/config/tc-cr16.c index 40d9ba4..186cfb9 100644 --- a/gas/config/tc-cr16.c +++ b/gas/config/tc-cr16.c @@ -1165,6 +1165,7 @@ set_operand (char *operand, ins * cr16_ins) { case arg_ic: /* Case $0x18. */ operandS++; + /* Fall through. */ case arg_c: /* Case 0x18. */ /* Set constant. */ process_label_constant (operandS, cr16_ins); @@ -1182,6 +1183,7 @@ set_operand (char *operand, ins * cr16_ins) *operandE = '\0'; process_label_constant (operandS, cr16_ins); operandS = operandE; + /* Fall through. */ case arg_rbase: /* Case (r1) or (r1,r0). */ operandS++; /* Set register base. */ @@ -1789,7 +1791,9 @@ print_constant (int nbits, int shift, argument *arg) break; case 21: - if ((nbits == 21) && (IS_INSN_TYPE (LD_STOR_INS))) nbits = 20; + if ((nbits == 21) && (IS_INSN_TYPE (LD_STOR_INS))) + nbits = 20; + /* Fall through. */ case 24: case 22: case 20: diff --git a/gas/config/tc-crx.c b/gas/config/tc-crx.c index 9a943d5..a9af5bb 100644 --- a/gas/config/tc-crx.c +++ b/gas/config/tc-crx.c @@ -730,6 +730,7 @@ set_operand (char *operand, ins * crx_ins) case arg_sc: /* Case *+0x18. */ case arg_ic: /* Case $0x18. */ operandS++; + /* Fall through. */ case arg_c: /* Case 0x18. */ /* Set constant. */ process_label_constant (operandS, crx_ins); @@ -747,6 +748,7 @@ set_operand (char *operand, ins * crx_ins) *operandE = '\0'; process_label_constant (operandS, crx_ins); operandS = operandE; + /* Fall through. */ case arg_rbase: /* Case (r1). */ operandS++; /* Set register base. */ @@ -1279,6 +1281,7 @@ print_operand (int nbits, int shift, argument *arg) CRX_PRINT (0, getreg_image (arg->r), 12); CRX_PRINT (0, getreg_image (arg->i_r), 8); CRX_PRINT (0, arg->scale, 6); + /* Fall through. */ case arg_ic: case arg_c: print_constant (nbits, shift, arg); diff --git a/gas/config/tc-d10v.c b/gas/config/tc-d10v.c index 03b264d..e7cfcdf 100644 --- a/gas/config/tc-d10v.c +++ b/gas/config/tc-d10v.c @@ -1548,7 +1548,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) if ( segf && segf->sym != fixP->fx_addsy) value = 0; } - /* Drop through. */ + /* Fall through. */ case BFD_RELOC_D10V_18: /* Instruction addresses are always right-shifted by 2. */ value >>= AT_WORD_RIGHT_SHIFT; diff --git a/gas/config/tc-dlx.c b/gas/config/tc-dlx.c index 079a9b6..a03aa19 100644 --- a/gas/config/tc-dlx.c +++ b/gas/config/tc-dlx.c @@ -780,6 +780,7 @@ machine_ip (char *str) reg_shift = 21; goto general_reg; } + /* Fall through. */ /* The immediate 16 bits literal, bit 0-15. */ case 'i': diff --git a/gas/config/tc-h8300.c b/gas/config/tc-h8300.c index 048d31e..28566a5 100644 --- a/gas/config/tc-h8300.c +++ b/gas/config/tc-h8300.c @@ -1432,6 +1432,7 @@ do_a_fix_imm (int offset, int nibble, struct h8_op *operand, int relaxmode, cons break; default: as_bad (_("Can't work out size of operand.\n")); + /* Fall through. */ case L_16: case L_16U: size = 2; diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c index f5cdc2c..2ed06a2 100644 --- a/gas/config/tc-hppa.c +++ b/gas/config/tc-hppa.c @@ -5432,6 +5432,7 @@ pa_ip (char *str) { case SGL: opcode |= 0x20; + /* Fall through. */ case DBL: the_insn.fpof1 = flag; continue; diff --git a/gas/config/tc-i370.c b/gas/config/tc-i370.c index ac8aa95..6299cc7 100644 --- a/gas/config/tc-i370.c +++ b/gas/config/tc-i370.c @@ -956,6 +956,7 @@ i370_dc (int unused ATTRIBUTE_UNUSED) break; case 'E': /* 32-bit */ type = 'f'; + /* Fall through. */ case 'D': /* 64-bit */ md_atof (type, tmp, &nbytes); p = frag_more (nbytes); diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 660d23e..0ab9e1e 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -1374,9 +1374,11 @@ operand_type_all_zero (const union i386_operand_type *x) case 3: if (x->array[2]) return 0; + /* Fall through. */ case 2: if (x->array[1]) return 0; + /* Fall through. */ case 1: return !x->array[0]; default: @@ -1391,10 +1393,13 @@ operand_type_set (union i386_operand_type *x, unsigned int v) { case 3: x->array[2] = v; + /* Fall through. */ case 2: x->array[1] = v; + /* Fall through. */ case 1: x->array[0] = v; + /* Fall through. */ break; default: abort (); @@ -1410,9 +1415,11 @@ operand_type_equal (const union i386_operand_type *x, case 3: if (x->array[2] != y->array[2]) return 0; + /* Fall through. */ case 2: if (x->array[1] != y->array[1]) return 0; + /* Fall through. */ case 1: return x->array[0] == y->array[0]; break; @@ -1429,9 +1436,11 @@ cpu_flags_all_zero (const union i386_cpu_flags *x) case 3: if (x->array[2]) return 0; + /* Fall through. */ case 2: if (x->array[1]) return 0; + /* Fall through. */ case 1: return !x->array[0]; default: @@ -1448,9 +1457,11 @@ cpu_flags_equal (const union i386_cpu_flags *x, case 3: if (x->array[2] != y->array[2]) return 0; + /* Fall through. */ case 2: if (x->array[1] != y->array[1]) return 0; + /* Fall through. */ case 1: return x->array[0] == y->array[0]; break; @@ -1473,8 +1484,10 @@ cpu_flags_and (i386_cpu_flags x, i386_cpu_flags y) { case 3: x.array [2] &= y.array [2]; + /* Fall through. */ case 2: x.array [1] &= y.array [1]; + /* Fall through. */ case 1: x.array [0] &= y.array [0]; break; @@ -1491,8 +1504,10 @@ cpu_flags_or (i386_cpu_flags x, i386_cpu_flags y) { case 3: x.array [2] |= y.array [2]; + /* Fall through. */ case 2: x.array [1] |= y.array [1]; + /* Fall through. */ case 1: x.array [0] |= y.array [0]; break; @@ -1509,8 +1524,10 @@ cpu_flags_and_not (i386_cpu_flags x, i386_cpu_flags y) { case 3: x.array [2] &= ~y.array [2]; + /* Fall through. */ case 2: x.array [1] &= ~y.array [1]; + /* Fall through. */ case 1: x.array [0] &= ~y.array [0]; break; @@ -1607,8 +1624,10 @@ operand_type_and (i386_operand_type x, i386_operand_type y) { case 3: x.array [2] &= y.array [2]; + /* Fall through. */ case 2: x.array [1] &= y.array [1]; + /* Fall through. */ case 1: x.array [0] &= y.array [0]; break; @@ -1625,8 +1644,10 @@ operand_type_or (i386_operand_type x, i386_operand_type y) { case 3: x.array [2] |= y.array [2]; + /* Fall through. */ case 2: x.array [1] |= y.array [1]; + /* Fall through. */ case 1: x.array [0] |= y.array [0]; break; @@ -1643,8 +1664,10 @@ operand_type_xor (i386_operand_type x, i386_operand_type y) { case 3: x.array [2] ^= y.array [2]; + /* Fall through. */ case 2: x.array [1] ^= y.array [1]; + /* Fall through. */ case 1: x.array [0] ^= y.array [0]; break; @@ -3928,6 +3951,7 @@ check_suffix: if (intel_syntax && (intel_float_operand (mnemonic) & 2)) i.suffix = SHORT_MNEM_SUFFIX; else + /* Fall through. */ case BYTE_MNEM_SUFFIX: case QWORD_MNEM_SUFFIX: i.suffix = mnem_p[-1]; @@ -4203,6 +4227,7 @@ swap_operands (void) case 5: case 4: swap_2_operands (1, i.operands - 2); + /* Fall through. */ case 3: case 2: swap_2_operands (0, i.operands - 1); @@ -4942,11 +4967,13 @@ match_template (char mnem_suffix) else if (t->opcode_modifier.d) goto check_reverse; } + /* Fall through. */ case 3: /* If we swap operand in encoding, we match the next one. */ if (i.swap_operand && t->opcode_modifier.s) continue; + /* Fall through. */ case 4: case 5: overlap1 = operand_type_and (i.types[1], operand_types[1]); @@ -4998,9 +5025,11 @@ check_reverse: case 5: overlap4 = operand_type_and (i.types[4], operand_types[4]); + /* Fall through. */ case 4: overlap3 = operand_type_and (i.types[3], operand_types[3]); + /* Fall through. */ case 3: overlap2 = operand_type_and (i.types[2], operand_types[2]); @@ -5018,6 +5047,7 @@ check_reverse: i.types[4], operand_types[4])) continue; + /* Fall through. */ case 4: if (!operand_type_match (overlap3, i.types[3]) || (check_register @@ -5028,6 +5058,7 @@ check_reverse: i.types[3], operand_types[3]))) continue; + /* Fall through. */ case 3: /* Here we make use of the fact that there are no reverse match 3 operand instructions, and all 3 @@ -5370,6 +5401,7 @@ process_suffix (void) i.suffix = QWORD_MNEM_SUFFIX; break; } + /* Fall through. */ case CODE_32BIT: if (!i.tm.opcode_modifier.no_lsuf) i.suffix = LONG_MNEM_SUFFIX; @@ -6953,6 +6985,7 @@ output_jump (void) { case 2: *p++ = i.tm.base_opcode >> 8; + /* Fall through. */ case 1: *p++ = i.tm.base_opcode; break; @@ -10694,6 +10727,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp) return NULL; } #endif + /* Fall through. */ case BFD_RELOC_X86_64_PLT32: case BFD_RELOC_X86_64_GOT32: @@ -10746,6 +10780,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp) code = fixp->fx_r_type; break; } + /* Fall through. */ default: if (fixp->fx_pcrel) { diff --git a/gas/config/tc-i960.c b/gas/config/tc-i960.c index 5afbb6f..70ac379 100644 --- a/gas/config/tc-i960.c +++ b/gas/config/tc-i960.c @@ -1041,7 +1041,7 @@ parse_memop (memS *memP, /* Where to put the results. */ case I_BIT: /* Treat missing displacement as displacement of 0. */ mode |= D_BIT; - /* Fall into next case. */ + /* Fall through. */ case D_BIT | A_BIT | I_BIT: case D_BIT | I_BIT: /* Set MEMB bit in mode, and OR in mode bits. */ @@ -1676,6 +1676,7 @@ md_assemble (char *textP) mem_fmt (args, oP, 1); break; } + /* Fall through. */ case MEM2: case MEM4: case MEM8: diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index 83ea813..d6c2822 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -2738,6 +2738,7 @@ slot_index (unsigned long slot_addr, as_fatal (_("Only constant offsets are supported")); break; } + /* Fall through. */ case rs_fill: s_index += 3 * (first_frag->fr_offset >> 4); break; @@ -5635,6 +5636,7 @@ operand_match (const struct ia64_opcode *idesc, int res_index, expressionS *e) /* SOR must be an integer multiple of 8 */ if (e->X_op == O_constant && e->X_add_number & 0x7) return OPERAND_OUT_OF_RANGE; + /* Fall through. */ case IA64_OPND_SOF: case IA64_OPND_SOL: if (e->X_op == O_constant) @@ -5790,6 +5792,7 @@ operand_match (const struct ia64_opcode *idesc, int res_index, expressionS *e) case IA64_OPND_IMM14: case IA64_OPND_IMM22: relocatable = 1; + /* Fall through. */ case IA64_OPND_IMM1: case IA64_OPND_IMM8: case IA64_OPND_IMM8U4: @@ -5929,6 +5932,7 @@ operand_match (const struct ia64_opcode *idesc, int res_index, expressionS *e) ++CURR_SLOT.num_fixups; return OPERAND_MATCH; } + /* Fall through. */ case IA64_OPND_TAG13: case IA64_OPND_TAG13b: switch (e->X_op) @@ -9281,6 +9285,7 @@ dep->name, idesc->name, (rsrc_write?"write":"read"), note) { specs[count++] = tmpl; } + /* Fall through. */ case AR_RSC: if (!rsrc_write && (regno == AR_BSPSTORE @@ -10263,7 +10268,7 @@ remove_marked_resource (struct rsrc *rs) case IA64_DVS_SPECIFIC: if (md.debug_dv) fprintf (stderr, "Implementation-specific, assume worst case...\n"); - /* ...fall through... */ + /* Fall through. */ case IA64_DVS_INSTR: if (md.debug_dv) fprintf (stderr, "Inserting instr serialization\n"); diff --git a/gas/config/tc-m68hc11.c b/gas/config/tc-m68hc11.c index 2f80e0a..1fc52b1 100644 --- a/gas/config/tc-m68hc11.c +++ b/gas/config/tc-m68hc11.c @@ -2287,6 +2287,7 @@ build_indexed_byte (operand *op, int format ATTRIBUTE_UNUSED, int move_insn) default: as_bad (_("Invalid accumulator register.")); + /* Fall through. */ case REG_D: byte = 0xE6; diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c index 4d2c0e4..4f64f5c 100644 --- a/gas/config/tc-m68k.c +++ b/gas/config/tc-m68k.c @@ -3003,7 +3003,7 @@ m68k_ip (char *instring) TAB (ABSTOPCREL, SZ_UNDEF)); break; } - /* Fall through into long. */ + /* Fall through. */ case SIZE_LONG: if (isvar (&opP->disp)) add_fix ('l', &opP->disp, 0, 0); @@ -3109,6 +3109,7 @@ m68k_ip (char *instring) break; case '3': tmpreg &= 0xFF; + /* Fall through. */ case '8': case 'C': case 'j': diff --git a/gas/config/tc-mcore.c b/gas/config/tc-mcore.c index 468a01b..ec03a29 100644 --- a/gas/config/tc-mcore.c +++ b/gas/config/tc-mcore.c @@ -979,7 +979,7 @@ md_assemble (char * str) as_bad (_("M340 specific opcode used when assembling for M210")); break; } - /* drop through... */ + /* Fall through. */ case O2: op_end = parse_reg (op_end + 1, & reg); inst |= reg; diff --git a/gas/config/tc-mep.c b/gas/config/tc-mep.c index f018f74..dac10c9 100644 --- a/gas/config/tc-mep.c +++ b/gas/config/tc-mep.c @@ -1708,7 +1708,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, operand = MEP_OPERAND_PCREL17A2; break; } - /* ...FALLTHROUGH... */ + /* Fall through. */ case MEP_INSN_JMP: addend = target_address_for (fragP); @@ -1723,6 +1723,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, case MEP_INSN_BNEZ: bit = 1; + /* Fall through. */ case MEP_INSN_BEQZ: fragP->fr_opcode[1^e] = bit | (addend & 0xfe); operand = MEP_OPERAND_PCREL8A2; @@ -1730,6 +1731,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, case MEP_INSN_BNEI: bit = 4; + /* Fall through. */ case MEP_INSN_BEQI: if (subtype_mappings[fragP->fr_subtype].growth) { diff --git a/gas/config/tc-metag.c b/gas/config/tc-metag.c index e9f8687..b56f9d2 100644 --- a/gas/config/tc-metag.c +++ b/gas/config/tc-metag.c @@ -2683,6 +2683,7 @@ parse_alu (const char *line, metag_insn *insn, insn->bits |= (1 << 7); break; } + /* Fall through. */ default: as_bad (_("invalid quickrot register specified")); return NULL; diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c index b4985f0..286efd4 100644 --- a/gas/config/tc-microblaze.c +++ b/gas/config/tc-microblaze.c @@ -2132,6 +2132,7 @@ md_apply_fix (fixS * fixP, case BFD_RELOC_MICROBLAZE_64_TLSGD: case BFD_RELOC_MICROBLAZE_64_TLSLD: S_SET_THREAD_LOCAL (fixP->fx_addsy); + /* Fall through. */ case BFD_RELOC_MICROBLAZE_64_GOTPC: case BFD_RELOC_MICROBLAZE_64_GOT: diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 224b9d0..283ed80 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -9848,6 +9848,7 @@ macro (struct mips_cl_insn *ip, char *str) { case M_DABS: dbl = 1; + /* Fall through. */ case M_ABS: /* bgez $a0,1f move v0,$a0 @@ -9997,6 +9998,7 @@ macro (struct mips_cl_insn *ip, char *str) case M_BGEL: likely = 1; + /* Fall through. */ case M_BGE: if (op[1] == 0) macro_build_branch_rs (likely ? M_BGEZL : M_BGEZ, &offset_expr, op[0]); @@ -10022,6 +10024,7 @@ macro (struct mips_cl_insn *ip, char *str) case M_BGTL_I: likely = 1; + /* Fall through. */ case M_BGT_I: /* Check for > max integer. */ if (imm_expr.X_add_number >= GPR_SMAX) @@ -10068,6 +10071,7 @@ macro (struct mips_cl_insn *ip, char *str) case M_BGEUL: likely = 1; + /* Fall through. */ case M_BGEU: if (op[1] == 0) goto do_true; @@ -10085,6 +10089,7 @@ macro (struct mips_cl_insn *ip, char *str) case M_BGTUL_I: likely = 1; + /* Fall through. */ case M_BGTU_I: if (op[0] == 0 || (GPR_SIZE == 32 @@ -10112,6 +10117,7 @@ macro (struct mips_cl_insn *ip, char *str) case M_BGTL: likely = 1; + /* Fall through. */ case M_BGT: if (op[1] == 0) macro_build_branch_rs (likely ? M_BGTZL : M_BGTZ, &offset_expr, op[0]); @@ -10128,6 +10134,7 @@ macro (struct mips_cl_insn *ip, char *str) case M_BGTUL: likely = 1; + /* Fall through. */ case M_BGTU: if (op[1] == 0) macro_build_branch_rsrt (likely ? M_BNEL : M_BNE, @@ -10145,6 +10152,7 @@ macro (struct mips_cl_insn *ip, char *str) case M_BLEL: likely = 1; + /* Fall through. */ case M_BLE: if (op[1] == 0) macro_build_branch_rs (likely ? M_BLEZL : M_BLEZ, &offset_expr, op[0]); @@ -10161,6 +10169,7 @@ macro (struct mips_cl_insn *ip, char *str) case M_BLEL_I: likely = 1; + /* Fall through. */ case M_BLE_I: if (imm_expr.X_add_number >= GPR_SMAX) goto do_true; @@ -10185,6 +10194,7 @@ macro (struct mips_cl_insn *ip, char *str) case M_BLEUL: likely = 1; + /* Fall through. */ case M_BLEU: if (op[1] == 0) macro_build_branch_rsrt (likely ? M_BEQL : M_BEQ, @@ -10202,6 +10212,7 @@ macro (struct mips_cl_insn *ip, char *str) case M_BLEUL_I: likely = 1; + /* Fall through. */ case M_BLEU_I: if (op[0] == 0 || (GPR_SIZE == 32 @@ -10229,6 +10240,7 @@ macro (struct mips_cl_insn *ip, char *str) case M_BLTL: likely = 1; + /* Fall through. */ case M_BLT: if (op[1] == 0) macro_build_branch_rs (likely ? M_BLTZL : M_BLTZ, &offset_expr, op[0]); @@ -10245,6 +10257,7 @@ macro (struct mips_cl_insn *ip, char *str) case M_BLTUL: likely = 1; + /* Fall through. */ case M_BLTU: if (op[1] == 0) goto do_false; @@ -10262,11 +10275,13 @@ macro (struct mips_cl_insn *ip, char *str) case M_DDIV_3: dbl = 1; + /* Fall through. */ case M_DIV_3: s = "mflo"; goto do_div3; case M_DREM_3: dbl = 1; + /* Fall through. */ case M_REM_3: s = "mfhi"; do_div3: @@ -10458,11 +10473,13 @@ macro (struct mips_cl_insn *ip, char *str) case M_DLCA_AB: dbl = 1; + /* Fall through. */ case M_LCA_AB: call = 1; goto do_la; case M_DLA_AB: dbl = 1; + /* Fall through. */ case M_LA_AB: do_la: /* Load the address of a symbol into a register. If breg is not @@ -12685,6 +12702,7 @@ macro (struct mips_cl_insn *ip, char *str) case M_DMUL: dbl = 1; + /* Fall through. */ case M_MUL: if (mips_opts.arch == CPU_R5900) macro_build (NULL, dbl ? "dmultu" : "multu", "d,s,t", op[0], op[1], @@ -12698,6 +12716,7 @@ macro (struct mips_cl_insn *ip, char *str) case M_DMUL_I: dbl = 1; + /* Fall through. */ case M_MUL_I: /* The MIPS assembler some times generates shifts and adds. I'm not trying to be that fancy. GCC should do this for us @@ -12710,12 +12729,14 @@ macro (struct mips_cl_insn *ip, char *str) case M_DMULO_I: dbl = 1; + /* Fall through. */ case M_MULO_I: imm = 1; goto do_mulo; case M_DMULO: dbl = 1; + /* Fall through. */ case M_MULO: do_mulo: start_noreorder (); @@ -12747,12 +12768,14 @@ macro (struct mips_cl_insn *ip, char *str) case M_DMULOU_I: dbl = 1; + /* Fall through. */ case M_MULOU_I: imm = 1; goto do_mulou; case M_DMULOU: dbl = 1; + /* Fall through. */ case M_MULOU: do_mulou: start_noreorder (); @@ -13456,11 +13479,13 @@ mips16_macro (struct mips_cl_insn *ip) case M_DDIV_3: dbl = 1; + /* Fall through. */ case M_DIV_3: s = "mflo"; goto do_div3; case M_DREM_3: dbl = 1; + /* Fall through. */ case M_REM_3: s = "mfhi"; do_div3: @@ -13505,6 +13530,7 @@ mips16_macro (struct mips_cl_insn *ip) case M_DMUL: dbl = 1; + /* Fall through. */ case M_MUL: macro_build (NULL, dbl ? "dmultu" : "multu", "x,y", op[1], op[2]); macro_build (NULL, "mflo", "x", op[0]); diff --git a/gas/config/tc-ns32k.c b/gas/config/tc-ns32k.c index a0db769..570916d 100644 --- a/gas/config/tc-ns32k.c +++ b/gas/config/tc-ns32k.c @@ -432,6 +432,7 @@ addr_mode (char *operand, addrmodeP->disp[0] = str + 2; return -1; } + /* Fall through. */ default: as_bad (_("Invalid syntax in PC-relative addressing mode")); return 0; @@ -481,7 +482,7 @@ addr_mode (char *operand, { case 'f': addrmodeP->float_flag = 1; - /* Drop through. */ + /* Fall through. */ case 'r': if (str[1] >= '0' && str[1] < '8') { @@ -564,7 +565,7 @@ addr_mode (char *operand, str[strl - 4] = 0; return -1; /* reg rel */ } - /* Drop through. */ + /* Fall through. */ default: if (!strncmp (&str[strl - 4], "(fp", 3)) @@ -925,6 +926,7 @@ encode_operand (int argc, case 'f': /* Operand of sfsr turns out to be a nasty specialcase. */ opcode_bit_ptr -= 5; + /* Fall through. */ case 'Z': /* Float not immediate. */ case 'F': /* 32 bit float general form. */ case 'L': /* 64 bit float. */ diff --git a/gas/config/tc-rx.c b/gas/config/tc-rx.c index bb0f689..07dccc6 100644 --- a/gas/config/tc-rx.c +++ b/gas/config/tc-rx.c @@ -2401,8 +2401,10 @@ md_apply_fix (struct fix * f ATTRIBUTE_UNUSED, case BFD_RELOC_RX_GPRELL: val >>= 1; + /* Fall through. */ case BFD_RELOC_RX_GPRELW: val >>= 1; + /* Fall through. */ case BFD_RELOC_RX_GPRELB: #if RX_OPCODE_BIG_ENDIAN op[1] = val & 0xff; diff --git a/gas/config/tc-score.c b/gas/config/tc-score.c index f96879b..f68cc6f 100644 --- a/gas/config/tc-score.c +++ b/gas/config/tc-score.c @@ -7453,6 +7453,7 @@ s3_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp) code = BFD_RELOC_32_PCREL; break; } + /* Fall through. */ case BFD_RELOC_HI16_S: case BFD_RELOC_LO16: case BFD_RELOC_SCORE_JMP: diff --git a/gas/config/tc-score7.c b/gas/config/tc-score7.c index 941467b..d7dd108 100644 --- a/gas/config/tc-score7.c +++ b/gas/config/tc-score7.c @@ -6930,6 +6930,7 @@ s7_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp) code = BFD_RELOC_32_PCREL; break; } + /* Fall through. */ case BFD_RELOC_HI16_S: case BFD_RELOC_LO16: case BFD_RELOC_SCORE_JMP: diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c index f65fbb2..55966e0 100644 --- a/gas/config/tc-sh.c +++ b/gas/config/tc-sh.c @@ -2414,11 +2414,13 @@ build_Mytes (sh_opcode_info *opcode, sh_operand_info *operand) break; case IMM0_3s: nbuf[indx] |= 0x08; + /* Fall through. */ case IMM0_3c: insert (output + low_byte, BFD_RELOC_SH_IMM3, 0, operand); break; case IMM0_3Us: nbuf[indx] |= 0x80; + /* Fall through. */ case IMM0_3Uc: insert (output + low_byte, BFD_RELOC_SH_IMM3U, 0, operand); break; diff --git a/gas/config/tc-tic4x.c b/gas/config/tc-tic4x.c index 84c9ece..f86a535 100644 --- a/gas/config/tc-tic4x.c +++ b/gas/config/tc-tic4x.c @@ -2638,9 +2638,11 @@ md_apply_fix (fixS *fixP, valueT *value, segT seg ATTRIBUTE_UNUSED) { case BFD_RELOC_32: buf[3] = val >> 24; + /* Fall through. */ case BFD_RELOC_24: case BFD_RELOC_24_PCREL: buf[2] = val >> 16; + /* Fall through. */ case BFD_RELOC_16: case BFD_RELOC_16_PCREL: case BFD_RELOC_LO16: @@ -2718,24 +2720,28 @@ md_parse_option (int c, const char *arg) case 'b': as_warn (_("Option -b is depreciated, please use -mbig")); + /* Fall through. */ case OPTION_BIG: /* big model */ tic4x_big_model = 1; break; case 'p': as_warn (_("Option -p is depreciated, please use -mmemparm")); + /* Fall through. */ case OPTION_MEMPARM: /* push args */ tic4x_reg_args = 0; break; case 'r': as_warn (_("Option -r is depreciated, please use -mregparm")); + /* Fall through. */ case OPTION_REGPARM: /* register args */ tic4x_reg_args = 1; break; case 's': as_warn (_("Option -s is depreciated, please use -msmall")); + /* Fall through. */ case OPTION_SMALL: /* small model */ tic4x_big_model = 0; break; diff --git a/gas/config/tc-vax.c b/gas/config/tc-vax.c index b85b5bb..e358c84 100644 --- a/gas/config/tc-vax.c +++ b/gas/config/tc-vax.c @@ -1796,8 +1796,10 @@ vip_op (char *optext, struct vop *vopP) { case 'l': mode += 2; + /* Fall through. */ case 'w': mode += 2; + /* Fall through. */ case ' ': /* Assumed B^ until our caller changes it. */ case 'b': break; diff --git a/gas/config/tc-visium.c b/gas/config/tc-visium.c index 05e1616..5b1d255 100644 --- a/gas/config/tc-visium.c +++ b/gas/config/tc-visium.c @@ -1520,8 +1520,7 @@ md_assemble (char *str0) return; } this_dest = r1; - - /* fall through... */ + /* Fall through. */ case mode_i: /* MOVIL/WRTL traditionally get an implicit "%l" applied diff --git a/gas/config/tc-xstormy16.c b/gas/config/tc-xstormy16.c index 887160d..ca6793e 100644 --- a/gas/config/tc-xstormy16.c +++ b/gas/config/tc-xstormy16.c @@ -382,6 +382,7 @@ md_cgen_lookup_reloc (const CGEN_INSN * insn ATTRIBUTE_UNUSED, case XSTORMY16_OPERAND_REL8_4: fixP->fx_addnumber -= 2; + /* Fall through. */ case XSTORMY16_OPERAND_REL8_2: fixP->fx_addnumber -= 2; fixP->fx_pcrel = 1; @@ -389,7 +390,7 @@ md_cgen_lookup_reloc (const CGEN_INSN * insn ATTRIBUTE_UNUSED, case XSTORMY16_OPERAND_REL12: fixP->fx_where += 2; - /* Fall through... */ + /* Fall through. */ case XSTORMY16_OPERAND_REL12A: fixP->fx_addnumber -= 2; fixP->fx_pcrel = 1; diff --git a/gas/config/tc-z80.c b/gas/config/tc-z80.c index dcc74f6..b7e075a 100644 --- a/gas/config/tc-z80.c +++ b/gas/config/tc-z80.c @@ -317,6 +317,7 @@ z80_start_line_hook (void) *p++ = buf[2]; break; } + /* Fall through. */ case '"': for (quote = *p++; quote != *p && '\n' != *p; ++p) /* No escapes. */ ; @@ -874,6 +875,7 @@ emit_mr (char prefix, char opcode, const char *args) } check_mach (INS_UNPORT); } + /* Fall through. */ case O_register: emit_mx (prefix, opcode, 0, & arg_m); break; @@ -1776,6 +1778,7 @@ emit_mulub (char prefix ATTRIBUTE_UNUSED, char opcode, const char * args) *q = opcode + ((reg - 'b') << 3); break; } + /* Fall through. */ default: ill_op (); } diff --git a/gas/config/tc-z8k.c b/gas/config/tc-z8k.c index 9b6ee38..5be09fd 100644 --- a/gas/config/tc-z8k.c +++ b/gas/config/tc-z8k.c @@ -1000,11 +1000,14 @@ apply_fix (char *ptr, bfd_reloc_code_real_type type, expressionS *operand, *ptr++ = n >> 24; *ptr++ = n >> 20; *ptr++ = n >> 16; + /* Fall through. */ case 4: /* 4 nibbles == 16 bits. */ *ptr++ = n >> 12; *ptr++ = n >> 8; + /* Fall through. */ case 2: *ptr++ = n >> 4; + /* Fall through. */ case 1: *ptr++ = n >> 0; break; @@ -1152,7 +1155,7 @@ build_bytes (opcode_entry_type *this_try, struct z8k_op *operand ATTRIBUTE_UNUSE /*case ARG_IMMNMINUS1: not used. */ case ARG_IMM4M1: imm_operand->X_add_number--; - /* Drop through. */ + /* Fall through. */ case ARG_IMM4: if (imm_operand->X_add_number > 15) as_bad (_("immediate value out of range")); @@ -1160,7 +1163,7 @@ build_bytes (opcode_entry_type *this_try, struct z8k_op *operand ATTRIBUTE_UNUSE break; case ARG_NIM8: imm_operand->X_add_number = -imm_operand->X_add_number; - /* Drop through. */ + /* Fall through. */ case ARG_IMM8: output_ptr = apply_fix (output_ptr, BFD_RELOC_8, imm_operand, 2); break; diff --git a/gas/depend.c b/gas/depend.c index 7203e59..8b57a67 100644 --- a/gas/depend.c +++ b/gas/depend.c @@ -121,8 +121,8 @@ quote_string_for_make (FILE *file, const char *src) if (file) putc (c, file); i++; - /* Fall through. This can mishandle things like "$(" but - there's no easy fix. */ + /* Fall through. */ + /* This can mishandle things like "$(" but there's no easy fix. */ default: ordinary_char: /* This can mishandle characters in the string "\0\n%*?[\\~"; diff --git a/gas/dw2gencfi.c b/gas/dw2gencfi.c index 4fbdf42..7294f17 100644 --- a/gas/dw2gencfi.c +++ b/gas/dw2gencfi.c @@ -1177,6 +1177,7 @@ dot_cfi_val_encoded_addr (int ignored ATTRIBUTE_UNUSED) case O_constant: if ((encoding & 0x70) != DW_EH_PE_pcrel) break; + /* Fall through. */ default: encoding = DW_EH_PE_omit; break; @@ -1008,6 +1008,7 @@ operand (expressionS *expressionP, enum expr_mode mode) /* '~' is permitted to start a label on the Delta. */ if (is_name_beginner (c)) goto isname; + /* Fall through. */ case '!': case '-': case '+': diff --git a/gprof/ChangeLog b/gprof/ChangeLog index 6e6fd67..a1e821c 100644 --- a/gprof/ChangeLog +++ b/gprof/ChangeLog @@ -1,3 +1,7 @@ +2016-10-06 Alan Modra <amodra@gmail.com> + + * gprof.c: Add missing fall through comments. + 2016-09-26 Vlad Zakharov <vzakhar@synopsys.com> * Makefile.in: Regenerate. diff --git a/gprof/gprof.c b/gprof/gprof.c index 4df99751..43e2090 100644 --- a/gprof/gprof.c +++ b/gprof/gprof.c @@ -259,11 +259,13 @@ main (int argc, char **argv) break; case 'E': sym_id_add (optarg, EXCL_TIME); + /* Fall through. */ case 'e': sym_id_add (optarg, EXCL_GRAPH); break; case 'F': sym_id_add (optarg, INCL_TIME); + /* Fall through. */ case 'f': sym_id_add (optarg, INCL_GRAPH); break; diff --git a/ld/ChangeLog b/ld/ChangeLog index 3660d87..40d6c14 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,10 @@ 2016-10-06 Alan Modra <amodra@gmail.com> + * lexsup.c: Spell fall through comments consistently and add + missing fall through comments. + +2016-10-06 Alan Modra <amodra@gmail.com> + * plugin.c (asymbol_from_plugin_symbol): Avoid compiler warning by adding return. diff --git a/ld/lexsup.c b/ld/lexsup.c index 294c4b2..d39f848 100644 --- a/ld/lexsup.c +++ b/ld/lexsup.c @@ -1280,7 +1280,7 @@ parse_args (unsigned argc, char **argv) break; case OPTION_TASK_LINK: link_info.task_link = TRUE; - /* Fall through - do an implied -r option. */ + /* Fall through. */ case OPTION_UR: if (bfd_link_pic (&link_info)) einfo (_("%P%F: -r and %s may not be used together\n"), @@ -1619,6 +1619,7 @@ parse_args (unsigned argc, char **argv) break; case dynamic_list_data: link_info.dynamic_data = TRUE; + /* Fall through. */ case dynamic_list: link_info.dynamic = TRUE; break; diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 6602768..4416659 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,5 +1,22 @@ 2016-10-06 Alan Modra <amodra@gmail.com> + * aarch64-opc.c: Spell fall through comments consistently. + * i386-dis.c: Likewise. + * aarch64-dis.c: Add missing fall through comments. + * aarch64-opc.c: Likewise. + * arc-dis.c: Likewise. + * arm-dis.c: Likewise. + * i386-dis.c: Likewise. + * m68k-dis.c: Likewise. + * mep-asm.c: Likewise. + * ns32k-dis.c: Likewise. + * sh-dis.c: Likewise. + * tic4x-dis.c: Likewise. + * tic6x-dis.c: Likewise. + * vax-dis.c: Likewise. + +2016-10-06 Alan Modra <amodra@gmail.com> + * arc-ext.c (create_map): Add missing break. * msp430-decode.opc (encode_as): Likewise. * msp430-decode.c: Regenerate. diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c index 82afe8b..d8c5fa7 100644 --- a/opcodes/aarch64-dis.c +++ b/opcodes/aarch64-dis.c @@ -788,10 +788,15 @@ decode_limm (uint32_t esize, aarch64_insn value, int64_t *result) switch (simd_size) { case 2: imm = (imm << 2) | imm; + /* Fall through. */ case 4: imm = (imm << 4) | imm; + /* Fall through. */ case 8: imm = (imm << 8) | imm; + /* Fall through. */ case 16: imm = (imm << 16) | imm; + /* Fall through. */ case 32: imm = (imm << 32) | imm; + /* Fall through. */ case 64: break; default: assert (0); return 0; } diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c index adc34e2..4b1411f 100644 --- a/opcodes/aarch64-opc.c +++ b/opcodes/aarch64-opc.c @@ -1156,10 +1156,15 @@ build_immediate_table (void) switch (log_e) { case 1: imm = (imm << 2) | imm; + /* Fall through. */ case 2: imm = (imm << 4) | imm; + /* Fall through. */ case 3: imm = (imm << 8) | imm; + /* Fall through. */ case 4: imm = (imm << 16) | imm; + /* Fall through. */ case 5: imm = (imm << 32) | imm; + /* Fall through. */ case 6: break; default: abort (); } @@ -1969,7 +1974,7 @@ operand_general_constraint_met_p (const aarch64_opnd_info *opnds, int idx, { case OP_MOV_IMM_WIDEN: imm = ~imm; - /* Fall through... */ + /* Fall through. */ case OP_MOV_IMM_WIDE: if (!aarch64_wide_constant_p (imm, esize == 4, NULL)) { diff --git a/opcodes/arc-dis.c b/opcodes/arc-dis.c index e4df678..c4e118e 100644 --- a/opcodes/arc-dis.c +++ b/opcodes/arc-dis.c @@ -703,6 +703,7 @@ arc_insn_length (bfd_byte msb, bfd_byte lsb, struct disassemble_info *info) if (minor_opcode < 4) return 2; } + /* Fall through. */ case bfd_mach_arc_arc600: return (major_opcode > 0xb) ? 2 : 4; break; diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index fc9ac61..87d4930 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -4686,6 +4686,7 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given) case 'S': allow_unpredictable = TRUE; + /* Fall through. */ case 's': if ((given & 0x004f0000) == 0x004f0000) { diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index c08109e..5c5f926 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -14850,13 +14850,14 @@ intel_operand_size (int bytemode, int sizeflag) oappend ("QWORD PTR "); break; } + /* Fall through. */ case stack_v_mode: if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W))) { oappend ("QWORD PTR "); break; } - /* FALLTHRU */ + /* Fall through. */ case v_mode: case v_swap_mode: case dq_mode: @@ -15233,6 +15234,7 @@ OP_E_register (int bytemode, int sizeflag) names = names64; break; } + /* Fall through. */ case stack_v_mode: if (address_mode == mode_64bit && ((sizeflag & DFLAG) || (rex & REX_W))) { @@ -15240,7 +15242,7 @@ OP_E_register (int bytemode, int sizeflag) break; } bytemode = v_mode; - /* FALLTHRU */ + /* Fall through. */ case v_mode: case v_swap_mode: case dq_mode: @@ -15321,7 +15323,7 @@ OP_E_memory (int bytemode, int sizeflag) shift = vex.w ? 3 : 2; break; } - /* Fall through if vex.b == 0. */ + /* Fall through. */ case xmmqd_mode: case xmmdw_mode: case ymmq_mode: @@ -17301,6 +17303,7 @@ get_vex_imm8 (int sizeflag, int opnum) if (base != 5) /* No displacement. */ break; + /* Fall through. */ case 2: /* 4 byte displacement. */ bytes_before_imm += 4; @@ -17327,6 +17330,7 @@ get_vex_imm8 (int sizeflag, int opnum) if (modrm.rm != 6) /* No displacement. */ break; + /* Fall through. */ case 2: /* 2 byte displacement. */ bytes_before_imm += 2; diff --git a/opcodes/m68k-dis.c b/opcodes/m68k-dis.c index 11c057d..1e7c830 100644 --- a/opcodes/m68k-dis.c +++ b/opcodes/m68k-dis.c @@ -1220,6 +1220,7 @@ print_insn_arg (const char *d, case 'X': place = '8'; + /* Fall through. */ case 'Y': case 'Z': case 'W': diff --git a/opcodes/mep-asm.c b/opcodes/mep-asm.c index d8a1cf3..89116ee 100644 --- a/opcodes/mep-asm.c +++ b/opcodes/mep-asm.c @@ -745,6 +745,7 @@ expand_string (const char *in, int first_only) break; case '(': depth++; + /* Fall through. */ default: args[narg].len++; break; diff --git a/opcodes/ns32k-dis.c b/opcodes/ns32k-dis.c index dd52cff..b14d5d7 100644 --- a/opcodes/ns32k-dis.c +++ b/opcodes/ns32k-dis.c @@ -472,6 +472,7 @@ print_insn_arg (int d, case 'f': /* A "gen" operand but 5 bits from the end of instruction. */ ioffset -= 5; + /* Fall through. */ case 'Z': case 'F': case 'L': diff --git a/opcodes/sh-dis.c b/opcodes/sh-dis.c index 1f8dc8a..7af514b 100644 --- a/opcodes/sh-dis.c +++ b/opcodes/sh-dis.c @@ -836,6 +836,7 @@ print_insn_sh (bfd_vma memaddr, struct disassemble_info *info) fprintf_fn (stream, "xd%d", rn & ~1); break; } + /* Fall through. */ case D_REG_N: fprintf_fn (stream, "dr%d", rn); break; @@ -845,6 +846,7 @@ print_insn_sh (bfd_vma memaddr, struct disassemble_info *info) fprintf_fn (stream, "xd%d", rm & ~1); break; } + /* Fall through. */ case D_REG_M: fprintf_fn (stream, "dr%d", rm); break; diff --git a/opcodes/tic4x-dis.c b/opcodes/tic4x-dis.c index c35e050..92c9dcb 100644 --- a/opcodes/tic4x-dis.c +++ b/opcodes/tic4x-dis.c @@ -467,6 +467,7 @@ tic4x_print_op (struct disassemble_info *info, return 0; break; } + /* Fall through. */ case 'J': /* Indirect (short) 8--15. */ if (! tic4x_print_indirect (info, INDIRECT_SHORT, diff --git a/opcodes/tic6x-dis.c b/opcodes/tic6x-dis.c index ec1dcc1..f642656 100644 --- a/opcodes/tic6x-dis.c +++ b/opcodes/tic6x-dis.c @@ -1075,6 +1075,7 @@ print_insn_tic6x (bfd_vma addr, struct disassemble_info *info) case tic6x_coding_mem_offset_minus_one_noscale: case tic6x_coding_mem_offset_minus_one: fld_val += 1; + /* Fall through. */ case tic6x_coding_mem_offset_noscale: case tic6x_coding_mem_offset: mem_offset = fld_val; diff --git a/opcodes/vax-dis.c b/opcodes/vax-dis.c index 937c452..0aec812 100644 --- a/opcodes/vax-dis.c +++ b/opcodes/vax-dis.c @@ -296,6 +296,7 @@ print_insn_mode (const char *d, break; case 0xB0: /* Displacement byte deferred: *displ(Rn). */ (*info->fprintf_func) (info->stream, "*"); + /* Fall through. */ case 0xA0: /* Displacement byte: displ(Rn). */ if (reg == 0xF) (*info->print_address_func) (addr + 2 + NEXTBYTE (p), info); @@ -305,6 +306,7 @@ print_insn_mode (const char *d, break; case 0xD0: /* Displacement word deferred: *displ(Rn). */ (*info->fprintf_func) (info->stream, "*"); + /* Fall through. */ case 0xC0: /* Displacement word: displ(Rn). */ if (reg == 0xF) (*info->print_address_func) (addr + 3 + NEXTWORD (p), info); @@ -314,6 +316,7 @@ print_insn_mode (const char *d, break; case 0xF0: /* Displacement long deferred: *displ(Rn). */ (*info->fprintf_func) (info->stream, "*"); + /* Fall through. */ case 0xE0: /* Displacement long: displ(Rn). */ if (reg == 0xF) (*info->print_address_func) (addr + 5 + NEXTLONG (p), info); |