aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-sparc.c
AgeCommit message (Collapse)AuthorFilesLines
2001-12-21 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix dst_mask forJakub Jelinek1-4/+163
R_SPARC_DISP32. Support R_SPARC_PLT32. (sparc_reloc_map): Add BFD_RELOC_16_PCREL and BFD_RELOC_SPARC_PLT32. (elf32_sparc_check_relocs): Handle R_SPARC_PLT32. (elf32_sparc_relocate_section): Likewise. * elf64-sparc.c (sparc64_elf_howto_table): Fix dst_mask for R_SPARC_DISP32. Support R_SPARC_PLT32 and R_SPARC_PLT64. (sparc_reloc_map): Add BFD_RELOC_16_PCREL, BFD_RELOC_64_PCREL and BFD_RELOC_SPARC_PLT32. (sparc64_elf_check_relocs): Handle R_SPARC_PLT32 and R_SPARC_PLT64. (sparc64_elf_relocate_section): Likewise. * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SPARC_PLT32. * bfd-in2.h, libbfd.h: Rebuilt. * config/tc-sparc.h (TC_PARSE_CONS_EXPRESSION): Define. (sparc_cons): Provide prototype. * config/tc-sparc.c (tc_gen_reloc): Handle BFD_RELOC_*_PCREL and BFD_RELOC_SPARC_PLT{32,64}. Enumerate for which relocs reloc->addend = fixp->fx_addnumber shouldn't be done instead of enumarating for which pc relative ones it should be done. (sparc_cons_special_reloc): New variable. (sparc_cons): New function. (cons_fix_new_sparc): Use sparc_cons_special_reloc. * testsuite/gas/sparc/pcrel.s: New test. * testsuite/gas/sparc/pcrel.d: Expected output. * testsuite/gas/sparc/pcrel64.s: New test. * testsuite/gas/sparc/pcrel64.d: Expected output. * testsuite/gas/sparc/plt.s: New test. * testsuite/gas/sparc/plt.d: Expected output. * testsuite/gas/sparc/plt64.s: New test. * testsuite/gas/sparc/plt64.d: Expected output. * testsuite/gas/sparc/sparc.exp: Add pcrel, pcrel64, plt and plt64 tests.
2001-11-28 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.Jakub Jelinek1-5/+0
(elf64_alpha_relocate_section): Translate local_got_entries for STT_SECTION symbol to SHF_MERGE section the first time we see it. * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add sec_merge_done. (get_local_sym_hash): New, extracted from get_dyn_sym_info. (get_dyn_sym_info): Use it. (elfNN_ia64_relocate_section): Translate local dyn entries for STT_SECTION symbol to SHF_MERGE section the first time we see it. * write.c (adjust_reloc_syms): Mark SEC_MERGE symbols as used in reloc if it has non-zero addend. * config/tc-alpha.c (tc_gen_reloc): Reinstall SEC_MERGE check. * config/tc-sparc.c (md_apply_fix3): Likewise.
2001-11-15Update all uses of md_apply_fix to use md_apply_fix3. Make it a void function.Nick Clifton1-24/+12
2001-11-14Do not remove the symbol's value from the addend for fixups against localNick Clifton1-15/+22
symbols in SEC_MERGE sections - it was not added in, in the first place.
2001-09-19Locale changes from Bruno Haible <haible@clisp.cons.org>.H.J. Lu1-15/+15
2001-09-07 * config/tc-sparc.c (md_apply_fix3): Handle relocs against SEC_MERGEJakub Jelinek1-0/+1
section symbols the same way as externs.
2001-08-12Fix behaviour of unaligned data directivesNick Clifton1-2/+2
2001-07-23 * config/tc-alpha.h: Fix formatting.Kazu Hirata1-4/+4
* config/tc-arc.c: Likewise. * config/tc-d10v.h: Likewise. * config/tc-hppa.c: Likewise. * config/tc-i370.c: Likewise. * config/tc-i386.h: Likewise. * config/tc-i960.h: Likewise. * config/tc-ia64.c: Likewise. * config/tc-ia64.h: Likewise. * config/tc-m32r.c: Likewise. * config/tc-m68k.c: Likewise. * config/tc-m88k.c: Likewise. * config/tc-ns32k.c: Likewise. * config/tc-pdp11.c: Likewise. * config/tc-pj.h: Likewise. * config/tc-s390.c: Likewise. * config/tc-sparc.c: Likewise. * config/tc-sparc.h: Likewise. * config/tc-tic80.c: Likewise. * config/tc-w65.h: Likewise.
2001-05-28Add support for .uahword, .uaword and .uaxword pseudo opsNick Clifton1-8/+25
2001-03-08Fix copyright noticesNick Clifton1-1/+2
2001-01-142001-01-14 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-1/+1
* config/tc-alpha.c: Fix formatting. * config/tc-arc.c: Likewise. * config/tc-arc.h: Likewise. * config/tc-d10v.c: Likewise. * config/tc-i370.c: Likewise. * config/tc-i386.c: Likewise. * config/tc-i960.c: Likewise. * config/tc-m68k.c: Likewise. * config/tc-ppc.c: Likewise. * config/tc-sparc.c: Likewise. * config/tc-tahoe.c: Likewise. * config/tc-vax.c: Likewise.
2000-12-28 * as.h (rs_align_test): New.Richard Henderson1-32/+44
* 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-12-032000-12-03 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-1/+1
* tc-a29k.c: Fix formatting. * tc-alpha.c: Likewise. * tc-arm.c: Likewise. * tc-cris.c: Likewise. * tc-hppa.c: Likewise. * tc-i370.c: Likewise. * tc-i386.c: Likewise. * tc-i860.c: Likewise. * tc-i960.c: Likewise. * tc-ia64.c: Likewise. * tc-m68hc11.c: Likewise. * tc-m68k.c: Likewise. * tc-m88k.c: Likewise. * tc-pj.c: Likewise. * tc-ppc.c: Likewise. * tc-sh.c: Likewise. * tc-sparc.c: Likewise. * tc-tahoe.c: Likewise. * tc-vax.c: Likewise.
2000-11-21 * config/tc-sparc.c (md_pseudo_table): Add .file and .loc.Jakub Jelinek1-0/+7
(output_insn): Call dwarf2_emit_insn.
2000-10-20gas/Jakub Jelinek1-38/+70
* config/tc-sparc.c (sparc_ip): Fix a bug which caused v9_arg_p instructions to loose any special insn->architecture mask. * config/tc-sparc.c (v9a_asr_table): Add v9b ASRs. (sparc_md_end, sparc_arch_types, sparc_arch, sparc_elf_final_processing): Handle v8plusb and v9b architectures. (sparc_ip): Handle siam mode operands. Support v9b ASRs (and request v9b architecture if they are used). bfd/ * elf32-sparc.c (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p, elf32_sparc_final_write_processing): Support v8plusb. * elf64-sparc.c (sparc64_elf_merge_private_bfd_data, sparc64_elf_object_p): Support v9b. * archures.c: Declare v8plusb and v9b machines. * bfd-in2.h: Ditto. * cpu-sparc.c: Ditto. include/opcode/ * sparc.h (enum sparc_opcode_arch_val): Add SPARC_OPCODE_ARCH_V9B. Note that '3' is used for siam operand. opcodes/ * sparc-dis.c (v9a_asr_reg_names): Add v9b ASRs. (compute_arch_mask): Add v8plusb and v9b machines. (print_insn_sparc): siam mode decoding, accept ASRs up to 25. * opcodes/sparc-opc.c: Support for Cheetah instruction set. (prefetch_table): Add #invalidate.
2000-09-262000-09-25 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-2/+2
* config/tc-cris.c: Fix formatting. * config/tc-d10v.h: Likewise. * config/tc-d30v.c: Likewise. * config/tc-d30v.h: Likewise. * config/tc-fr30.c: Likewise. * config/tc-fr30.h: Likewise. * config/tc-m68k.c: Likewise. * config/tc-m68k.h: Likewise. * config/tc-pj.h: Likewise. * config/tc-ppc.c: Likewise. * config/tc-ppc.h: Likewise. * config/tc-sh.c: Likewise. * config/tc-sh.h: Likewise. * config/tc-sparc.c: Likewise. * config/tc-v850.h: Likewise. * config/tc-vax.h: Likewise. * config/tc-w65.h: Likewise. * config/tc-z8k.h: Likewise.
2000-08-16 * config/tc-sparc.c: Kill all warnings.Jakub Jelinek1-25/+51
(md_parse_option): Set -32/-64 for -xarch=, allow all -A archs in -xarch= as well. (md_show_usage): Update usage text.
2000-08-04Fix typoNick Clifton1-3/+3
2000-08-042000-08-05 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-2/+4
* config/tc-cris.c: Fix formatting. * config/tc-i386.c: Likewise. * config/tc-sparc.c (sparc_ip): Simplify the code.
2000-08-042000-08-04 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-38/+44
* config/tc-cris.c: Rearrange code for readability. * config/tc-d10v.c: Fix formatting. * config/tc-m32r.c: Likewise. * config/tc-sparc.c: Likewise.
2000-07-27Kazu Hirata's formatting fixes.Alan Modra1-208/+220
2000-06-09Don't treat `;' as a line separator by default.Alan Modra1-1/+1
Explicitly mention `;' in line_separator_chars in each backend.
2000-05-26 * config/tc-sparc.c (sparc_relax): New.Jakub Jelinek1-1/+102
(md_longopts): Add -relax and -no-relax options. (md_parse_options, md_show_usage): Likewise. (md_apply_fix3): Optimize tail call into branch always if possible.
2000-04-05* config/tc-sparc.c (sparc_ip): Avoid string pasting.Alexandre Oliva1-2/+1
2000-04-03Move bug report string to one place.Alan Modra1-1/+1
2000-02-282000-02-27 Jakub Jelinek <jakub@redhat.com>Ian Lance Taylor1-1/+11
* config/tc-sparc.c (OPTION_UNDECLARED_REGS): New option. (md_parse_option): Handle it. (md_show_usage): Document it.
1999-08-08 * config/tc-sparc.c (sparc_ip): Allow assembly of %lo()+%reg.Richard Henderson1-1/+4
1999-08-08comment additionsIan Lance Taylor1-0/+2
1999-07-30Jakub Jelinek <jj@ultra.linux.cz>Richard Henderson1-0/+139
* config/tc-sparc.c (md_longopts): Add --no-undeclared-regs option. (sparc_ip): Warn if %g2 or %g3 register is used and not covered by .register pseudo-op if -64 and --no-undeclared-regs. (s_register, sparc_adjust_symtab): New functions. * config/tc-sparc.h (tc_adjust_symtab, sparc_adjust_symtab): Declare sparc_adjust_symtab as tc_adjust_symtab. * doc/c-sparc.texi: Add description of #ignore special literal for .register pseudo-op.
1999-07-16Jakub Jelinek <jj@ultra.linux.cz>Richard Henderson1-6/+35
* config/tc-sparc.c (sparc_ip): Allow OLO10 relocations on -64 and not pic. (output_insn): Put OLO10's secondary addend into tc_fix_data. (md_apply_fix3): Handle BFD_RELOC_SPARC_OLO10. (tc_gen_reloc): Return two relocs for OLO10, LO10 and SPARC13. * config/tc-sparc.h (RELOC_EXPANSION_POSSIBLE, MAX_RELOC_EXPANSION): Define. (TC_FIX_TYPE, TC_INIT_FIX_DATA, TC_FIX_DATA_PRINT): Likewise.
1999-06-22 * config/tc-alpha.c: More use of symbol accessor functions.Ian Lance Taylor1-1/+1
* config/tc-arc.c: Likewise. * config/tc-d30v.c: Likewise. * config/tc-fr30.c: Likewise. * config/tc-i860.c: Likewise. * config/tc-m88k.c: Likewise. * config/tc-mcore.c: Likewise. * config/tc-ns32k.c: Likewise. * config/tc-sparc.c: Likewise. * config/tc-v850.c: Likewise.
1999-06-10 * config/tc-sparc.c (md_pseudo_table): Remove pushsection andIan Lance Taylor1-2/+0
popsection.
1999-06-10 * config/tc-sparc.c (sparc_ip): Add default case to reloc switch.Ian Lance Taylor1-0/+3
1999-06-10Jakub Jelinek <jj@ultra.linux.cz>Richard Henderson1-304/+334
* config/tc-sparc.c (sparc_ip): Don't use side-effect expression with isoctal. * config/tc-sparc.c (synthetize_setuw, synthetize_setsw, synthetize_setx): New functions. (md_assemble): Broken the special cases into the above functions. Make compiler happy if sizeof(bfd_vma)==4. Fix sethi generated from set/setuw. If instructions have a relloc, always clear the fields to be relocated in the opcode. (sparc_ip): Remove special_case global variable.
1999-06-07Jakub Jelinek <jj@ultra.linux.cz>Richard Henderson1-204/+276
* config/tc-sparc.c (md_assemble): Fix up setx, support setsw. Optimize set if sizeof(bfd_vma) == 64. (sparc_ip): Fix sethi - without %hi() it should generate R_SPARC_32 reloc, not R_SPARC_HI22. (tc_gen_reloc): Handle BFD_RELOC_SPARC22.
1999-06-07Jakub Jelinek <jj@ultra.linux.cz>Richard Henderson1-75/+255
* config/tc-sparc.c (md_begin): Handle native wordsize aliases. (s_ncons): New function. (native_op_table): New table. (sparc_ip): Be more strict on %hi() etc.; prepare assembler for R_SPARC_OLO10 handling.
1999-06-03 Add support for storing local symbols in a small structure to saveIan Lance Taylor1-13/+14
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/+3551