aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-xtensa.h
AgeCommit message (Collapse)AuthorFilesLines
2022-07-09gas: rename md_end to md_finishAlan Modra1-2/+2
Currently md_end is typically used for some final actions rather than freeing memory like other *_end functions. Rename it to md_finish, and rename target implementation. The renaming of target functions makes it possible to find them all with "grep md_finish", eg. md_mips_end is renamed to mips_md_finish, not md_mips_finish. This patch leaves a number of md_end functions unchanged, those that either do nothing or deallocate memory, and calls them late. The idea here is that target maintainers implement md_end functions to tidy memory, if anyone cares. Freeing persistent memory in gas is not at all important, except that it can hide more important memory leaks, those that happen once per some frequent gas operation, amongst these unimportant memory leaks. * as.c (main): Rename md_end to md_finish. * config/tc-alpha.c, * config/tc-alpha.h, * config/tc-arc.c, * config/tc-arc.h, * config/tc-arm.c, * config/tc-arm.h, * config/tc-csky.c, * config/tc-csky.h, * config/tc-ia64.c, * config/tc-ia64.h, * config/tc-mcore.c, * config/tc-mcore.h, * config/tc-mips.c, * config/tc-mips.h, * config/tc-mmix.c, * config/tc-mmix.h, * config/tc-msp430.c, * config/tc-msp430.h, * config/tc-nds32.c, * config/tc-nds32.h, * config/tc-ppc.c, * config/tc-ppc.h, * config/tc-pru.c, * config/tc-pru.h, * config/tc-riscv.c, * config/tc-riscv.h, * config/tc-s390.c, * config/tc-s390.h, * config/tc-sparc.c, * config/tc-sparc.h, * config/tc-tic4x.c, * config/tc-tic4x.h, * config/tc-tic6x.c, * config/tc-tic6x.h, * config/tc-v850.c, * config/tc-v850.h, * config/tc-xtensa.c, * config/tc-xtensa.h, * config/tc-z80.c, * config/tc-z80.h: Similarly. * output-file.c (output_file_close): Call md_end.
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-3/+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-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2019-02-10gas: Pass max_bytes to TC_FRAG_INITH.J. Lu1-1/+1
ommit 3ae729d5a4f63740ed9a778960b17c2912b0bbdd Author: H.J. Lu <hjl.tools@gmail.com> Date: Wed Mar 7 04:18:45 2018 -0800 x86: Rewrite NOP generation for fill and alignment increased MAX_MEM_FOR_RS_ALIGN_CODE to 4095 which resulted in increase of assembler time and memory usage by 5 times for inputs with many .p2align directives, which is typical for LTO output. This patch passes max_bytes to TC_FRAG_INIT so that MAX_MEM_FOR_RS_ALIGN_CODE can be set as needed and tracked by backend it so that HANDLE_ALIGN can check the maximum alignment for each rs_align_code frag. Wall time to assemble the same cc1plus.s: before: 423.78user 0.89system 7:05.71elapsed 99%CPU after: 102.35user 0.27system 1:42.89elapsed 99%CPU PR gas/24165 * frags.c (frag_var_init): Pass max_chars to TC_FRAG_INIT as max_bytes. * config/tc-aarch64.h (TC_FRAG_INIT): Add and pass max_bytes to aarch64_init_frag. * /config/tc-arm.h (TC_FRAG_INIT): And and pass max_bytes to arm_init_frag. * config/tc-avr.h (TC_FRAG_INIT): And and ignore max_bytes. * config/tc-ia64.h (TC_FRAG_INIT): Likewise. * config/tc-mmix.h (TC_FRAG_INIT): Likewise. * config/tc-nds32.h (TC_FRAG_INIT): Likewise. * config/tc-ns32k.h (TC_FRAG_INIT): Likewise. * config/tc-rl78.h (TC_FRAG_INIT): Likewise. * config/tc-rx.h (TC_FRAG_INIT): Likewise. * config/tc-score.h (TC_FRAG_INIT): Likewise. * config/tc-tic54x.h (TC_FRAG_INIT): Likewise. * config/tc-tic6x.h (TC_FRAG_INIT): Likewise. * config/tc-xtensa.h (TC_FRAG_INIT): Likewise. * config/tc-i386.h (MAX_MEM_FOR_RS_ALIGN_CODE): Set to (alignment ? ((1 << alignment) - 1) : 1) (i386_tc_frag_data): Add max_bytes. (TC_FRAG_INIT): Add and track max_bytes. (HANDLE_ALIGN): Replace MAX_MEM_FOR_RS_ALIGN_CODE with fragP->tc_frag_data.max_bytes. * doc/internals.texi: Update TC_FRAG_TYPE with max_bytes.
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-11-27gas: xtensa: rewrite xg_relax_trampolineMax Filippov1-1/+0
Replace linked list of trampoline frags with an ordered array, so that instead of indexing fixups trampolines could be indexed. Keep each array in the trampoline_seg structure, so there's no need to rebuild it for every new processed segment. Don't run relaxation for each trampoline frag, instead run it for each fixup in the current segment that needs relaxation at the beginning of each relaxation pass. This way the complexity of this process drops from about O(n^2 * m) to about O(log n * m), where n is the number of trampoline frags and m is the number of fixups that need relaxation in the segment. gas/ 2017-11-27 Max Filippov <jcmvbkbc@gmail.com> * config/tc-xtensa.c (trampoline_index): New structure. (trampoline_seg): Replace trampoline list with trampoline index. (xg_find_trampoline, xg_add_trampoline_to_index) (xg_remove_trampoline_from_index, xg_add_trampoline_to_seg) (xg_is_trampoline_frag_full, xg_get_fulcrum) (xg_find_best_trampoline, xg_relax_fixup, xg_relax_fixups) (xg_is_relaxable_fixup): New functions. (J_MARGIN): New macro. (xtensa_create_trampoline_frag): Use xg_add_trampoline_to_seg instead of open-coded addition to the linked list. (dump_trampolines): Iterate through the trampoline_seg::index. (cached_fixupS, cached_fixup, fixup_cacheS, fixup_cache) (fixup_order, xtensa_make_cached_fixup) (xtensa_realloc_fixup_cache, xtensa_cache_relaxable_fixups) (xtensa_find_first_cached_fixup, xtensa_delete_cached_fixup) (xtensa_add_cached_fixup, check_and_update_trampolines): Remove definitions. (xg_relax_trampoline): Extract logic into separate functions, replace body with a call to xg_relax_fixups. (search_trampolines): Replace search in linked list with search in index. Change data type of address-tracking variables from int to offsetT. Replace abs with labs. (xg_append_jump): Finish the trampoline frag if it's full. (add_jump_to_trampoline): Remove trampoline frag from the index if the frag is full. * config/tc-xtensa.h (xtensa_frag_type): Remove next_trampoline. * testsuite/gas/xtensa/trampoline.d: Adjust absolute addresses as the placement of trampolines has slightly changed. * testsuite/gas/xtensa/trampoline.s: Add _nop so that objdump stays in sync with instruction stream.
2017-11-27gas: xtensa: merge trampoline_frag into xtensa_frag_typeMax Filippov1-0/+8
The split between fragS and trampoline_frag doesn't save much space, but makes trampolines management much more awkward. Merge trampoline_frag data into the xtensa_frag_type, which is a part of fragS. No functional changes. gas/ 2017-11-27 Max Filippov <jcmvbkbc@gmail.com> * config/tc-xtensa.c (init_trampoline_frag): Replace pointer to struct trampoline_frag parameter with pointer to fragS. (xg_append_jump): Remove jump_around parameter. (struct trampoline_frag): Remove. (struct trampoline_seg): Change type of trampoline_list from struct trampoline_frag to fragS. (xtensa_create_trampoline_frag): Don't allocate struct trampoline_frag. Initialize new fragS::tc_frag_data fields. (dump_trampolines, xg_relax_trampoline, search_trampolines) (get_best_trampoline, init_trampoline_frag) (add_jump_to_trampoline, relax_frag_immed): Replace pointer to struct trampoline_frag with a pointer to fragS. (xg_append_jump): Remove jump_around parameter, use fragS::tc_frag_data.jump_around_fix instead. (xg_relax_trampoline, init_trampoline_frag) (add_jump_to_trampoline): Don't pass jump_around parameter to xg_append_jump. * config/tc-xtensa.h (struct xtensa_frag_type): Add new fields: needs_jump_around, next_trampoline and jump_around_fix.
2017-06-14xtensa: don't expect XCHAL_* macros to be constantMax Filippov1-1/+8
Get rid of the assumption that XCHAL_* macros are preprocessor constants: don't use them in preprocessor conditionals or in static variable initializers. 2017-06-14 Max Filippov <jcmvbkbc@gmail.com> bfd/ * elf32-xtensa.c (elf_xtensa_be_plt_entry, elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays, keep both windowed and call0 ABI PLT definitions. (elf_xtensa_create_plt_entry): Use selected ABI to choose upper elf_xtensa_*_plt_entry endex. (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size. gas/ * config/tc-xtensa.c (density_supported, xtensa_fetch_width, absolute_literals_supported): Leave definitions uninitialized. (directive_state): Leave entries for directive_density and directive_absolute_literals initialized to false. (xg_init_global_config, xtensa_init): New functions. * config/tc-xtensa.h (TARGET_BYTES_BIG_ENDIAN): Define as 0. (HOST_SPECIAL_INIT): New definition. (xtensa_init): New declaration.
2017-05-16Allow target files access to default TC_FORCE_RELOCATION definesAlan Modra1-1/+2
* write.c (GENERIC_FORCE_RELOCATION_LOCAL): Define. (TC_FORCE_RELOCATION_LOCAL): Use it. (GENERIC_FORCE_RELOCATION_SUB_SAME): Define. (TC_FORCE_RELOCATION_SUB_SAME): Use it. * config/tc-arm.h (TC_FORCE_RELOCATION_LOCAL, TC_FORCE_RELOCATION_SUB_SAME): Use GENERIC defines. * config/tc-aarch64.h: Similarly. * config/tc-avr.h: Similarly. * config/tc-cris.h: Similarly. * config/tc-i386.h: Similarly. * config/tc-i960.h: Similarly. * config/tc-ia64.h: Similarly. * config/tc-microblaze.h: Similarly. * config/tc-mips.h: Similarly. * config/tc-msp430.h: Similarly. * config/tc-nds32.h: Similarly. * config/tc-pru.h: Similarly. * config/tc-riscv.h: Similarly. * config/tc-rl78.h: Similarly. * config/tc-s390.h: Similarly. * config/tc-sh.h: Similarly. * config/tc-sh64.h: Similarly. * config/tc-sparc.h: Similarly. * config/tc-xtensa.h: Similarly. * config/tc-mn10300.h: Similarly. (GENERIC_FORCE_RELOCATION_LOCAL): Define. * config/tc-msp430.c (msp430_force_relocation_local): Modify to be addition to rather than replacement of standard TC_FORCE_RELOCATION_LOCAL.
2017-01-02Update year range in copyright notice of all files.Alan Modra1-1/+1
2016-03-31make xtensa_section_rename () take const char *Trevor Saunders1-1/+1
Xtensa uses it in several macros passing it a literal string, so its convenient for the argument type to be const char *. However some of the code in symbols.c seems to assume tc_canonicalize_symbol_name () will return a non const pointer, and some other target's implementations even modify the argument, so it seems best to return a char * which means casting away const on the argument when we return it instead of another string. gas/ChangeLog: 2016-03-31 Trevor Saunders <tbsaunde+binutils@tbsaunde.org> * config/tc-xtensa.c (struct rename_section_struct): Make old_name const. (xtensa_section_rename): Make argument type const char *. * config/tc-xtensa.h (xtensa_section_rename): Adjust.
2016-01-01Copyright update for binutilsAlan Modra1-1/+1
2015-08-12xtensa: add --auto-litpools optionMax Filippov1-0/+1
Auto-litpools is the automated version of text-section-literals: literal pool candidate frags are planted every N frags and during relaxation they are turned into actual literal pools where literals are moved to become reachable for their first reference by L32R instruction. 2015-08-12 David Weatherford <weath@cadence.com> gas/ * config/tc-xtensa.c (struct litpool_frag, struct litpool_seg): New structures. (xtensa_maybe_create_literal_pool_frag): New function. (litpool_seg_list, auto_litpools, auto_litpool_limit) (litpool_buf, litpool_slotbuf): New static variables. (option_auto_litpools, option_no_auto_litpools) (option_auto_litpool_limit): New enum identifiers. (md_longopts): Add entries for auto-litpools, no-auto-litpools and auto-litpool-limit. (md_parse_option): Handle option_auto_litpools, option_no_auto_litpools and option_auto_litpool_limit. (md_show_usage): Add help for --[no-]auto-litpools and --auto-litpool-limit. (xtensa_mark_literal_pool_location): Record a place for literal pool with a call to xtensa_maybe_create_literal_pool_frag. (get_literal_pool_location): Find highest priority literal pool or convert candidate to literal pool when auto-litpools are used. (xg_assemble_vliw_tokens): Create literal pool after jump instruction. (xtensa_check_frag_count): Create candidate literal pool every auto_litpool_limit frags. (xtensa_relax_frag): Add jump around literals to non-empty literal pool. (xtensa_move_literals): Estimate literal pool addresses and move unreachable literals closer to their users, converting candidate to literal pool if needed. (xtensa_switch_to_non_abs_literal_fragment): Only emit error about missing .literal_position in case auto-litpools are not used. * config/tc-xtensa.h (xtensa_relax_statesE): New relaxation state: RELAX_LITERAL_POOL_CANDIDATE_BEGIN. * doc/as.texinfo (Xtensa options): Document --auto-litpools and --no-auto-litpools options. * doc/c-xtensa.texi (Xtensa options): Likewise. 2015-08-12 Max Filippov <jcmvbkbc@gmail.com> gas/testsuite/ * gas/xtensa/all.exp: Add auto-litpools to the list of xtensa tests. * gas/xtensa/auto-litpools.s: New file: auto-litpools test. * gas/xtensa/auto-litpools.s: New file: auto-litpools test result pattern.
2015-08-12Remove trailing spaces in gasH.J. Lu1-2/+2
2015-01-02ChangeLog rotatation and copyright year updateAlan Modra1-1/+1
2014-03-21Add support to the Xtensa target for creating trampolines for out-of-range ↵David Weatherford1-0/+5
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-2/+1
2009-09-02update copyright datesAlan Modra1-1/+2
2009-08-192009-08-19 Sterling Augustine <sterling@tensilica.com>Sterling Augustine1-3/+4
* config/tc-xtensa.h (xtensa_frag_data): Rename unused field fr_prev to no_transform_end. * config/tc-xtensa.c (xtensa_mark_difference_of_two_symbols): Set and use no_transform_end.
2008-11-042008-11-04 Sterling Augustine <sterling@tensilica.com>Bob Wilson1-0/+4
* config/tc-xtensa.c (xtensa_j_opcode): New. (xg_instruction_matches_option_term): Handle "FREEREG" option. (xg_build_to_insn): Likewise. Update renamed tls_reloc reference. (md_begin): Initialize xtensa_j_opcode. (md_assemble): Update renamed tls_reloc reference. Handle "j.l". (xg_assemble_vliw_tokens): Save free_reg info in the frag. (tinsn_immed_from_frag): Get free_reg info back out of the frag. (vinsn_to_insnbuf): Update renamed tls_reloc references. Distinguish extra argument for "FREEREG" from extra TLS argument. * config/tc-xtensa.h (struct xtensa_frag_type): Add free_reg field. * config/xtensa-istack.h (struct tinsn_struct): Rename tls_reloc field to extra_arg. * config/xtensa-relax.c (widen_spec_list): Add rules to relax "j.l". (build_transition): Handle "FREEREG" operand. * config/xtensa-relax.h (enum op_type): Add OP_FREEREG. 2008-11-04 Bob Wilson <bob.wilson@acm.org> * gas/xtensa/all.exp: Run jlong test. * gas/xtensa/jlong.d: New. * gas/xtensa/jlong.s: New.
2008-09-19 * write.c (TC_FORCE_RELOCATION_SUB_LOCAL): Heed md_register_arithmetic.Alan Modra1-1/+1
(TC_VALIDATE_FIX_SUB): Likewise. * config/tc-frv.h (TC_FORCE_RELOCATION_SUB_LOCAL): Likewise. * config/tc-hppa.h (TC_FORCE_RELOCATION_SUB_LOCAL): Likewise. * config/tc-mn10300.h (TC_VALIDATE_FIX_SUB): Likewise. * config/tc-sh.h (TC_VALIDATE_FIX_SUB): Likewise. (TC_FORCE_RELOCATION_SUB_LOCAL): Likewise. * config/tc-sh64.h (TC_VALIDATE_FIX_SUB): Likewise. * config/tc-xtensa.h (TC_VALIDATE_FIX_SUB): Likewise. * doc/internals.texi (TC_FORCE_RELOCATION_SUB_ABS, TC_FORCE_RELOCATION_SUB_LOCAL, TC_VALIDATE_FIX_SUB): Show new param.
2008-03-142008-03-14 Sterling Augustine <sterling@tensilica.com>Bob Wilson1-1/+3
* config/tc-xtensa.h (xtensa_relax_statesE): Update comment for RELAX_LOOP_END_ADD_NOP.
2008-03-032008-03-03 Sterling Augustine <sterling@tensilica.com>Bob Wilson1-1/+3
* config/tc-xtensa.h (RELAX_XTENSA_NONE): New.
2007-11-30gas/Bob Wilson1-0/+4
* config/tc-xtensa.h (md_allow_eh_opt): Define. gas/testsuite/ * gas/elf/elf.exp: Disable ehopt test for Xtensa.
2007-11-02 * config/tc-xtensa.c (xtensa_symbol_new_hook): New.Bob Wilson1-0/+2
(xtensa_mark_difference_of_two_symbols): New. (xtensa_post_relax_hook): Call xtensa_mark_difference_of_two_symbols. * config/tc-xtensa.h (xtensa_symfield_type): Add next_expr_symbol. (tc_symbol_new_hook): Define.
2007-07-03Switch to GPLv3Nick Clifton1-1/+1
2007-06-22 * config/tc-xtensa.c (xg_assembly_relax): Comment termination rules.Bob Wilson1-7/+9
(frag_format_size): Handle RELAX_IMMED_STEP3. (xtensa_relax_frag, md_convert_frag): Likewise. * config/tc-xtensa.h (xtensa_relax_statesE): Add RELAX_IMMED_STEP3. (RELAX_IMMED_MAXSTEPS): Adjust. * config/xtensa-relax.c (widen_spec_list): Add transitions from wide branches to branch-over-jumps. (build_transition): Handle wide branches in transition patterns.
2007-06-19 * config/tc-xtensa.h (struct xtensa_frag_type): Update comment aboutBob Wilson1-1/+3
use of literal_frag field. * config/tc-xtensa.c (xtensa_mark_literal_pool_location): Record frag in the literal_frag field. (xtensa_move_literals): Use it here instead of searching. Update literal_frag field with new value.
2007-06-11bfd/Bob Wilson1-0/+7
* elf32-xtensa.c (extend_ebb_bounds_forward): Use renamed XTENSA_PROP_NO_TRANSFORM flag instead of XTENSA_PROP_INSN_NO_TRANSFORM. (extend_ebb_bounds_backward, compute_text_actions): Likewise. (compute_ebb_proposed_actions, coalesce_shared_literal): Likewise. (xtensa_get_property_predef_flags): Likewise. (compute_removed_literals): Pass new arguments to is_removable_literal. (is_removable_literal): Add sec, prop_table and ptblsize arguments. Do not remove literal if the NO_TRANSFORM property flag is set. gas/ * config/tc-xtensa.c (XTENSA_PROP_INSN_NO_TRANSFORM): Renamed to... (XTENSA_PROP_NO_TRANSFORM): ...this. (frag_flags_struct): Move is_no_transform out of the insn sub-struct. (xtensa_mark_frags_for_org): New. (xtensa_handle_align): Set RELAX_ORG frag subtype for rs_org. (xtensa_post_relax_hook): Call xtensa_mark_frags_for_org. (get_frag_property_flags): Adjust reference to is_no_transform flag. (xtensa_frag_flags_combinable): Likewise. (frag_flags_to_number): Likewise. Use XTENSA_PROP_NO_TRANSFORM. * config/tc-xtensa.h (xtensa_relax_statesE): Add RELAX_ORG. include/elf/ * xtensa.h (XTENSA_PROP_INSN_NO_TRANSFORM): Renamed to... (XTENSA_PROP_NO_TRANSFORM): ...this. ld/ * emultempl/xtensaelf.em (replace_insn_sec_with_prop_sec): Use renamed XTENSA_PROP_NO_TRANSFORM flag instead of XTENSA_PROP_INSN_NO_TRANSFORM.
2007-02-01 * config/tc-xtensa.c (xg_add_opcode_fix, md_apply_fix): Delete use ofBob Wilson1-5/+1
fx_tcbit. * config/tc-xtensa.h (TC_FORCE_RELOCATION_LOCAL): Remove.
2007-02-01 * write.h (struct fix <fx_pcrel_adjust, fx_size>): Move.Alan Modra1-0/+4
(struct fix <fx_plt>): Rename to tcbit2. * write.c (fix_new_internal): Adjust. (TC_FORCE_RELOCATION_LOCAL): Don't test fx_plt. * config/tc-arm.h (TC_FORCE_RELOCATION_LOCAL): Likewise. * config/tc-cris.h (TC_FORCE_RELOCATION_LOCAL): Likewise. * config/tc-i386.h (TC_FORCE_RELOCATION_LOCAL): Likewise. * config/tc-i960.h (TC_FORCE_RELOCATION_LOCAL): Likewise. * config/tc-sh.h (TC_FORCE_RELOCATION_LOCAL): Likewise. * config/tc-sh64.h (TC_FORCE_RELOCATION_LOCAL): Likewise. * config/tc-sparc.h (TC_FORCE_RELOCATION_LOCAL): Likewise. * config/tc-msp430.c (msp430_force_relocation_local): Likewise. * config/tc-ia64.c (emit_one_bundle): Don't set fx_plt. * config/tc-ia64.h (TC_FORCE_RELOCATION_LOCAL): Don't test fx_plt. Instead, compare fx_r_type. * config/tc-xtensa.c (xg_add_opcode_fix, md_apply_fix): Use fx_tcbit in place of fx_plt. * config/tc-xtensa.h (TC_FORCE_RELOCATION_LOCAL): Define. * doc/internals.texi (TC_FORCE_RELOCATION_LOCAL): Remove reference to fx_plt.
2006-08-08gas/ChangeLog:Bob Wilson1-0/+3
* dwarf2dbg.c (DWARF2_USE_FIXED_ADVANCE_PC): New. (out_sleb128): New. (out_fixed_inc_line_addr): New. (process_entries): Use out_fixed_inc_line_addr when DWARF2_USE_FIXED_ADVANCE_PC is set. * config/tc-xtensa.h (DWARF2_USE_FIXED_ADVANCE_PC): Define. gas/testsuite/ChangeLog: * gas/lns/lns-common-1-alt.d: New file. * gas/lns/lns.exp: Use lns-common-1-alt.d for xtensa targets.
2006-01-31 * config/xtensa-istack.h (TInsn): Remove record_fix and sub_symbolBob Wilson1-1/+0
fields. * config/tc-xtensa.h (xtensa_frag_type): Remove slot_sub_symbols field. * config/tc-xtensa.c (md_apply_fix): Check for unexpected uses of subtracted symbols. (relaxation_requirements): Add pfinish_frag argument and use it to replace setting tinsn->record_fix fields. (xg_assemble_vliw_tokens): Adjust calls to relaxation_requirements and vinsn_to_insnbuf. Remove references to record_fix and slot_sub_symbols fields. (xtensa_mark_narrow_branches): Delete unused code. (is_narrow_branch_guaranteed_in_range): Handle expr that is not just a symbol. (convert_frag_immed): Adjust vinsn_to_insnbuf call and do not set record_fix fields. (tinsn_immed_from_frag): Remove code for handling slot_sub_symbols. (vinsn_to_insnbuf): Change use of record_fixup argument, replacing use of the record_fix field. Simplify error messages for unexpected symbolic operands. (set_expr_symbol_offset_diff): Delete.
2005-12-30 * config/tc-xtensa.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define.Bob Wilson1-0/+1
2005-12-20 * config/tc-xtensa.c (xtensa_mark_narrow_branches): SetBob Wilson1-0/+4
is_aligning_branch flag. (find_address_of_next_align_frag): Limit by xtensa_fetch_width. (future_alignment_required): Except for frags with is_aligning_branch flag set, call frag_wane for frags that do not need to be reexamined for aligning. (relax_frag_immed): Replace orig_vinsn with cur_vinsn to fix a leak. (convert_frag_immed): Likewise. (convert_frag_narrow): Check is_aligning_branch flag. * config/tc-xtensa.h (xtensa_frag_type): Add is_aligning_branch flag.
2005-08-11 * README-vms: Delete.Alan Modra1-5/+1
* config-gas.com: Delete. * makefile.vms: Delete. * vmsconf.sh: Delete. * config/atof-tahoe.c: Delete. * config/m88k-opcode.h: Delete. * config/obj-bout.c: Delete. * config/obj-bout.h: Delete. * config/obj-hp300.c: Delete. * config/obj-hp300.h: Delete. * config/tc-a29k.c: Delete. * config/tc-a29k.h: Delete. * config/tc-h8500.c: Delete. * config/tc-h8500.h: Delete. * config/tc-m88k.c: Delete. * config/tc-m88k.h: Delete. * config/tc-tahoe.c: Delete. * config/tc-tahoe.h: Delete. * config/tc-tic80.c: Delete. * config/tc-tic80.h: Delete. * config/tc-w65.c: Delete. * config/tc-w65.h: Delete. * config/te-aux.h: Delete. * config/te-delt88.h: Delete. * config/te-delta.h: Delete. * config/te-dpx2.h: Delete. * config/te-hp300.h: Delete. * config/te-ic960.h: Delete. * config/vms-a-conf.h: Delete. * doc/c-a29k.texi: Delete. * doc/c-h8500.texi: Delete. * doc/c-m88k.texi: Delete. * README: Remove obsolete examples, and list of supported targets. * Makefile.am: Remove a29k, h8500, m88k, tahoe, tic80, w65, bout and hp300 support. (DEP_FLAGS): Don't define BFD_ASSEMBLER. * configure.in: Remove --enable-bfd-assembler, need_bfd, primary_bfd_gas. * configure.tgt: Remove a29k, h8300-coff, h8500-*, i960 non-elf, m68k non bfd, m88k, or32-coff, tic80-*, vax non-bfd, w65k-*, *-nindy. * as.c: Remove all non-BFD_ASSEMBLER code, support for above targets. * as.h: Likewise. * dw2gencfi.c: Likewise. * dwarf2dbg.c: Likewise. * ehopt.c: Likewise. * input-file.c: Likewise. * listing.c: Likewise. * literal.c: Likewise. * messages.c: Likewise. * obj.h: Likewise. * output-file.c: Likewise. * read.c: Likewise. * stabs.c: Likewise. * struc-symbol.h: Likewise. * subsegs.c: Likewise. * subsegs.h: Likewise. * symbols.c: Likewise. * symbols.h: Likewise. * tc.h: Likewise. * write.c: Likewise. * write.h: Likewise. * config/aout_gnu.h: Likewise. * config/obj-aout.c: Likewise. * config/obj-aout.h: Likewise. * config/obj-coff.c: Likewise. * config/obj-coff.h: Likewise. * config/obj-evax.h: Likewise. * config/obj-ieee.h: Likewise. * config/tc-arm.c: Likewise. * config/tc-arm.h: Likewise. * config/tc-avr.c: Likewise. * config/tc-avr.h: Likewise. * config/tc-crx.h: Likewise. * config/tc-d10v.h: Likewise. * config/tc-d30v.h: Likewise. * config/tc-dlx.h: Likewise. * config/tc-fr30.h: Likewise. * config/tc-frv.h: Likewise. * config/tc-h8300.c: Likewise. * config/tc-h8300.h: Likewise. * config/tc-hppa.h: Likewise. * config/tc-i370.h: Likewise. * config/tc-i386.c: Likewise. * config/tc-i386.h: Likewise. * config/tc-i860.h: Likewise. * config/tc-i960.c: Likewise. * config/tc-i960.h: Likewise. * config/tc-ip2k.h: Likewise. * config/tc-iq2000.h: Likewise. * config/tc-m32c.h: Likewise. * config/tc-m32r.h: Likewise. * config/tc-m68hc11.h: Likewise. * config/tc-m68k.c: Likewise. * config/tc-m68k.h: Likewise. * config/tc-maxq.c: Likewise. * config/tc-maxq.h: Likewise. * config/tc-mcore.c: Likewise. * config/tc-mcore.h: Likewise. * config/tc-mn10200.h: Likewise. * config/tc-mn10300.c: Likewise. * config/tc-mn10300.h: Likewise. * config/tc-ms1.h: Likewise. * config/tc-msp430.c: Likewise. * config/tc-msp430.h: Likewise. * config/tc-ns32k.c: Likewise. * config/tc-ns32k.h: Likewise. * config/tc-openrisc.h: Likewise. * config/tc-or32.c: Likewise. * config/tc-or32.h: Likewise. * config/tc-ppc.c: Likewise. * config/tc-ppc.h: Likewise. * config/tc-s390.h: Likewise. * config/tc-sh.c: Likewise. * config/tc-sh.h: Likewise. * config/tc-sparc.c: Likewise. * config/tc-tic30.c: Likewise. * config/tc-tic30.h: Likewise. * config/tc-tic4x.c: Likewise. * config/tc-tic4x.h: Likewise. * config/tc-tic54x.c: Likewise. * config/tc-tic54x.h: Likewise. * config/tc-v850.h: Likewise. * config/tc-vax.c: Likewise. * config/tc-vax.h: Likewise. * config/tc-xstormy16.h: Likewise. * config/tc-xtensa.h: Likewise. * config/tc-z8k.c: Likewise. * config/tc-z8k.h: Likewise. * config/vms-a-conf.h * doc/Makefile.am: Likewise. * doc/all.texi: Likewise. * doc/as.texinfo: Likewise. * doc/Makefile.in: Regenerate. * Makefile.in: Regenerate. * configure: Regenerate. * config.in: Regenerate. * po/POTFILES.in: Regenerate.
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-06-07 * config/tc-xtensa.h (resource_table): Change units to unsigned chars.Bob Wilson1-1/+1
* config/tc-xtensa.c (new_resource_table): Likewise. (resize_resource_table): Likewise. (release_resources): Fix assertion for unsigned values.
2005-05-06 * config/tc-xtensa.c: Remove excess whitespace.Bob Wilson1-12/+12
* config/tc-xtensa.h: Likewise. * config/xtensa-istack.h: Likewise. * config/xtensa-relax.c: Likewise. * config/xtensa-relax.h: Likewise.
2005-05-05Update the address and phone number of the FSFNick Clifton1-2/+2
2005-04-14 * config/tc-xtensa.h (struct xtensa_frag_type): Add lit_frchain field.Bob Wilson1-1/+5
* config/tc-xtensa.c (xg_translate_sysreg_op, xtensa_translate_old_userregs_ops, xtensa_find_unaligned_branch_targets, xtensa_find_unaligned_loops, xtensa_fix_close_loop_end_frags, relax_frag_add_nop): Support 64-bit host. (xtensa_mark_literal_pool_location, xtensa_move_literals): Use tc_frag_data lit_frchain and lit_seg fields instead of fr_var.
2005-03-26 * config/tc-xtensa.c (use_longcalls): Delete.Bob Wilson1-0/+1
(xg_symbolic_immeds_fit): Check for direct calls and return TRUE if the use_longcalls flag is set. Do this before checking the segment. (xg_expand_assembly_insn): Rearrange to use new do_expand flag. Never expand direct calls at this point. (xtensa_set_frag_assembly_state): Set use_longcalls flag. (xtensa_find_unmarked_state_frags): Likewise. (md_assemble): Do not disable longcalls by setting is_specific_opcode. (xg_assemble_vliw_tokens): Switch frags when use_longcalls changes. (convert_frag_immed): Remove unnecessary check of is_specific_opcode. * config/tc-xtensa.h (xtensa_frag_type): Add use_longcalls flag.
2005-03-17 * config/tc-xtensa.c (xg_apply_tentative_value): Rename toBob Wilson1-0/+4
xg_apply_fix_value and return a value to indicate success. (md_pcrel_from): Skip check of fx_done. Return 0 if not PC-relative. (xtensa_force_relocation): Remove checks for VTABLE relocs. (xtensa_validate_fix_sub): New. (xtensa_fix_adjustable): Remove check for external or weak symbols. (tc_gen_reloc): Move code to handle difference of symbols and code to apply tentative fix values to ... (md_apply_fix3): ...here. Enable standard overflow checks for simple 8, 16, and 32 bit relocations. Apply fixes for slot-specific relocations when linkrelax flag is not set. * config/tc-xtensa.h (xtensa_validate_fix_sub): Add prototype. (TC_FORCE_RELOCATION_SUB_SAME, TC_VALIDATE_FIX_SUB): Define.
2005-03-11 * config/tc-xtensa.c (finish_vinsn): Include the last instruction slotBob Wilson1-1/+1
when checking if xg_resolve_literals needs to be called. * config/tc-xtensa.h: Fix spelling typo in a comment.
2004-11-04 * config/tc-xtensa.c: Remove XTENSA_SECTION_RENAME ifdefs.Bob Wilson1-10/+2
(add_section_rename): Delete. Inlined into... (build_section_rename): ...here. Use xstrdup instead of strdup. (xtensa_section_rename): Drop "const" from argument and return types. (md_show_usage): Indent to match show_usage(). * config/tc-xtensa.h: Remove XTENSA_SECTION_RENAME ifdefs. (tc_canonicalize_section_name): Define. (md_elf_section_rename): Remove unused macro. * doc/as.texinfo (Overview): Document Xtensa --rename-section option. * doc/c-xtensa.texi (Xtensa Options): Likewise. (Frame Directive): Delete.
2004-10-12bfd ChangeLogBob Wilson1-1/+1
* elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete. (narrow_instruction, widen_instruction): Remove unnecessary calls to xtensa_format_encode. (ebb_propose_action): Inline call to ebb_add_proposed_action. (ebb_add_proposed_action): Delete. gas ChangeLog * config/tc-xtensa.c (xtensa_frequency_pseudo): Use set_subseg_freq. (is_entry_opcode, is_movi_opcode, is_the_loop_opcode, is_jx_opcode, is_windowed_return_opcode): Delete. (xtensa_frob_label): Use get_subseg_target_freq. (md_assemble): Inline call to is_entry_opcode. (xtensa_handle_align): Inline call to get_frag_is_literal. (relaxation_requirements): Inline call to is_jx_opcode. (emit_single_op): Inline call to is_movi_opcode. (xg_assemble_vliw_tokens): Inline calls to get_frag_is_insn, get_frag_is_no_transform, is_entry_opcode, and set_frag_is_specific_opcode. Use get_subseg_total_freq. (xtensa_fix_a0_b_retw_frags, xtensa_fix_b_j_loop_end_frags, xtensa_fix_close_loop_end_frags, relax_frag_immed, convert_frag_immed): Inline calls to get_frag_is_no_transform. (next_instrs_are_b_retw): Inline call to is_windowed_return_opcode. (xtensa_fix_short_loop_frags): Inline calls to is_the_loop_opcode and get_frag_is_no_transform. (convert_frag_immed_finish_loop): Inline calls to get_expression_value and set_frag_is_no_transform. (get_expression_value): Delete. (subseg_map struct): Rename cur_total_freq to total_freq. Rename cur_target_freq to target_freq. (get_subseg_info): Split out code to create a new map entry into ... (add_subseg_info): ... this new function. (get_last_insn_flags): Check if get_subseg_info succeeded. (set_last_insn_flags): Call add_subseg_info if needed. (get_subseg_total_freq, get_subseg_target_freq, set_subseg_freq): New. (xtensa_reorder_segments): Compute last_sec while counting sections. Remove call to get_last_sec. (get_last_sec): Delete. (cache_literal_section): Inline call to retrieve_literal_seg and its callees, seg_present and add_seg_list. (retrieve_literal_seg, seg_present, add_seg_list): Delete. (get_frag_is_insn, get_frag_is_no_transform, set_frag_is_specific_opcode, set_frag_is_no_transform): Delete. * config/tc-xtensa.h (MAX_SLOTS): Reduce from 31 to 15.
2004-10-12bfd ChangeLogBob Wilson1-44/+26
* elf32-xtensa.c: Use ISO C90 formatting. gas ChangeLog * config/tc-xtensa.c: Use ISO C90 formatting. * config/tc-xtensa.h: Likewise. * config/xtensa-istack.h: Likewise. * config/xtensa-relax.c: Likewise. * config/xtensa-relax.h: Likewise. ld ChangeLog * emultempl/xtensaelf.em: Use ISO C90 formatting. opcodes ChangeLog * xtensa-dis.c: Use ISO C90 formatting.