aboutsummaryrefslogtreecommitdiff
path: root/gas/frags.h
AgeCommit message (Collapse)AuthorFilesLines
2023-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
The newer update-copyright.py fixes file encoding too, removing cr/lf on binutils/bfdtest2.c and ld/testsuite/ld-cygwin/exe-export.exp, and embedded cr in binutils/testsuite/binutils-all/ar.exp string match.
2022-07-07PR29320, 'struct obstack' declared inside parameter listAlan Modra1-2/+0
PR 29320 * frags.h: Move declaration of struct obstack.. * as.h: ..to here.
2022-01-02Update year range in copyright notice of binutils filesAlan Modra1-1/+1
The result of running etc/update-copyright.py --this-year, fixing all the files whose mode is changed by the script, plus a build with --enable-maintainer-mode --enable-cgen-maint=yes, then checking out */po/*.pot which we don't update frequently. The copy of cgen was with commit d1dd5fcc38ead reverted as that commit breaks building of bfp opcodes files.
2021-03-31Use bool in gasAlan Modra1-5/+3
* as.h (POISON_BFD_BOOLEAN): Define. * as.c, * as.h, * atof-generic.c, * config/atof-ieee.c, * config/bfin-aux.h, * config/obj-coff.c, * config/obj-ecoff.c, * config/obj-elf.c, * config/obj-elf.h, * config/obj-som.c, * config/tc-aarch64.c, * config/tc-alpha.c, * config/tc-arc.c, * config/tc-arc.h, * config/tc-arm.c, * config/tc-arm.h, * config/tc-avr.c, * config/tc-avr.h, * config/tc-bfin.c, * config/tc-bfin.h, * config/tc-bpf.c, * config/tc-cris.c, * config/tc-csky.c, * config/tc-csky.h, * config/tc-d10v.c, * config/tc-d10v.h, * config/tc-d30v.c, * config/tc-d30v.h, * config/tc-dlx.c, * config/tc-dlx.h, * config/tc-epiphany.c, * config/tc-epiphany.h, * config/tc-fr30.c, * config/tc-fr30.h, * config/tc-frv.c, * config/tc-frv.h, * config/tc-ft32.c, * config/tc-ft32.h, * config/tc-h8300.c, * config/tc-hppa.c, * config/tc-i386-intel.c, * config/tc-i386.c, * config/tc-ia64.c, * config/tc-ip2k.c, * config/tc-iq2000.c, * config/tc-iq2000.h, * config/tc-lm32.c, * config/tc-lm32.h, * config/tc-m32c.c, * config/tc-m32c.h, * config/tc-m32r.c, * config/tc-m32r.h, * config/tc-m68hc11.c, * config/tc-m68k.c, * config/tc-mcore.c, * config/tc-mcore.h, * config/tc-mep.c, * config/tc-mep.h, * config/tc-metag.c, * config/tc-metag.h, * config/tc-microblaze.c, * config/tc-mips.c, * config/tc-mips.h, * config/tc-mmix.c, * config/tc-mn10200.c, * config/tc-mn10300.c, * config/tc-mn10300.h, * config/tc-moxie.c, * config/tc-msp430.c, * config/tc-msp430.h, * config/tc-mt.c, * config/tc-mt.h, * config/tc-nds32.c, * config/tc-nds32.h, * config/tc-nios2.c, * config/tc-ns32k.c, * config/tc-or1k.c, * config/tc-or1k.h, * config/tc-pdp11.c, * config/tc-ppc.c, * config/tc-pru.c, * config/tc-pru.h, * config/tc-riscv.c, * config/tc-riscv.h, * config/tc-rx.c, * config/tc-rx.h, * config/tc-s12z.c, * config/tc-s12z.h, * config/tc-s390.c, * config/tc-score.c, * config/tc-score.h, * config/tc-score7.c, * config/tc-sh.c, * config/tc-sh.h, * config/tc-spu.c, * config/tc-tic54x.c, * config/tc-tic6x.c, * config/tc-tic6x.h, * config/tc-tilegx.c, * config/tc-tilepro.c, * config/tc-v850.c, * config/tc-v850.h, * config/tc-visium.c, * config/tc-visium.h, * config/tc-wasm32.c, * config/tc-wasm32.h, * config/tc-xc16x.c, * config/tc-xgate.c, * config/tc-xstormy16.c, * config/tc-xstormy16.h, * config/tc-xtensa.c, * config/tc-xtensa.h, * config/tc-z80.c, * config/tc-z8k.c, * config/xtensa-istack.h, * config/xtensa-relax.c, * config/xtensa-relax.h, * dw2gencfi.c, * dwarf2dbg.c, * dwarf2dbg.h, * expr.c, * expr.h, * frags.c, * frags.h, * listing.c, * macro.c, * output-file.c, * read.c, * read.h, * stabs.c, * symbols.c, * write.c: Replace bfd_boolean with bool, FALSE with false, and TRUE with true.
2021-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2020-11-18Re: Stop Gas from generating line info or address rangesAlan Modra1-0/+2
* doc/as.texi (.nop): Document optional size arg. * dwarf2dbg.c (dwarf2_gen_line_info_1): Only check SEC_ALLOC when ELF. Warn whenever dwarf line number information is ignored. * frags.c (frag_offset_ignore_align_p): New function. * frags.h (frag_offset_ignore_align_p): Declare. * read.c (s_nop): Extend to support optional size arg. * testsuite/gas/elf/dwarf2-20.d: Expect warnings, and exact range. * testsuite/gas/elf/dwarf2-20.s: Emit 16 bytes worth of nops. * testsuite/gas/m68hc11/indexed12.d: Expect warnings.
2020-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2019-04-25Speed up locview resolution with relaxable fragsAlexandre Oliva1-0/+2
Targets such as xtensa incur a much higher overhead to resolve location view numbers than e.g. x86, because the expressions used to compute view numbers cannot be resolved soon enough. Each view number is computed by incrementing the previous view, if they are both at the same address, or by resetting it to zero otherwise. If PV is the previous view number, PL is its location, and NL is the location of the next view, its number is computed by evaluating NV = !(NL > PL) * (PV + 1). set_or_check_view uses resolve_expression to decide whether portions of this expression can be simplified to constants. The (NL > PL) subexpression is one that can often be resolved to a constant, breaking chains of view number computations at instructions of nonzero length, but not after alignment that might be unnecessary. Alas, when nearly every frag ends with a relaxable instruction, frag_offset_fixed_p will correctly fail to determine a known offset between two unresolved addresses in neighboring frags, so the unresolved symbolic operation will be constructed and used in the computation of most view numbers. This results in very deep expressions. As view numbers get referenced in location view lists, each operand in the list goes through symbol_clone_if_forward_ref, which recurses on every subexpression. If each view number were to be referenced, this would exhibit O(n^2) behavior, where n is the depth of the view number expressions, i.e., the length of view number sequences without an early resolution that cuts the expression short. This patch enables address compares used by view numbering to be resolved even when exact offsets are not known, using new logic to determine when the location either remained the same or changed for sure, even with the possibility of relaxation. This enables most view number expressions to be resolved with a small, reasonable depth. PR gas/24444 * frags.c (frag_gtoffset_p): New. * frags.h (frag_gtoffset_p): Declare it. * expr.c (resolve_expression): Use it.
2019-04-16Make frag fr_fix unsignedAlan Modra1-1/+1
The field only stores unsigned values, so let's make it unsigned to stop people worrying about the possibility of negative values. * frags.h (struct frag <fr_fix>): Use unsigned type. * frags.c (frag_new): Assert that current size exceeds old_frags_var_max_size. * ehopt.c (get_cie_info): Adjust for unsigned fr_fix. * listing.c (calc_hex): Likewise. * write.c (cvt_frag_to_fill, write_relocs): Likewise. * config/tc-arc.c (md_convert_frag): Likewise. * config/tc-avr.c (avr_patch_gccisr_frag): Likewise. * config/tc-mips.c (md_convert_frag): Likewise. * config/tc-rl78.c (md_convert_frag): Likewise. * config/tc-rx.c (md_convert_frag): Likewise. * config/tc-sparc.c (md_apply_fix): Likewise. * config/tc-xtensa.c (next_instrs_are_b_retw): Likewise. (unrelaxed_frag_min_insn_count, unrelaxed_frag_has_b_j): Likewise.
2019-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2018-01-03Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2017-01-02Update year range in copyright notice of all files.Alan Modra1-1/+1
2016-02-22Add more const type qualifiers to GAS sources.Trevor Saunders1-1/+1
* output-file.c (output_file_create): Make file name argument const. (output_file_close): Likewise. * output-file.h (output_file_create): Adjust. (output_file_close): Likewise. * depend.c (quote_string_for_make): Make src argument const char *. (register_dependency): Likewise. (wrap_output): Likewise. * as.h (register_dependency): Adjust. * config/tc-xtensa.c (finish_vinsn): Remove unnecessary calls to as_where (); * symbols.c (S_SET_EXTERNAL): Likewise. * input-scrub.c (as_where): Return the file name. * as.h (as_where): Adjust prototype. * app.c (do_scrub_chars): Adjust. * cond.c (s_elseif): Likewise. (s_else): Likewise. (initialize_cframe): Likewise. * config/obj-coff.c (obj_coff_init_stab_section): Likewise. * config/obj-elf.c (obj_elf_init_stab_section): Likewise. * config/obj-som.c (obj_som_init_stab_section): Likewise. * config/tc-aarch64.c (output_info): Likewise. * config/tc-ia64.c (md_assemble): Likewise. (dot_alias): Likewise. * config/tc-m68k.c (m68k_frob_label): Likewise. * config/tc-mmix.c (s_bspec): Likewise. (mmix_handle_mmixal): Likewise. * config/tc-rx.c (rx_include): Likewise. * config/tc-tic54x.c (tic54x_set_default_include): Likewise. (tic54x_adjust_symtab): Likewise. * config/tc-xtensa.c (directive_push): Likewise. (xtensa_sanity_check): Likewise. (xtensa_relax_frag): Likewise. (md_convert_frag): Likewise. (tinsn_to_slotbuf): Likewise. * dwarf2dbg.c (dwarf2_where): Likewise. * ecoff.c (add_file): Likewise. (ecoff_generate_asm_lineno): Likewise. * expr.c (make_expr_symbol): Likewise. * frags.c (frag_new): Likewise. (frag_var_init): Likewise. * listing.c (listing_newline): Likewise. * messages.c (identify): Likewise. (as_show_where): Likewise. (as_warn_internal): Likewise. (as_bad_internal): Likewise. * read.c (s_irp): Likewise. (s_macro): Likewise. (s_reloc): Likewise. * stabs.c (stabs_generate_asm_file): Likewise. (stabs_generate_asm_lineno): Likewise. (stabs_generate_asm_func): Likewise. * write.c (fix_new_internal): Likewise. * as.h (PRINTF_WHERE_LIKE): Make file name argument const. (as_warn_value_out_of_range): Adjust prototype. (as_bad_value_out_of_range): Adjust prototype. * messages.c (identify): Make file name argument const char *. (as_warn_internal): Likewise. (as_warn_where): Likewise. (as_bad_internal): Likewise. (as_bad_where): Likewise. (as_internal_value_out_of_range): Likewise. (as_warn_value_out_of_range): Likewise. (as_bad_value_out_of_range): Likewise. * as.h (found_comment_file): Change type to const char *. * cond.c (file_line::file): Likewise. * config/obj-coff.c (obj_coff_init_stab_section): Make variable const. * config/obj-elf.c (obj_elf_init_stab_section): Likewise. * config/obj-som.c (obj_som_init_stab_section): Likewise. * config/tc-aarch64.c (output_info): Likewise. * config/tc-alpha.c (insert_operand): Likewise. * config/tc-arc.c (insert_operand): Likewise. * config/tc-d30v.c (check_size): Likewise. * config/tc-ia64.c (struct alias): Likewise. * config/tc-m68k.c (struct label_line): Likewise. * config/tc-mcore.c (md_apply_fix): Likewise. * config/tc-microblaze.c (md_estimate_size_before_relax): Likewise. * config/tc-mips.c (mips16_immed): Likewise. * config/tc-mmix.c (mmix_handle_mmixal): Likewise. * config/tc-ppc.c (ppc_insert_operand): Likewise. * config/tc-rx.c (rx_include): Likewise. * config/tc-s390.c (s390_insert_operand): Likewise. * config/tc-tic54x.c (tic54x_set_default_include): Likewise. (tic54x_adjust_symtab): Likewise. * config/tc-tilegx.c (insert_operand): Likewise. (apply_special_operator): Likewise. * config/tc-tilepro.c (insert_operand): Likewise. * config/tc-xtensa.c (directive_push): Likewise. * ecoff.c (add_file): Likewise. (ecoff_generate_asm_lineno): Likewise. * listing.c (listing_newline): Likewise. * read.c (s_irp): Likewise. * write.c (install_reloc): Likewise. * write.h (struct fix): Likewise. * input-file.c (file_name): Change type to const char *. (saved_file::file_name): Likewise. (input_file_open): Change type of argument to const char *. * input-file.h (input_file_open): Adjust. * input-scrub.c (logical_input_file): change type to const char *. (physical_input_file): Likewise. (struct input_save): Adjust. (input_scrub_push): Adjust. (input_scrub_begin): Adjust. (as_where): Adjust. * input-scrub.c (input_scrub_new_file): Make file name argument const. (input_scrub_include_file): Likewise. (new_logical_line_flags): Likewise. (new_logical_line): Likewise. * as.h: Adjust. * frags.h (struct frag): Change type of fr_file to const char *. * expr.c (expr_symbol_where): Change type of file argument to const char **. * expr.h (expr_symbol_where): Likewise. * config/tc-i370.c (md_apply_fix): adjust. * config/tc-mmix.c (mmix_md_end): Likewise. * config/tc-ppc.c (md_apply_fix): Likewise. * config/tc-s390.c (md_apply_fix): Likewise. * symbols.c (report_op_error): Likewise. (resolve_symbol_value): Likewise. * config/tc-ia64.c (slot::src_file): Change type to const char *. (rsrc::file): Likewise. * config/tc-xtensa.c (xtensa_sanity_check): Change type of variable to const char *. (xtensa_relax_frag): Likewise. (md_convert_frag): Likewise. (tinsn_to_slotbuf): Likewise. * expr.c (expr_symbol_line): Likewise. * macro.c (define_macro): Likewise. * macro.h (macro_struct): Likewise. * messages.c (as_show_where): Likewise. * read.c (s_macro): Likewise. * stabs.c (stabs_generate_asm_file): Likewise. (generate_asm_file): Likewise. (stabs_generate_asm_lineno): Likewise. * write.h (struct reloc_list): Likewise. * input-scrub.c (as_where): Change return type to const char *. * as.h (as_wheree): Adjust.
2016-01-01Copyright update for binutilsAlan Modra1-1/+1
2015-01-02ChangeLog rotatation and copyright year updateAlan Modra1-1/+1
2014-07-26Prepare gas for 64-bit obstacksAlan Modra1-9/+9
Use size_t in a few places involved with obstacks, and don't include obstack.h in files that don't use obstacks. gas/ * config/bfin-parse.y: Don't include obstack.h. * config/obj-aout.c: Likewise. * config/obj-coff.c: Likewise. * config/obj-som.c: Likewise. * config/tc-bfin.c: Likewise. * config/tc-i960.c: Likewise. * config/tc-rl78.c: Likewise. * config/tc-rx.c: Likewise. * config/tc-tic4x.c: Likewise. * expr.c: Likewise. * listing.c: Likewise. * config/obj-elf.c (elf_file_symbol): Make name_length a size_t. * config/tc-aarch64.c (symbol_locate): Likewise. * config/tc-arm.c (symbol_locate): Likewise. * config/tc-mmix.c (mmix_handle_mmixal): Make len_0 a size_t. * config/tc-score.c (s3_build_score_ops_hsh): Make len a size_t. (s3_build_dependency_insn_hsh): Likewise. * config/tc-score7.c (s7_build_score_ops_hsh): Likewise. (s7_build_dependency_insn_hsh): Likewise. * frags.c (frag_grow): Make parameter a size_t, and use size_t locals. (frag_new): Make parameter a size_t. (frag_var_init): Make max_chars and var parameters size_t. (frag_var, frag_variant): Likewise. (frag_room): Return a size_t. (frag_align_pattern): Make n_fill parameter a size_t. * frags.h: Update function prototypes. * symbols.c (save_symbol_name): Make name_length a size_t.
2014-03-21Add support to the Xtensa target for creating trampolines for out-of-range ↵David Weatherford1-0/+3
branches. * tc-xtensa.c (xtensa_check_frag_count, xtensa_create_trampoline_frag) (xtensa_maybe_create_trampoline_frag, init_trampoline_frag) (find_trampoline_seg, search_trampolines, get_best_trampoline) (check_and_update_trampolines, add_jump_to_trampoline) (dump_trampolines): New function. (md_parse_option): Add cases for --[no-]trampolines options. (md_assemble, finish_vinsn, xtensa_end): Add call to xtensa_check_frag_count. (xg_assemble_vliw_tokens): Add call to xtensa_maybe_create_trampoline_frag. (xtensa_relax_frag): Relax fragments with RELAX_TRAMPOLINE state. (relax_frag_immed): Relax jump instructions that cannot reach its target. * tc-xtensa.h (xtensa_relax_statesE::RELAX_TRAMPOLINE): New relax state. * as.texinfo: Document --[no-]trampolines command-line options. * c-xtensa.texi: Document trampolines relaxation and command line options. * frags.c (get_frag_count, clear_frag_count): New function. (frag_alloc): Increment totalfrags counter. * frags.h (get_frag_count, clear_frag_count): New function. * all.exp: Add test for trampoline relaxation. * trampoline.d: Trampoline relaxation expected dump. * trampoline.s: Trampoline relaxation test source.
2014-03-05Update copyright yearsAlan Modra1-3/+1
2012-06-30 * frags.h (frag_offset_fixed_p): Update prototype.Alan Modra1-2/+3
* frags.c (frag_offset_fixed_p): Change type of "offset" to offsetT. * expr.c (expr, resolve_expression): Likewise for frag_off var.
2012-02-212012-02-21 Tristan Gingold <gingold@adacore.com>Iain Sandoe1-0/+3
* config/tc-i386.h (OBJ_MACH_O): New section. (TC_FORCE_RELOCATION): Use obj_mach_o_force_reloc. (TC_FORCE_RELOCATION_SUB_SAME): New (TC_FORCE_RELOCATION_SUB_LOCAL): New. (TC_VALIDATE_FIX_SUB): New. * frags.h (struct frag): OBJ_FRAG_TYPE, new field. * symbols.c (colon): obj_frob_colon: New hook. * write.c (write_object_file): md_pre_relax_hook, new hook. * config/obj-macho.c (obj_mach_o_frob_colon): New. (obj_mach_o_frob_label): Record sub-section labels. (obj_mach_o_frob_symbol): Rename from obj_macho_frob_symbol. (obj_mach_o_set_subsections): New. (obj_mach_o_pre_relax_hook): New. (obj_mach_o_in_different_subsection): New. (obj_mach_o_force_reloc_sub_same): New. (obj_mach_o_force_reloc_sub_local): New. (obj_mach_o_force_reloc): New. * config/obj-macho.h (OBJ_SYMFIELD_TYPE): New. (obj_frob_colon): New Define. (obj_mach_o_frob_label): Renamed. (obj_mach_o_frob_symbol): Renamed. (OBJ_FRAG_TYPE): New. (obj_mach_o_in_different_subsection, obj_mach_o_force_reloc, obj_mach_o_force_reloc_sub_same, obj_mach_o_force_reloc_sub_local): New declarations.
2011-10-12 * as.c (main): Define .gasversion. rather than __GAS_VERSION__.Alan Modra1-2/+1
* frags.h (bss_address_frag): Delete (predefined_address_frag): New. * frags.c (frag_init): Init predefined_address_frag. Delete ref to bss_addres_frag. * symbols.c (S_CAN_BE_REDEFINED): New function. * symbols.h (S_CAN_BE_REDEFINED): Declare. * read.c (assign_symbol): Use S_CAN_BE_REDEFINED.
2010-10-19 PR gas/12049Alan Modra1-1/+5
* frags.h (struct frag): Add "region" field. * write.c (relax_frag): Don't add "stretch" to forward reference target if there is an intervening org or align. (relax_segment): Set region.
2007-07-03Switch to GPLv3Nick Clifton1-2/+2
2006-04-18 * frags.c (frag_offset_fixed_p): Constify args.Alan Modra1-1/+1
* frags.h (frag_offset_fixed_p): Ditto.
2006-04-04 PR 997Alan Modra1-1/+3
* frags.c (frag_offset_fixed_p): New function. * frags.h (frag_offset_fixed_p): Declare. * expr.c (expr): Use frag_offset_fixed_p when simplifying subtraction. (resolve_expression): Likewise.
2005-07-08 * frags.h: Remove ANSI_PROTOTYPES conditional code.Ben Elliston1-2/+0
* config/obj-elf.h: Likewise. * config/tc-h8300.h: Likewise. * config/tc-h8500.h: Likewise. * config/tc-i370.h: Likewise. * config/tc-i386.h: Likewise. * config/tc-m68hc11.h: Likewise. * config/tc-m68k.h: Likewise. * config/tc-ppc.h: Likewise. * config/tc-s390.h: Likewise. * config/tc-sh.h: Likewise. * config/tc-sparc.h: Likewise. * config/tc-tic30.c: Likewise. * config/tc-w65.h: Likewise. * config/tc-xtensa.h: Likewise.
2005-05-05Update the address and phone number of the FSFNick Clifton1-2/+2
2005-03-03update copyright datesAlan Modra1-1/+1
2005-01-21 * as.h: Remove #if 0'd code.Ben Elliston1-14/+0
* atof-generic.c (atof_generic): Likewise. * ecoff.c (ecoff_directive_frame): Likewise. * frags.h (FRAG_APPEND_1_CHAR): Likewise. * itbl-ops.c (itbl_add_reg): Likewise. * listing.c (calc_hex): Likewise. * read.c (MASK_CHAR): Likewise. * subsegs.c (subsegs_print_statistics): Likewise. * symbols.c (indent): Likewise. * write.c (write_relocs): Likewise. (write_object_file): Likewise. (relax_frag): Likewise.
2004-07-02 * frags.h (struct frag): Add has_code and insn_addr fields.Alan Modra1-2/+7
* write.c (cvt_frag_to_fill): Invoke md_frag_check. * config/tc-ppc.c (md_assemble): Check and set insn_addr. * config/tc-ppc.h (md_frag_check): Define.
2004-01-23 * frags.h (frag_room): Declare.Richard Sandiford1-0/+1
* frags.c (frag_room): New function. * doc/internals.texi: Document it.
2003-11-22 * ehopt.c: Convert to ISO-C.Kazu Hirata1-31/+29
* emul.h: Likewise. * expr.c: Likewise. * expr.h: Likewise. * flonum-copy.c: Likewise. * flonum-mult.c: Likewise. * flonum.h: Likewise. * frags.c: Likewise. * frags.h: Likewise.
2003-10-27 * ChangeLog: Fix typos.Kazu Hirata1-1/+1
* ChangeLog-9295: Likewise. * as.c: Fix comment typos. * as.h: Likewise. * atof-generic.c: Likewise. * bit_fix.h: Likewise. * frags.h: Likewise. * hash.c: Likewise. * input-file.c: Likewise. * input-scrub.c: Likewise. * itbl-ops.c: Likewise. * itbl-parse.y: Likewise. * listing.c: Likewise. * macro.h: Likewise. * read.c: Likewise. * sb.c: Likewise. * sb.h: Likewise. * symbols.c: Likewise. * symbols.h: Likewise.
2002-05-03 * as.h: Fix formatting.Kazu Hirata1-1/+1
* cgen.c: Likewise. * cgen.h: Likewise. * dwarf2dbg.c: Likewise. * frags.h: Likewise. * gasp.c: Likewise. * macro.c: Likewise. * read.c: Likewise. * stabs.c: Likewise. * symbols.c: Likewise.
2001-03-30Multi-pass relaxation machinery.Alan Modra1-8/+12
2001-03-20Use `relax_marker' instead of fragile address test code to determineAlan Modra1-1/+5
whether a frag's fr_address has been updated.
2001-03-08Fix copyright noticesNick Clifton1-1/+1
2000-12-28 * as.h (rs_align_test): New.Richard Henderson1-0/+1
* frags.c (NOP_OPCODE): Move default from read.c. (MAX_MEM_FOR_RS_ALIGN_CODE): New default. (frag_align_code): New. * frags.h (frag_align_code): Declare. * read.c (NOP_OPCODE): Remove. (do_align): Use frag_align_code. * write.c (NOP_OPCODE): Remove. (get_recorded_alignment): New. (cvt_frag_to_fill): Handle rs_align_test. (relax_segment): Likewise. (subsegs_finish): Align last subseg in section to the section alignment. Use frag_align_code. * write.h (get_recorded_alignment): Declare. * config/obj-coff.c (size_section): Handle rs_align_test. (fill_section, fixup_mdeps): Likewise. (write_object_file): Use frag_align_code. * config/tc-alpha.c (alpha_align): Use frag_align_code. (alpha_handle_align): New. * config/tc-alpha.h (HANDLE_ALIGN): New. (MAX_MEM_FOR_RS_ALIGN_CODE): New. * config/tc-i386.h (md_do_align): Use frag_align_code. (MAX_MEM_FOR_RS_ALIGN_CODE): New. * config/tc-ia64.c (ia64_md_do_align): Don't do code alignment. (ia64_handle_align): New. * config/tc-ia64.h (HANDLE_ALIGN): New. (MAX_MEM_FOR_RS_ALIGN_CODE): New. * config/tc-m32r.c (m32r_do_align): Remove. (m32r_handle_align): New. (fill_insn): Use frag_align_code. * config/tc-m32r.h (md_do_align): Remove. (HANDLE_ALIGN, MAX_MEM_FOR_RS_ALIGN_CODE): New. * config/tc-m88k.c, config/tc-m88k.h: Similarly. * config/tc-mips.c, config/tc-mips.h: Similarly. * config/tc-sh.c (sh_cons_align): Use rs_align_test. (sh_handle_align): Likewise. Handle rs_align_code. (sh_do_align): Remove. * config/tc-sh.h (md_do_align): Remove. (MAX_MEM_FOR_RS_ALIGN_CODE): New. * config/tc-sparc.c (sparc_cons_align): Use rs_align_test. (sparc_handle_align): Likewise. Handle rs_align_code. * config/tc-sparc.h (md_do_align): Remove. (MAX_MEM_FOR_RS_ALIGN_CODE): New.
2000-10-172000-10-17 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-31/+26
* debug.c: Fix formatting. * depend.c: Likewise. * dwarf2dbg.c: Likewise. * dwarf2dbg.h: Likewise. * ecoff.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * flonum-konst.c: Likewise. * frags.h: Likewise.
2000-09-122000-09-12 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-9/+8
* as.h: Fix formatting. * asintl.h: Likewise. * bit_fix.h: Likewise. * dwarf2dbg.h: Likewise. * expr.h: Likewise. * flonum.h: Likewise. * frags.h: Likewise. * itbl-ops.h: Likewise. * macro.h: Likewise. * read.h: Likewise. * sb.h: Likewise. * struc-symbol.h: Likewise. * subsegs.h: Likewise. * symbols.h: Likewise. * tc.h: Likewise. * write.h: Likewise.
2000-05-23Missed copyright update in last patch.Alan Modra1-1/+1
2000-05-23Pass jump reloc in fr_var so it can be used inAlan Modra1-1/+2
md_estimate_size_before_relax, replacing old kludge.
2000-02-03octets vs bytes changes for GASTimothy Wall1-3/+4
1999-06-03 Add support for storing local symbols in a small structure to saveIan Lance Taylor1-2/+2
memory when assembling large files. * as.h: Don't include struc-symbol.h. (symbolS): Add typedef. * symbols.c: Include struc-symbol.h. (local_hash): New static variable. (save_symbol_name): New static function, from symbol_create. (symbol_create): Call save_symbol_name. (local_symbol_count): New static variable. (local_symbol_conversion_count): Likewise. (LOCAL_SYMBOL_CHECK): Define. (local_symbol_make): New static function. (local_symbol_convert): New static function. (colon): Handle local symbols. Create local symbol for local label name. (symbol_table_insert): Handle local symbols. (symbol_find_or_make): Create local symbol for local label name. (symbol_find_base): Check for local symbol. (symbol_append, symbol_insert): Check for local symbols. (symbol_clear_list_pointers, symbol_remove): Likewise. (verify_symbol_chain): Likewise. (copy_symbol_attributes): Likewise. (resolve_symbol_value): Handle local symbols. (resolve_local_symbol): New static function. (resolve_local_symbol_values): New function. (S_GET_VALUE, S_SET_VALUE): Handle local symbols. (S_IS_FUNCTION, S_IS_EXTERNAL, S_IS_WEAK, S_IS_COMMON): Likewise. (S_IS_DEFINED, S_IS_DEBUG, S_IS_LOCAL, S_GET_NAME): Likewise. (S_GET_SEGMENT, S_SET_SEGMENT, S_SET_EXTERNAL): Likewise. (S_CLEAR_EXTERNAL, S_SET_WEAK, S_SET_NAME): Likewise. (symbol_previous, symbol_next): New functions. (symbol_get_value_expression): Likewise. (symbol_set_value_expression): Likewise. (symbol_set_frag, symbol_get_frag): Likewise. (symbol_mark_used, symbol_clear_used, symbol_used_p): Likewise. (symbol_mark_used_in_reloc): Likewise. (symbol_clear_used_in_reloc, symbol_used_in_reloc_p): Likewise. (symbol_mark_mri_common, symbol_clear_mri_common): Likewise. (symbol_mri_common_p): Likewise. (symbol_mark_written, symbol_clear_written): Likewise. (symbol_written_p): Likewise. (symbol_mark_resolved, symbol_resolved_p): Likewise. (symbol_section_p, symbol_equated_p): Likewise. (symbol_constant_p): Likewise. (symbol_get_bfdsym, symbol_set_bfdsym): Likewise. (symbol_get_obj, symbol_set_obj): Likewise. (symbol_get_tc, symbol_set_tc): Likewise. (symbol_begin): Initialize local_hash. (print_symbol_value_1): Handle local symbols. (symbol_print_statistics): Print local symbol statistics. * symbols.h: Include "struc-symbol.h" if not BFD_ASSEMBLER. Declare new symbols.c functions. Move many declarations here from struc-symbol.h. (SYMBOLS_NEED_BACKPOINTERS): Define if needed. * struc-symbol.h (SYMBOLS_NEED_BACKPOINTERS): Don't set. (struct symbol): Move bsym to make it clearly the first field. Remove TARGET_SYMBOL_FIELDS. (symbolS): Don't typedef. (struct broken_word): Remove. (N_TYPE_seg, seg_N_TYPE): Move to symbol.h. (SEGMENT_TO_SYMBOL_TYPE, N_REGISTER): Likewise. (symbol_clear_list_pointers): Likewise. (symbol_insert, symbol_remove): Likewise. (symbol_previous, symbol_append): Likewise. (verify_symbol_chain, verify_symbol_chain_2): Likewise. (struct local_symbol): Define. (local_symbol_converted_p, local_symbol_mark_converted): Define. (local_symbol_resolved_p, local_symbol_mark_resolved): Define. (local_symbol_get_frag, local_symbol_set_frag): Define. (local_symbol_get_real_symbol): Define. (local_symbol_set_real_symbol): Define. Define. * write.c (write_object_file): Call resolve_local_symbol_values. * config/obj-ecoff.h (OBJ_SYMFIELD_TYPE): Define. (TARGET_SYMBOL_FIELDS): Don't define. * config/obj-elf.h (OBJ_SYMFIELD_TYPE): Add local field. If ECOFF_DEBUGGING, add ECOFF fields. (ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define. * config/obj-multi.h (struct elf_obj_sy): Add local field. If ECOFF_DEBUGGING, add ECOFF fields. (ELF_TARGET_SYMBOL_FIELDS, TARGET_SYMBOL_FIELDS): Don't define. (ECOFF_DEBUG_TARGET_SYMBOL_FIELDS): Don't define. * config/tc-mcore.h: Don't include struc-symbol.h. (TARGET_SYMBOL_FIELDS): Don't define. (struct mcore_tc_sy): Define. (TC_SYMFIELD_TYPE): Define. * Many files: Use symbolS instead of struct symbol. Use new accessor functions rather than referring to symbolS fields directly. * read.c (s_mri_common): Don't add in value of line_label. * config/tc-mips.c (md_apply_fix): Correct parenthesization when checking for SEC_LINK_ONCE. * config/tc-sh.h (sh_fix_adjustable): Declare.
1999-05-0319990502 sourceware importbinu_ss_19990502Richard Henderson1-0/+158