Commit Graph

1108 Commits

Author SHA1 Message Date
Alan Modra 3dcfe21d78 * config/tc-hppa.c (hppa_fix_adjustable): Don't adjust final types
that implicitly use LR and RR selectors.
2002-02-12 11:08:54 +00:00
Alexandre Oliva 913572ec08 * config/tc-mn10300.c (other_registers): Added `epsw'. Mark `pc'
and `epsw' as available on AM33 and above only.
(other_register_name): Add logic to handle machine type encoded in
reg_number.
2002-02-12 07:41:35 +00:00
Tom Rix 9b90b531ee Fix minimal-toc with -maix64 2002-02-12 03:59:33 +00:00
Alexandre Oliva 6c1b24e42f * config/tc-sparc.c (U0x80000000, U0xffffffff): New constants.
Use all over.
2002-02-11 13:24:06 +00:00
Jan Hubicka 7ecd2f8b9d * i386.c (md_assemble): Support 32bit address prefix.
(i386_displacement): Likewise.
	(i386_index_check): Accept 32bit addressing in 64bit mode.
2002-02-11 12:00:54 +00:00
Alexandre Oliva 7eb27ef29f * config/tc-sh.c (dot): Removed unused function. 2002-02-11 06:14:41 +00:00
Richard Henderson 543833df4f * config/tc-alpha.c (O_samegp): New.
(USER_RELOC_P): Include it.
        (alpha_reloc_op_tag, debug_exp, find_macro_match): Add it.
        (md_apply_fix3): Handle BFD_RELOC_ALPHA_BRSGP.
        (alpha_force_relocation, alpha_fix_adjustable): Likewise.
        (alpha_validate_fix): New.
        * config/tc-alpha.h (TC_VALIDATE_FIX): New.

        * gas/alpha/elf-reloc-5.s, gas/alpha/elf-reloc-5.d: New.
        * gas/alpha/elf-reloc-6.s, gas/alpha/elf-reloc-6.l: New.
        * gas/alpha/alpha.exp: Run them.
2002-02-09 22:55:06 +00:00
Chris Demetriou 6373ee5479 2002-02-08 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (IS_SEXT_32BIT_NUM): New macro to
        determine if a number is a sign-extended 32-bit number.
        (load_register): Use IS_SEXT_32BIT_NUM.
        (macro): Check if load/store macro handling is using a
        constant 32-bit address on 64-bit address systems, and if
        so optimize the generation of that address.
2002-02-08 22:25:36 +00:00
Richard Henderson 50a4c61130 * config/tc-alpha.c (alpha_force_relocation): Don't assert that
we've eliminated all foreign relocation types yet.
        (alpha_fix_adjustable): Likewise.
2002-02-08 10:03:01 +00:00
Alexandre Oliva 324bfcf3bb Contribute sh64-elf.
2002-02-08  Alexandre Oliva  <aoliva@redhat.com>
	    Stephen Clarke <Stephen.Clarke@st.com>
* doc/c-sh64.texi: Fix citation of SH64 architecture manual.
2002-01-31  Alexandre Oliva  <aoliva@redhat.com>
* config/tc-sh.c (md_relax_table): Added default sizes for
non-PC-relative UNDEF_MOVI, and relaxation sequences for
MOVI_16, MOVI_32 and MOVI_48.
* config/tc-sh64.c (shmedia_md_apply_fix3): Fix warning.
(shmedia_md_convert_frag): Handle non-PC-relative UNDEF_MOVI
and MOVI_16.
(shmedia_md_estimate_size_before_relax): Remove redundant
blocks.	 Set fragP->fr_var even if relaxation type unchanged.
Retain UNDEF_MOVI until expression decays to number.
2002-01-24  Alexandre Oliva  <aoliva@redhat.com>
* config/tc-sh64.c (shmedia_init_reloc): Handle new SHmedia PIC
relocation types.  Take fixP->fx_addnumber into account too.
(shmedia_md_apply_fix): Likewise.
(shmedia_md_convert_frag): Likewise.
(shmedia_build_Mytes): Likewise.
(sh64_consume_datalabel): Complain about nested datalabel.
Support PIC relocs.  Call sh_parse_name.
* config/tc-sh64.h (TC_RELOC_RTSYM_LOC_FIXUP): Extend definition
in tc-sh.h to SHmedia reloc types.
* config/tc-sh.c (SH64PCRELPLT, MOVI_PLT, MOVI_GOTOFF,
MOVI_GOTPC): New relaxation constants.
(md_relax_table): Introduce relaxation directives for PIC-related
constants.
(sh_PIC_related_p): Handle datalabel.
(sh_check_fixup): Choose SH5 PIC relocations.
(sh_cons_fix_new): Added BDF_RELOC_64.
(md_apply_fix3, sh_parse_name): Handle GOTPLT.
2002-01-18  Alexandre Oliva  <aoliva@redhat.com>
* config/tc-sh64.c (sh64_max_mem_for_rs_align_code): If the
current ISA is SHmedia, get 7 bytes.
2001-11-28  Nick Clifton  <nickc@cambridge.redhat.com>
* config/tc-sh.c (md_apply_fix3): Treat shmedia_md_apply_fix3 as a
void function.
* config/tc-sh64.c (shmedia_apply_fix): Rename to
shmedia_apply_fix3 and make void.
2001-05-17  Alexandre Oliva  <aoliva@redhat.com>
* config/tc-sh64.c (s_sh64_abi): Remove unused arguments passed to
as_bad.
2001-04-12  Alexandre Oliva  <aoliva@redhat.com>
* config/tc-sh64.h (md_parse_name): Take &c as argument.
2001-03-14  DJ Delorie	<dj@redhat.com>
* doc/Makefile.am (CPU_DOCS): Added c-sh64.texi
* doc/Makefile.in(CPU_DOCS): Ditto.
* doc/c-sh64.texi: New file.
* doc/as.texinfo: Add SH64 support.
2001-03-13  DJ Delorie	<dj@redhat.com>
* config/tc-sh64.c (shmedia_get_operands): Rename A_RESV_Fx to
A_REUSE_PREV so that its purpose is more obvious.
(shmedia_build_Mytes): Ditto.
2001-03-07  DJ Delorie	<dj@redhat.com>
* config/tc-sh64.c (sh64_vtable_entry): New, strip datalabels
before processing.
(sh64_vtable_inherit): Ditto.
(strip_datalabels): New, strip "datalabel" from given line.
* config/tc-sh.c (md_pseudo_table): Add sh64-specific vtable
pseudos.
2001-03-06  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_assemble): Move dwarf2_emit_insn
call ...
(shmedia_build_Mytes): ... to here.
2001-03-06  DJ Delorie	<dj@redhat.com>
* config/tc-sh.c: Remove sh64-specific uaquad now that there
is a generic one.
2001-01-21  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.h (DWARF2_LINE_MIN_INSN_LENGTH): Override.
* config/tc-sh64.c (shmedia_md_assemble): Offset recorded insn
address by one in call to dwarf2_emit_insn.
2001-01-13  Hans-Peter Nilsson	<hpn@cygnus.com>
Implement ".abi" pseudo and correct .cranges descriptors.  Correct
alignment handling broken by imported changes.
* config/tc-sh64.h (HANDLE_ALIGN): Override definition in tc-sh.h.
(sh64_handle_align): Declare.
(MAX_MEM_FOR_RS_ALIGN_CODE): Override definition in tc-sh.h.
(sh64_max_mem_for_rs_align_code): Declare.
(enum sh64_isa_values): Moved here from tc-sh64.c.
(md_do_align): Define.
(sh64_do_align): Declare.
(struct sh64_tc_frag_data): New.
(TC_FRAG_TYPE): Change to struct sh64_tc_frag_data.  Users
changed.
(TC_FRAG_INIT): Change to set new datatype.
(struct sh64_segment_info_type): Rename member
last_flushed_location to last_contents_mark.  All users changed.
(md_elf_section_change_hook, TC_CONS_FIX_NEW): Do not define.
(shmedia_elf_new_section, sh64_tc_cons_fix_new): Do not prototype.
* config/tc-sh.c (md_pseudo_table): Add ".abi".
(sh_elf_cons) [HAVE_SH64]: Call sh64_update_contents_mark instead
of unsetting seen_insn.
(md_assemble) [HAVE_SH64] <before new SHcompact sequence>: Also
call sh64_update_contents_mark.
(sh_handle_align): Remove HAVE_SH64-conditioned code.
* config/tc-sh64.c (sh64_isa_mode): Correct type from boolean to
enum sh64_isa_values.
(sh64_set_contents_type): Drop segT parameter.	All callers changed.
(emitting_crange): Boolean guard moved to file scope from function
scope in sh64_set_contents_type.
(s_sh64_abi): New.
(sh64_update_contents_mark): New; most split out from
sh64_flush_pending_output.
(shmedia_md_end): Call sh64_update_contents_mark.  Set
sh64_isa_mode to sh64_isa_sh5_guard unless sh64_isa_unspecified.
(sh64_do_align): New function.
(sh64_max_mem_for_rs_align_code): New function.
(sh64_handle_align): Rename from shmedia_do_align.  Make
non-static.  Add head comment.	Emit zero bytes for n bytes modulo
four.  Change return-type to void.
(shmedia_elf_new_section): Remove.
(shmedia_md_assemble): Call sh64_update_contents_mark.
(s_sh64_mode): Ditto.  Do not call md_flush_pending_output.  Make
new frag.  Call sh64_update_contents_mark after making the new
frag.
(sh64_flush_pending_output): Just call sh64_update_contents_mark
and sh_flush_pending_output.
(sh64_flag_output): Also call md_flush_pending_output, but add
condition on not emitting_crange.
(sh64_tc_cons_fix_new): Remove.
2001-01-12  Nick Clifton  <nickc@redhat.com>
* config/tc-sh64.c (shmedia_do_align): Fix to work with new
alignment handling scheme imported from sourceware.
2001-01-12  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.h (TARGET_FORMAT): Define.
(sh64_target_format): Prototype.
* config/tc-sh64.c (sh64_target_mach): New function.
2001-01-07  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_end): When equating a symbol, use
zero_address_frag instead of copying the frag of the symbol.
(shmedia_frob_file_before_adjust): Ditto.
(shmedia_md_apply_fix) <case BFD_RELOC_SH_IMM_MEDLOW16>: Cast mask
to valueT to remove signedness.
(shmedia_md_convert_frag): Add parameter final.	 Rename parameter
headers to output_bfd.	Do not evaluate symbols if final is false;
do emit fixups.
(shmedia_md_estimate_size_before_relax) <case C (MOVI_IMM_32,
UNDEF_MOVI) et al>: If symbol cannot be modified to be PC-relative
to the current frag, call shmedia_md_convert_frag to emit fixups
and make frag_wane neutralize the frag.	 Update comments.
* config/tc-sh.c (md_convert_frag): Change caller of
shmedia_md_convert_frag.
2001-01-06  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.h: Tweak comments and correct formatting.
* config/tc-sh64.c: Ditto.
(shmedia_md_convert_frag) <PT/PTA/PTB 32, 48 and 64 bit
expansion, MOVI pcrel expansion>: Fix thinko calculating offset
for the no-relocation case.
(shmedia_check_limits): Fix range check being off-by-one for PTA.
* config/tc-sh.c: Ditto.  Add proper comments to #ifdef/#ifndef
wrappers.
(SH64PCREL16_F): Increment for proper max-PTA handling.	 Update
comment.
(SH64PCREL16_M, MOVI_16_M): Correct range thinko.
(SH64PCREL48_M, MOVI_48_M): Similar; don't count in length of
expansion.
(SH64PCREL32_M, MOVI_32_M): Ditto; handle overflowing expression.
Correct comment.
2001-01-05  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_apply_fix) <second switch, case
BFD_RELOC_SH_PT_16>: Set lowest bit in field to be relocated to 1.
(shmedia_md_convert_frag) <case C (SH64PCREL16_32, SH64PCREL16) et
al>: Set lowest bit of field to relocate to 1 and rest to empty,
if reloc is emitted.
2000-12-31  Hans-Peter Nilsson	<hpn@cygnus.com>
New options plus bugfixes.
* config/tc-sh.c (md_longopts): New options "-no-expand" and
"-expand-pt32".
(md_parse_option): Handle new options.
(md_show_usage): Add blurb for new options.
* config/tc-sh64.c (SHMEDIA_BFD_RELOC_PT): New macro.
(sh64_expand, sh64_pt32): New variables.
(shmedia_init_reloc): Handle BFD_RELOC_SH_PT_16.
(shmedia_md_apply_fix): Hold original fixP->fx_r_type in
orig_fx_r_type.	 Change SHMEDIA_BFD_RELOC_PT into
BFD_RELOC_SH_PT_16.  Handle BFD_RELOC_SH_PT_16 as pc-relative.
<resolved previously-pc-relative relocs>: Handle
SHMEDIA_BFD_RELOC_PT and BFD_RELOC_SH_PT_16.
(shmedia_md_convert_frag) <case C (SH64PCREL16PT_64, SH64PCREL16),
case C (SH64PCREL16PT_32, SH64PCREL16)>: Modify to PTB if operand
points to SHcompact code.
<case C (SH64PCREL16_32, SH64PCREL16), case C (SH64PCREL16_64,
SH64PCREL16)>: Check that ISA of what operand points at and
PTA/PTB matches, or emit error.
(shmedia_check_limits): Handle BFD_RELOC_SH_PT_16 and
SHMEDIA_BFD_RELOC_PT.
(shmedia_immediate_op): If pcrel, emit fixup also for constant
operand.
(shmedia_build_Mytes) <case A_IMMS16>: Also check sh64_expand in
condition for MOVI expansion.
<case A_PCIMMS16BY4>: Handle expansion to 32 bits only, if
sh64_pt32.  Emit only a BFD_RELOC_SH_PT_16 fixup if not
sh64_expand.
<case A_PCIMMS16BY4_PT>: Likewise, but emit a SHMEDIA_BFD_RELOC_PT
fixup.
(sh64_target_format): Error-check setting of sh64_pt32 and
sh64_expand.  Fix typo in check for sh64_shcompact_const_crange.
(shmedia_md_pcrel_from_section): Handle BFD_RELOC_SH_PT_16 and
SHMEDIA_BFD_RELOC_PT as coming from SHmedia code.
2000-12-31  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c: Improve comments.
(shmedia_md_convert_frag): Remove inactive is_pt_variant code.	Do
not say the linker will check correctness of PTA/PTB expansion.
(shmedia_md_end): Make non-static.
* config/tc-sh64.h (md_end): Define to shmedia_md_end.	Add
prototype.
* config/tc-sh.c (sh_finalize): Remove.
* config/tc-sh.h (md_end): Do not define.
Remove prototype for sh_finalize.
2000-12-30  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_frob_section_type): Use a struct
sh64_section_data container when storing section type in tdata
field in elf_section_data.
* config/tc-sh.c (sh_elf_final_processing): Change from EF_SH64 to
EF_SH5.
* Makefile.am: Update dependencies.
* Makefile.in: Regenerate.
2000-12-22  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_assemble): Don't protect
dwarf2_emit_insn call with test on debug_type.
2000-12-19  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (sh64_set_contents_type): Make contents-type
CRT_SH5_ISA32 sticky for 64-bit.
2000-12-18  Hans-Peter Nilsson	<hpn@cygnus.com>
Generate .crange sections when switching ISA mode or emitting
constants in same section as code.
* config/tc-sh64.c: Reformat structure definitions.
(sh64_end_of_assembly, sh64_mix, sh64_shcompact_const_crange): New
variables.
(sh64_set_contents_type): Rename from sh64_init_section.  Rewrite
to emit a .cranges descriptor when contents type changes.  Only
emit error if changing contents type and -no-mix is in effect.
(sh64_emit_crange, sh64_flush_last_crange, sh64_flag_output,
sh64_flush_pending_output, sh64_tc_cons_fix_new): New functions.
(shmedia_md_end): Set sh64_end_of_assembly.  Pass
sh64_flush_last_crange over sections.
When checking main symbol of datalabel symbol, check for
STO_SH5_ISA32, not ISA type of section in definition.
(shmedia_frob_file_before_adjust): Check main symbol for
STO_SH5_ISA32; don't check ISA type of section in definition.
(shmedia_frob_section_type): Adjust for .cranges; set section flag
to SHF_SH5_ISA32_MIXED or SHF_SH5_ISA32 according to whether
.cranges entries have been output.
(shmedia_elf_new_section): Just call md_flush_pending_output.
(shmedia_md_assemble): Do not emit a BFD_RELOC_SH_SHMEDIA_CODE
fix.  Do not set tc_segment_info_data.in_code for section.  Call
sh64_set_contents_type for SHmedia code.
(s_sh64_mode): Do not call sh64_init_section or set seen_insn to
false.	Call md_flush_pending_output.
(sh64_target_format): Check that -no-mix and
-shcompact-const-crange are used in sane combination with other
options.
(shmedia_md_pcrel_from_section): Check type of fix for how to
adjust pc-relative.
(sh64_consume_datalabel): Check symbol for having STO_SH5_ISA32,
not ISA type of section in definition.
* config/tc-sh64.h (struct sh64_segment_info_type): Rewrite to
hold contents-type state.
(md_flush_pending_output): Redefine to sh64_flush_pending_output.
(sh64_flush_pending_output): Declare.
(TC_CONS_FIX_NEW): Define to sh64_tc_cons_fix_new.
(sh64_tc_cons_fix_new): Declare.
* config/tc-sh.c (sh_elf_cons) [HAVE_SH64]: Unset seen_insn and
call sh64_flag_output.
(md_assemble) [HAVE_SH64]: Do not emit BFD_RELOC_SH_CODE.  Just
call sh64_set_contents_type to mark SHcompact code and set
seen_insn.
(md_longopts): New options "-no-mix" and
"-shcompact-const-crange".
(md_parse_option): Handle new options.
(md_show_usage): Add blurb for new options.
(md_number_to_chars) [HAVE_SH64]: Call sh64_flag_output.
2000-12-15  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c: Delete investigated and obsolete fixme:s.
(sh64_last_insn_frag): New.
(shmedia_md_convert_frag): Use tc_frag_data field of incoming frag
to get frag for insn opcode for generating fixups; do not assume it
is the same frag.
(shmedia_build_Mytes): Set sh64_last_insn_frag after growing frag
for new insn.
* config/tc-sh64.h (ELF_TC_SPECIAL_SECTIONS): Define for .cranges
section.
(TC_FRAG_TYPE): Define as fragS *.
(TC_FRAG_INIT): Define to set tc_frag_data to sh64_last_insn_frag.
(sh64_last_insn_frag): Declare.
(sh64_consume_datalabel): Fix typo; check for seginfo != NULL,
not == NULL before dereferencing.
2000-12-12  Hans-Peter Nilsson	<hpn@cygnus.com>
Get rid of BFD section flag and EF_SH64_ABI64.
* config/tc-sh64.c (shmedia_frob_section_type): Use
elf_section_data (sec)->tdata, not a specific BFD section flag, to
communicate the section as containing SHmedia code.  Describe why.
* config/tc-sh.c (sh_elf_final_processing): Tweak comment.  Set
EF_SH64 regardless of ABI.
* config/tc-sh64.c (shmedia_md_apply_fix): Decapitalize "invalid"
in error message.  Handle resolved expressions for
BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
BFD_RELOC_SH_IMMS10BY4 and BFD_RELOC_64.
(shmedia_check_limits): Handle BFD_RELOC_64.
(sh64_adjust_symtab): Do not decrement the GAS symbol value for
a STO_SH5_ISA32 symbol, only the BFD value.
2000-12-11  Ben Elliston  <bje@redhat.com>
* config/tc-sh64.c: Call dwarf2_emit_insn, not the defunct
dwarf2_generate_asm_lineno.
2000-12-11  Hans-Peter Nilsson	<hpn@cygnus.com>
Handle PC-relative MOVI expansions with assembler relaxation.
Generate PC-relative relocs from 16-bit PC-relative expressions.
* config/tc-sh64.c (SHMEDIA_MD_PCREL_FROM_FIX): Break out from...
(shmedia_md_pcrel_from_section): ...here.
(shmedia_md_apply_fix): Handle fixups for 16-bit operands that has
turned completely resolved.  Adjust relocation type for 16-bit
immediate operands that has turned PC-relative.	 Adjust back for
MD_PCREL_FROM_SECTION being applied twice.
(shmedia_md_convert_frag): Always emit reloc for expression with
global or weak symbol.	Handle relaxation result for PC-relative
expressions.
(shmedia_md_estimate_size_before_relax): An expression with a weak
or global symbol can not be relaxed.  Break out tests for
relaxable symbol into variable sym_relaxable.
<cases C (MOVI_IMM_64, UNDEF_MOVI) and C (MOVI_IMM_32,
UNDEF_MOVI)>: Break out any PC-relative expression and change
relaxation type.
(shmedia_build_Mytes): CSE &operands->operands[j] into variable
opjp.
<case A_IMMS16>: Fix typo for initial minor relaxation type of
MOVI expansion.	 If X_op_symbol of the immediate expression is
set, make an expression symbol for the argument to frag_var.
* config/tc-sh.c (MOVI_IMM_32_PCREL, MOVI_IMM_64_PCREL): New
relaxations.
(END): Adjust for new relaxations.
(md_relax_table): Add entries for new relaxations.
2000-12-07  Ben Elliston  <bje@redhat.com>
* config/tc-sh64.c (shmedia_parse_reg): Initialize variable len.
2000-12-07  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_convert_frag): Correct all MOVI and
SHORI operand offsets in PT/PTA/PTB expansions.
2000-12-05  Hans-Peter Nilsson	<hpn@cygnus.com>
Implement DataLabel semantics.
* config/tc-sh.c (sh_frob_file) [HAVE_SH64]: Call
shmedia_frob_file_before_adjust.
* config/tc-sh64.c [! OBJ_ELF]: Emit #error.
(DATALABEL_SUFFIX): Define.
(shmedia_md_end) <before adjusting STO_SH5_ISA32 symbols>: Walk
symbol list to update "datalabel" symbols to their main symbol
counterparts.
(shmedia_frob_file_before_adjust): New.
(sh64_adjust_symtab): For remaining datalabel symbols, set to
undefined and set STT_DATALABEL.
(sh64_frob_label): Initialize TC symbol field.
(sh64_consume_datalabel): Actually implement semantics.	 New
parameter operandf, call it instead of expression.
(sh64_exclude_symbol): New.
* config/tc-sh64.h (md_parse_name): Pass on the function operand
to sh64_consume_datalabel.
(tc_symbol_new_hook): Define to tc_frob_symbol.
(TC_SYMFIELD_TYPE): Define to symbolS *.
(tc_frob_symbol): Define to call sh64_exclude_symbol.
2000-12-01  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_init_reloc): Tweak comment for default
case.
(shmedia_md_assemble): Call dwarf2_generate_asm_lineno if
generating dwarf2 debug information.
2000-11-30  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (sh64_target_format): Use elf64-sh64l and
elf64-sh64 for the 64-bit ABI.
* config/tc-sh.c (md_show_usage): Tweak usage output for -abi=*
option.
2000-11-29  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh.c: Remove conditionalizing on HAVE_SH64 for
case-insensitivity.
2000-11-27  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c: Tweak comments, formatting and error messages.
(enum sh64_abi_values): New type.
(enum sh64_isa_values): New type.
(sh64_isa_mode): Replace shmedia_mode.	All referers changed.
(seen_shcompact_mode, seen_shmedia_mode): Delete.
(sh64_abi): Replace shmedia_64.
(shmedia_md_convert_frag) <C (MOVI_IMM_64, MOVI_64),
C (MOVI_IMM_32, MOVI_32)>: Correct register number handling.
(s_sh64_mode): Check validity for this target.
(sh64_target_format): Initialize defaults for ISA and ABI.
Fallback to old object format if no SH64 ISA or ABI has been
specified.
* config/tc-sh.c (md_parse_option): Check combinations for errors.
(sh_elf_final_processing): Change to have EF_SH64_ABI64 for 64-bit
ABI and EF_SH64 for 32-bit ABI, if SH64 options are specified.
* config/tc-sh64.h: Fix typo in comment.
2000-11-25  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_estimate_size_before_relax)
<PT fixups for absolute values>: Size will be longest, not
shortest.
(shmedia_md_convert_frag): Disable PTB-warning machinery.  Correct
all MOVI and SHORI operand offsets in PT/PTA/PTB expansions.
* config/tc-sh.c (parse_reg) [HAVE_SH64]: Add local variables l0
and l1 to hold lowercase of two first characters.  Change all
remaining TO_LOWER to tolower.
* config/tc-sh64.c (TO_LOWER): Delete.
(shmedia_find_cooked_opcode): Use tolower, not TO_LOWER.
(md_parse_name): Define.
(sh64_consume_datalabel): Declare.
(DOLLAR_DOT): Define.
* config/tc-sh64.c (shmedia_parse_exp): New.
(sh64_consume_datalabel): New; just ignoring datalabel semantics.
(shmedia_parse_reg): Remove const from src
parameter.
(shmedia_get_operands): Ditto for args parameter and ptr variable.
(shmedia_md_assemble): Ditto for op_end variable.
(shmedia_get_operand): Ditto for ptr parameter and src variable.
Use shmedia_parse_exp, not parse_exp.
* config/tc-sh64.c (shmedia_parse_reg): Add shmedia_arg_type
parameter.  All callers changed.
(shmedia_get_operand): Add shmedia_arg_type parameter.	All
callers changed.
(shmedia_parse_reg): Put first two character in local variables.
Use tolower, not TO_LOWER.  If no register is found and argtype
indicates a control register, scan shmedia_creg_table
case-insensitive.
2000-11-24  Hans-Peter Nilsson	<hpn@cygnus.com>
* Makefile.am (CPU_TYPES): Add sh64.
(TARGET_CPU_CFILES): Add config/tc-sh64.c.
(TARGET_CPU_HFILES): Add config/tc-sh64.h.
Regenerate dependencies.
* Makefile.in: Regenerate.
* configure.in: Add support for sh64-*-elf*.
* configure: Regenerate.
* config/tc-sh64.h: New.
* config/tc-sh64.c: New.
* config/tc-sh.c (md_pseudo_table) [HAVE_SH64]: New pseudos
.mode, .isa and .uaquad.
[HAVE_SH64] (SH64PCREL16_32, SH64PCREL16_64, SH64PCREL16PT_32,
SH64PCREL16PT_64, MOVI_IMM_32, MOVI_IMM_64): Define.
[HAVE_SH64] (END): Define as 10.
[HAVE_SH64] (UNDEF_SH64PCREL, SH64PCREL16, SH64PCREL32,
SH64PCREL48, SH64PCREL64, UNDEF_MOVI, MOVI_16, MOVI_32, MOVI_48,
MOVI_64): Define.
[HAVE_SH64] (SH64PCREL16_F, SH64PCREL16_M, SH64PCREL16_LENGTH,
SH64PCREL32_F, SH64PCREL32_M, SH64PCREL32_LENGTH, SH64PCREL48_F,
SH64PCREL48_M, SH64PCREL48_LENGTH, SH64PCREL64_LENGTH,
MOVI_16_LENGTH, MOVI_32_LENGTH, MOVI_48_LENGTH, MOVI_64_LENGTH):
Define.
(md_relax_table) [HAVE_SH64]: Provide relaxations for SHmedia.
(md_begin) [HAVE_SH64]: Call shmedia_md_begin.
(parse_reg) [HAVE_SH64]: Parse register names case-insensitive.
(md_assemble) [HAVE_SH64]: Call shmedia_md_assemble if assembling
SHmedia instructions.  Handle state-change after switching to
SHcompact.
(md_longopts) [HAVE_SH64]: New options --isa=* and --abi=*.
(md_parse_option) [HAVE_SH64]: Parse new options.
(md_show_usage) [HAVE_SH64]: Show usage of new options.
(md_convert_frag) [HAVE_SH64] <default>: Call
shmedia_md_convert_frag instead of abort.
(sh_force_relocation) [HAVE_SH64]: Also force relocation for
BFD_RELOC_SH_SHMEDIA_CODE.
(sh_elf_final_processing) [HAVE_SH64]: Set flags identifying
SHcompact or SHmedia code.
(md_apply_fix) [HAVE_SH64] <default>: Return result from calling
shmedia_md_apply_fix instead of abort.
(md_estimate_size_before_relax) [HAVE_SH64] <default>: Return
result from calling shmedia_md_estimate_size_before_relax instead
of calling abort.
(sh_do_align) [HAVE_SH64]: If shmedia_mode, let shmedia_do_align
do the work.
(tc_gen_reloc) [HAVE_SH64]: For unrecognized relocs, call
shmedia_init_reloc and do nothing more if it returns non-zero.
(sh_finalize) [HAVE_SH64]: Call shmedia_md_end.
* po/POTFILES.in: Regenerate.
* po/gas.pot: Regenerate.
2002-02-08 06:32:23 +00:00
Alexandre Oliva 6b32719e57 * config/tc-sh.c (parse_at): Install the correct version of
2002-02-04's patch.
2002-02-06 06:26:14 +00:00
Alexandre Oliva ac3f04d7f1 * config/tc-sh.c (md_apply_fix3) <BFD_RELOC_32_PLT_PCREL>: Don't
assume fixP->fx_subsy is non-NULL.
2002-02-06 05:34:34 +00:00
Alexandre Oliva 7679ead9b5 * config/tc-sh.c (parse_at): Set arg type of @(expr,pc) to
A_DISP_PC only if it's an integral constant, and to
A_DISP_PC_ABS otherwise.
(get_specific): Accept A_DISP_PC_ABS where A_DISP_PC is
expected.
(build_Mytes): Mark PCRELIMM fix-ups as pc-relative only if
the operand type is not A_DISP_PC_ABS.
2002-02-04 12:29:15 +00:00
Hans-Peter Nilsson 5459d7a081 * config/tc-mmix.c (tc_gen_reloc): Don't try and take the value of
common and weak symbols.  Handle common and weak symbols as
	undefined symbols with regards to GREG handling and merging.
	(mmix_frob_file): Ditto.
2002-02-04 04:03:15 +00:00
Jason Thorpe 006336b8fe bfd:
* config.bfd (hppa*-*-netbsd*): New target.

gas:
* configure.in (hppa-*-netbsd*): New target.
* configure: Regenerate.
* config/tc-hppa.h: Also define WARN_COMMENTS if TE_NetBSD.

ld:
* Makefile.am (ALL_EMULATIONS): Add ehppanbsd.o.
(ehppanbsd.c): New rule.
* Makefile.in: Regenerate.
* configure.tgt (hppa*-*-netbsd*): New target.
* emulparams/hppalinux.sh: Add comment to check other files
that source this file it is modified, and list which
files that do.
* emulparams/hppanbsd.sh: New file.
2002-02-02 18:36:04 +00:00
Alan Modra 9e0665bc9a * config/tc-v850.c: Add missing prototypes amd use old-style
function definitions.
	(AREA_ZDA, AREA_SDA, AREA_TDA): Delete.
	(sdata_section tdata_section, zdata_section, sbss_section,
	tbss_section, zbss_section, rosdata_section, rozdata_section,
	scommon_section, tcommon_section, zcommon_section,
	call_table_data_section, call_table_text_section): Delete.
	(v850_sdata, v850_tdata, v850_zdata, v850_sbss, v850_tbss,
	v850_zbss, v850_bss, v850_rosdata, v850_rozdata,
	v850_call_table_data, v850_call_table_text): Delete.
	(struct v850_seg_entry): New.
	(v850_seg_table): New.
	(SDATA_SECTION TDATA_SECTION, ZDATA_SECTION, SBSS_SECTION,
	TBSS_SECTION, ZBSS_SECTION, BSS_SECTION, ROSDATA_SECTION,
	ROZDATA_SECTION, SCOMMON_SECTION, TCOMMON_SECTION, ZCOMMON_SECTION,
	CALL_TABLE_DATA_SECTION, CALL_TABLE_TEXT_SECTION): Define.
	(do_v850_seg): New.
	(v850_seg): New.
	(v850_comm): Use do_v850_seg and v850_seg_table.  Simplify
	recording of alignment.
	(md_pseudo_table): Use v850_seg.
	(md_begin): Don't init .call_table_data and .call_table_text here.
	Set v850_seg_table bss entry.
	* config/tc-v850.h (v850_pcrel_from_section): Prototype.

	* gas/elf/elf.exp: Don't special case v850.
2002-02-01 16:29:21 +00:00
Hans-Peter Nilsson 973eb3402f Support on-demand global register allocation by passing on
base-plus-offset relocs to the linker.
	* config/tc-mmix.c: Tweak and fix typos in comments.
 	(allocate_undefined_gregs_in_linker): New variable.
	(OPTION_LINKER_ALLOCATED_GREGS): New option macro.
	(md_longopts): Add --linker-allocated-gregs.
	(md_parse_option) <case 'x'>: Imply --linker-allocated-gregs.
	<case OPTION_LINKER_ALLOCATED_GREGS>: New.
	(md_show_usage): Update text for -x.  Add text for
	--linker-allocated-gregs.
	(tc_gen_reloc): Derive default value for addend from val and
	baddsy.  Use addsec and bfd_is_abs_section in more places.  Don't
	emit error for BFD_RELOC_MMIX_BASE_PLUS_OFFSET without suitable
	GREG if allocate_undefined_gregs_in_linker.
	* doc/as.texinfo (Overview) <Target MMIX options>: Add
	--linker-allocated-gregs.
	* doc/c-mmix.texi (MMIX-Opts): Add blurb about
	--linker-allocated-gregs.  Mention that it's implied by -x.
	(MMIX-Pseudos) <GREG>: Mention when and how a GREG can be omitted.
	(MMIX-mmixal): Clarify dated comparison and location of MMIXware.

	* config/tc-mmix.h (md_parse_name): Use ISUPPER, not isupper.
2002-02-01 08:09:47 +00:00
Nick Clifton 3b16e843f2 Add support for OpenRISC 32-bit embedded processor 2002-01-31 17:33:08 +00:00
Richard Sandiford 912a07db52 * config/tc-sh.c (parse_reg): Fix end-of-word check for is, ix, iy
and mod.
2002-01-30 18:25:30 +00:00
Chris Demetriou 4514d474ed 2002-01-29 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (tc_gen_reloc): Arrange for
        BFD_RELOC_PCREL_HI16_S relocations to be output relative to
        their LO16 parts, even for ELF.
2002-01-30 02:14:19 +00:00
Daniel Jacobowitz 246fcdee13 2002-01-29 Daniel Jacobowitz <drow@mvista.com>
* config/tc-i386.c: Protect definitions of true and false
        from redefinition.
2002-01-29 17:07:57 +00:00
Jakub Jelinek 00e6e13d12 * config/obj-elf.c (elf_frob_file_before_adjust): Remove symbols
made because of .weak, if they are neither defined nor used in any
	way.
2002-01-28 13:34:39 +00:00
Kazu Hirata 166e23f998 * config/tc-h8300.c (check_operand): Don't print a warning
when a valid 24-bit address is given to a 16-bit address
	operand.
2002-01-24 18:22:06 +00:00
Alexandre Oliva aae6ddf936 copyright years 2002-01-24 02:59:16 +00:00
Alexandre Oliva 538cd60fbb * config/tc-sh.c (sh_elf_suffix): Removed.
(sh_PIC_related_p, sh_check_fixup, sh_cons_fix_new,
sh_end_of_match, sh_parse_name): New functions.
(sh_elf_cons): Simplify.
(parse_exp): Reject misplaced PIC operands.
(md_undefined_symbol): Simplify.
(sh_fix_adjustable): Let @GOTOFF be adjusted.
(md_apply_fix3): Write @PLT and @GOTOFF addends in place.
(tc_gen_reloc): Move fixp subsy absolute value into addnumber.
Complain if subsy remains at the end.
* config/tc-sh.h (sh_parse_name, sh_cons_fix_new): Declare.
(md_parse_name, TC_CONS_FIX_NEW, O_PIC_reloc): Define.
2002-01-24 02:54:47 +00:00
Alexandre Oliva b386f24b4a * config/tc-mn10300.c (xr_registers): Move `pc'...
(other_registers): ... here.
2002-01-23 01:52:18 +00:00
DJ Delorie 23deb9235a * config/obj-coff.c (obj_coff_init_stab_section): Make the
stabstr_name allocation permanent, as it will be referenced from
the section hash.
2002-01-22 01:09:49 +00:00
Richard Earnshaw 63e63b07a2 * tc-arm.c (do_xsc_mia, do_xsc_mar, do_xsc_mra): Renamed from
do_mia, do_mar and do_mra respectively.
(do_mav_*): Renamed from do_c_*.
(mav_reg_required_here, mav_parse_offset): Renamed from
cirrus_reg_required_here and cirrus_parse_offset respectively.
(MAV_MODE?): Renamed from CIRRUS_MODE?.
2002-01-19 14:52:01 +00:00
Richard Earnshaw ea6ef066f8 2002-01-18 Richard Earnshaw <rearnsha@arm.com>
Keith Walker  <keith.walker@arm.com>
* tc-arm.c (ARM_EXT_V5J, ARM_ARCH_V5TEJ): Define.
(insns): Add pattern for bxj instruction.
(do_bxj): New function.
(arm_cpus): Add arm926ej.
(arm_archs): Add armv5tej.

Testsuite:
2002-01-18  Richard Earnshaw  <rearnsha@arm.com>
	    Keith Walker  <keith.walker@arm.com>
* gas/arm/arch5tej.s gas/arm/arch5tej.d: New files.
* gas/arm/arm.exp (arch5tej): New dump test.
2002-01-19 14:25:48 +00:00
Richard Earnshaw d193a22afe 2002-01-19 Keith Walker <keith.walker@arm.com>
* tc-arm.c (arm_fpus): Add fpe2 and fpe3.
2002-01-19 12:44:34 +00:00
Richard Earnshaw 03b1477f5d * NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE.  All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types.  Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.

Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-18 17:01:55 +00:00
Timothy Wall b1ffc25745 Add a more instructive error message on bad syntax 2002-01-17 17:41:24 +00:00
Thiemo Seufer 394f9b3adb * config/tc-mips.c (percent_op): Ensure longer percent_op's are
matched before the shorter ones.
	(my_getSmallParser): Fix handling of nested parentheses in
	percent_op's. Code cleanup.
	(my_getPercentOp): New function, code from my_getSmallParser.
	(my_getSmallExpression): Fix handling of closing parentheses.
	Code cleanup. Better comments.
2002-01-16 21:30:47 +00:00
Richard Earnshaw bfae80f222 Support for VFP instructions
* tc-arm.c (CP_WB_OK, CP_NO_WB): New defines.
(cp_address_required_here): New argument wb_ok.  When false, do not
accept write-back forms of addressing.  Change all callers.
(FPU_VFP_EXT_NONE, FPU_VFP_EXT_V1xD, FPU_VFP_VFP_V1)
(FPU_VFP_EXT_V2): Define.
(FPU_ARCH_VFP, FPU_ARCH_VFP_V1xD, FPU_ARCH_VFP_V1, FPU_ARCH_VFP_V2):
Define in terms of above.
(vfp_dp_reg_pos, vfp_sp_reg_pos, vfp_ldstm_type): New enums.
(vfp_reg): New struct.
(vfp_regs): New array of registers.
(insns): Add VFP instructions.
(sn_table): New array of VFP single-precision register names.
(dn_table): New array of VFP double-precision register names.
(all_reg_maps): Add the new register tables.
(arm_reg_type): Add new values for above.  Increase RET_TYPE_MAX.
(vfp_sp_reg_required_here, vfp_dp_reg_required_here, do_vfp_sp_monadic)
(do_vfp_dp_monadic, do_vfp_sp_dyadic, do_vfp_dp_dyadic)
(do_vfp_reg_from_sp, do_vfp_sp_reg2, do_vfp_sp_from_reg)
(do_vfp_reg_from_dp, do_vfp_reg2_from_dp, do_vfp_dp_from_reg)
(do_vfp_dp_from_reg2, vfp_psr_parse, vfp_psr_required_here)
(do_vfp_reg_from_ctrl, do_vfp_ctrl_from_reg, do_vfp_sp_ldst)
(do_vfp_dp_ldst, vfp_sp_reg_list, vfp_dp_reg_list, vfp_sp_ldstm)
(vfp_dp_ldstm, do_vfp_sp_ldstmia, do_vfp_sp_ldstmdb, do_vfp_ldstmia)
(do_vfp_dp_ldstmdb, do_vfp_xp_ldstmia, do_vfp_xp_ldstmdb)
(do_vfp_sp_compare_z, do_vfp_dp_compare_z, do_vfp_dp_sp_cvt)
(do_vfp_sp_dp_cvt): New functions.
(md_begin): Set soft-float flag for appropriate VFP work.
(md_atof): Handle VFP-format doubles.
(md_parse_option): Handle VFP command-line options.
(md_show_usage): Display VFP command-line options.

* testsuite/gas/arm/vfp1.s gas/arm/vf1.d: New files.
* testsuite/gas/arm/vfp1xD.s gas/arm/vf1xD.d: New files.
* testsuite/gas/arm/vfp-bad.s gas/arm/vfp-bad.l: New files.
* testsuite/gas/arm/arm.exp: Run new VFP tests.
2002-01-15 16:05:34 +00:00
Richard Earnshaw fcd6d8d6b7 * tc-arm.c (md_parse_option): Tidy up setting of cpu_variant for
various command line options.
2002-01-15 14:43:09 +00:00
Nick Clifton 1f7fd47891 Fix up generation of VTINHERIT relocs 2002-01-15 11:58:45 +00:00
Richard Earnshaw 21f0f23a55 * tc-arm.c (md_longopts): On targets that aren't bi-endian, support
the -EL/-EB option that matches the target's endianness.
(md_parse_option): Likewise.
2002-01-14 17:37:23 +00:00
Richard Earnshaw ce058b6cfb * tc-arm.c (md_longopts): Fix misplaced #endif -- the -oabi option
is not dependent on ARM_BI_ENDIAN.
2002-01-14 15:36:30 +00:00
Richard Earnshaw f03698e661 * tc-arm.c (all error messages): Normalize capitalization of messages.
* tc-arm.h (md_operand): Delete define.
* tc-arm.c (in_my_get_expression): New static variable.
(my_get_expression): Set and clear it.
(md_operand): New function.  If called from my_get_expression
put the error in inst.error.
(output_inst): Now takes argument of instruction being assembled.
Print it out with any error message.
(do_ldst, do_ldstv4, thumb_load_store): Fault attempt to use a store
with '=' syntax.
(end_of_line): Don't update inst.error if it is already set.
2002-01-14 15:01:04 +00:00
Richard Earnshaw e28cd48c21 * tc-arm.c ((do_ldst): Fix handling an immediate expression pseudo
op that can be translated into a mvn instruction.

* gas/arm/ldconst.s gas/arm/ldconst.d: New files.  Test ldr with
immediate pseudo-operations.
* gas/arm/arm.exp: Run it.
2002-01-11 18:00:17 +00:00
Nick Clifton 1cd8ff3882 Add support for ia64-hpux target. 2002-01-11 09:27:39 +00:00
Richard Earnshaw 6c43fab6fb * tc-arm.c (struct reg_entry): Move before prototypes.
(int_register, cp_register, fp_register): Delete.
(reg_table): Delete.  Replaced with ...
(rn_table, cp_table, cn_table, fn_table, mav_mvf_table)
(mav_mvd_table, mav_mvfx_table, mav_mvdx_table, mav_mvax_table)
(mav_dspsc_table): ... one table per register set.
(arm_reg_hsh): Delete.
(struct reg_map): New structure.
(all_reg_maps): New array.
(enum arm_reg_type): New enums.
(build_reg_hsh): New function.
(insert_reg_alias): Use hash table passed by caller.  Adjust all
callers.
(create_register_alias): New function, split out from ...
(md_assemble): ... here.
(md_begin): Build new register hash tables.
(arm_reg_parse): New argument for the hash table to search.  Adjust all
callers.
(arm_reg_parse_any): New function.
(co_proc_number): Look up the processor number in the processor hash
table.
(cirrus_regtype): Delete.
(cirrus_register, cirrus_mvf_register, cirrus_mvd_register)
(cirrus_mvfx_register, cirrus_mvdx_register, cirrus_mvax_register)
(ARM_EXT_MAVERICKsc_register): Delete.
(do_c_binops_1, do_c_binops_2, do_c_binops_3): Delete.
(do_c_binops_1[a-o], do_c_binops_2[a-c], do_c_binops_3[a-d]): New
functions.
(do_c_triple_4, do_c_triple_5): Delete.
(do_c_triple_4[ab], do_c_triple_5[a-h]): New functions.
(do_c_quad_6): Delete.
(do_c_quad_6[ab]): New functions.
(do_c_binops, do_c_triple, do_c_quad, do_c_shift, do_c_ldst): Rework
arguments to use new register parsing methods.
(cirrus_reg_required_here): Likewise.
(insns): Reclassify cirrus maverick worker functions.
(cirrus_valid_reg): Delete.
2002-01-10 11:47:35 +00:00
Jason Thorpe 8d05742ff6 bfd:
* Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
(BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
(elf32-sh-nbsd.lo): New rule.
* Makefile.in: Regenerate.
* config.bfd (sh*le-*-netbsdelf*): New target.
(sh*-*-netbsdelf*): New target.
* configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
(bfd_elf32_shnbsd_vec): New vector.
(bfd_elf32_shlnbsd_vec): New vector.
* configure: Regenerate.
* elf32-sh-nbsd.c: New file.
* targets.c: Update copyright years.
(_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
bfd_elf32_shnbsd_vec.

gas:
* configure.in (sh*le): Set cpu_type=sh and endian=little.
(sh*-*-netbsdelf*): New target.
* configure: Regenerate.
* tc-sh.h: Update copyright years.
(TARGET_FORMAT): Add version for TE_NetBSD.

ld:
* Makefile.am (ALL_EMULATIONS): Add eshelf_nbsd.o and eshlelf_nbsd.o.
(eshelf_nbsd.c): New rule.
(eshlelf_nbsd.c): New rule.
* Makefile.in: Regenerate.
* configure.tgt (sh*le-*-netbsdelf*): New target.
(sh*-*-netbsdelf*): New target.
* emulparams/shelf.sh: Document that shelf_nbsd.sh sources this file.
* ld/emulparams/shelf_nbsd.sh: New emulation.
* ld/emulparams/shlelf_nbsd.sh: New emulation.
2002-01-08 04:23:02 +00:00
Alan Modra d7861ad2a5 * config/tc-m68k.h (md_prepare_relax_scan): Rewrite.
* config/tc-m68k.c (md_relax_table): Add md_prepare_relax_scan comment.
2002-01-06 12:15:45 +00:00
Daniel Jacobowitz 7a62114442 2002-01-05 Daniel Jacobowitz <drow@mvista.com>
* tc-mips.c (mips_cprestore_valid): New flag.
        (mips_frame_reg_valid): New flag.
        (macro) [M_JAL_2]: Check both flags.
        [M_JAL_A]: Likewise.
        (s_cprestore): Set mips_cprestore_valid.
        (tc_get_register): If setting mips_frame_reg, set
        mips_frame_reg_valid and clear mips_cprestore_valid.
        (s_mips_ent): Clear both flags.
        (s_mips_end): Clear both flags.

2002-01-05  Daniel Jacobowitz  <drow@mvista.com>

        * gas/mips/jal-svr4pic.s: Add .ent and .frame directives.
        * gas/mips/mips-abi32-pic.s: Add .frame directive.
        * gas/mips/mips-gp32-fp32-pic.s: Likewise.
        * gas/mips/mips-gp32-fp64-pic.s: Likewise.
        * gas/mips/mips-gp64-fp32-pic.s: Likewise.
        * gas/mips/mips-gp64-fp64-pic.s: Likewise.
2002-01-05 19:06:52 +00:00
Alan Modra 7c6beb6988 * write.c (write_object_file): Make use of bfd_section_list_remove.
* config/obj-ecoff.c (ecoff_frob_file): Likewise.
	* config/tc-mmix.c (mmix_frob_file): Likewise.
2002-01-05 13:13:18 +00:00
Matthew Green a09cf9bd77 [gas/ChangeLog]
* config/tc-ppc.c (md_parse_option): BookE is not Motorola specific.

[include/opcode/ChangeLog]
* ppc.h (PPC_OPCODE_BOOKE): BookE is not Motorola specific.
(PPC_OPCODE_BOOKE64): Likewise.
2002-01-03 02:07:19 +00:00
Nick Clifton 23b7f870fb Test for a NULL frag link. 2002-01-02 17:19:07 +00:00
Richard Henderson cb5301b617 * config/tc-ia64.c (has_suffix_p): New.
(note_register_values): Use it instead of strstr.
2002-01-01 01:18:17 +00:00
Richard Henderson 86cf98f345 * config/tc-ia64.c (errata_nop_necessary_p): Prototype.
(make_unw_section_name): Constify local variables.
2002-01-01 01:16:44 +00:00
Jeff Law 1d358ee0cc * config/tc-hppa.c (pa_ip): Handle new 'c' mode completers,
'X', 'M', and 'A'.
2001-12-31 23:47:02 +00:00
Jakub Jelinek bd5e6e7e3a * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix dst_mask for
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-12-21 22:35:24 +00:00
Daniel Jacobowitz a8e8e86325 2001-12-20 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
Daniel Jacobowitz <drow@mvista.com>

        * config/tc-mips.c (file_mips_gp32): Initialize to invalid value.
        (file_mips_fp32): Likewise.
        (md_begin): Compatibility handling for -mipsN option.
2001-12-20 21:11:26 +00:00
Alexandre Oliva 8d4d84c202 * config/tc-sh.c (parse_at): Reject @(r0) and @(r0,). 2001-12-20 17:28:13 +00:00
Matthew Green 8a5886591d * config/tc-ppc.c (md_parse_option): Make -maltivec default
to generating PowerPC instructions.
2001-12-20 07:34:44 +00:00
Nick Clifton 2d9069a43f Remove redundant definition. 2001-12-18 14:35:34 +00:00
Richard Henderson 84b229ef24 * config/tc-alpha.c (alpha_handle_align): Encode unop with RB as $sp. 2001-12-18 00:24:47 +00:00
Alan Modra f91fafbd30 * config/obj-elf.c (obj_elf_init_stab_section): References are
kept to section name strings.  Don't alloca them!
2001-12-14 15:53:11 +00:00
Alexandre Oliva 8c0392a98a * config/tc-d10v.c (get_operands): Mark OPERAND_PLUS after
OPERAND_ATSIGN as O_absent.
2001-12-12 07:32:47 +00:00
Geoffrey Keating 93fbbb04b8 Index: bfd/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>
	    Corinna Vinschen  <vinschen@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* archures.c: Add support for xstormy16.
	* config.bfd: Add support for xstormy16.
	* configure.in: Add support for xstormy16.
	* reloc.c: Add support for xstormy16.
	* targets.c: Add support for xstormy16.
	* cpu-xstormy16.c: New file.
	* elf32-xstormy16.c: New file.
	* Makefile.in: Regenerated.
	* bfd-in2.h: Regenerated.
	* configure: Regenerated.
	* libbfd.h: Regenerated.

Index: binutils/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>

	* readelf.c (guess_is_rela): Add support for stormy16.
	(dump_relocations): Likewise.
	(get_machine_name): Likewise.

Index: gas/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* configure.in: Add support for xstormy16.
	* configure: Regenerated.
	* Makefile.am: Add support for xstormy16.
	* Makefile.in: Regenerated.
	* config/tc-xstormy16.c: New file.
	* config/tc-xstormy16.h: New file.

Index: gas/testsuite/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    matthew green  <mrg@redhat.com>

	* gas/xstormy16/allinsn.d: New file.
	* gas/xstormy16/allinsn.exp: New file.
	* gas/xstormy16/allinsn.s: New file.
	* gas/xstormy16/allinsn.sh: New file.
	* gas/xstormy16/gcc.d: New file.
	* gas/xstormy16/gcc.s: New file.
	* gas/xstormy16/gcc.sh: New file.
	* gas/xstormy16/reloc-1.d: New file.
	* gas/xstormy16/reloc-1.s: New file.
	* gas/xstormy16/reloc-2.d: New file.
	* gas/xstormy16/reloc-2.s: New file.

Index: ld/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* configure.tgt: Add support for xstormy16.
	* Makefile.in: Regenerate.
	* emulparams/elf32xstormy16.sh: New file.
	* scripttempl/xstormy16.sc: New file.

Index: opcodes/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* Makefile.in: Regenerate.
	* configure.in: Add support for xstormy16.
	* configure: Regenerate.
	* disassemble.c: Add support for xstormy16.
	* xstormy16-asm.c: New generated file.
	* xstormy16-desc.c: New generated file.
	* xstormy16-desc.h: New generated file.
	* xstormy16-dis.c: New generated file.
	* xstormy16-ibld.c: New generated file.
	* xstormy16-opc.c: New generated file.
	* xstormy16-opc.h: New generated file.

Index: include/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>

	* dis-asm.h (print_insn_xstormy16): Declare.

Index: include/elf/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* common.h (EM_XSTORMY16): Define.
	* xstormy16.h: New file.
2001-12-08 03:46:03 +00:00
Richard Earnshaw f2b7cb0a5f * tc-arm.c (do_arit, do_cmp, do_mov, do_ldst, do_ldstt, do_ldmstm)
(do_branch, do_swi, do_adr, do_adrl, do_empty, do_mul, do_mla)
(do_swap, do_msr, do_mrs, do_mull, do_ldstv4, do_bx, do_blx)
(do_bkpt, do_clz, do_lstc2, do_cdp2, do_co_reg2, do_smla, do_smlal)
(do_smul, do_qadd, do_pld, do_ldrd, do_co_reg2c, do_cdp, do_lstc)
(do_co_reg, do_fpa_ctrl, do_fpa_ldst, do_fpa_ldmstm, do_fpa_monadic)
(do_fpa_dyadic, do_fpa_cmp, do_fpa_from_reg, do_fpa_to_reg, do_mia)
(do_mar, do_mra, do_c_binops, do_c_binops_1, do_c_binops_2)
(do_c_binops_3, do_c_triple, do_c_triple_4, do_c_triple_5, do_c_quad)
(do_c_quad_6, do_c_dspsc, do_c_dspsc_1, do_c_dspsc_2, do_c_shift)
(do_c_shift_1, do_c_shift_2, do_c_ldst, do_c_ldst_1, do_c_ldst_2)
(do_c_ldst_3, do_c_ldst_4, do_branch25): Delete redundant argument,
FLAGS.
(struct asm_opcode): Adjust parms field accordingly.
(md_assemble): Don't pass dummy second argument when calling worker
functions.
(build_arm_ops_hsh): Add prototype
(BAD_FLAGS): Delete.
2001-12-06 10:23:20 +00:00
Richard Earnshaw 90e4755aee * tc-arm.c (struct asm_opcode): Delete comp_suffix and flags. Add
cond_offset.  Rename variants->variant.
(insns): Adjust for new format.  Explicitly code each variant that
takes flags.  Remove temporary instructions.
(struct arm_it): Remove redundant field suffix.
(s_flag, ldr_flags, str_flags, byte_flag, cmp_flags, ldm_flags)
(stm_flags, lfm_flags, sfm_flags, round_flags, fix_flags, except_flag)
(long_flag): Delete.
(struct asm_flg): Delete.
(LONGEST_INST): Delete.
(V4_STR_BIT): Define.
(struct thumb_opcode): Rename variants->variant.
(do_empty): Renamed from do_nop.
(ldst_extend): Delete argument hwse.  Split code for half-word and
signed byte instructions to ...
(ldst_extend_v4): ... here.
(ld_mode_required_here): Use ldst_extend_v4.
(do_ldrd): Simplify now that this is only called for ldrd.  No
need to test for XScale, which was wrong anyway.  Don't reject r12
as a target register.  Add test that ldrd doesn't update an index
register.
(do_pld): Don't allow post-indexed or write-back addressing modes.
Adjust call to ldst_extend.
(do_adr): Split code for adrl to ...
(do_adrl): ... here.
(do_cmp): No need to fold in COND_BIT.
(do_ldst): Simplify.  Split code for ldrt/strt into do_ldstt.  Split
code to handle half-word and signed byte instructions to ...
(do_ldstv4): ... here.
(do_ldstt): New function.  Handle load/store with translate.
(do_ldmstm): Write feature modification bits directly into
inst.instruction.
(do_fpa_ldst): Remove suffix handling code.
(do_fpa_dyadic, do_fpa_monadic, do_fpa_from_reg): Likewise.
(do_fpa_ldmstm): Type of access is now held in inst.instruction.
(build_arm_ops_hsh): New function.
(md_begin): Call it.  Don't build the ARM opcode directly.
(md_assemble): Simplify ARM instruction handling.
2001-12-05 11:59:26 +00:00
Nick Clifton 006299d307 Corrected incorrect op->type selection due to missing 'else'. 2001-12-05 09:52:32 +00:00
Alexandre Oliva c2c607a488 * config/tc-d10v.c (write_2_short): Don't skip dummy fixups, so
that we can tell which operand refers to the insn put in the L
container and mark it as such, so that the relocation type can be
adjusted.
2001-12-04 17:30:43 +00:00
Thiemo Seufer 956cd1d64d * config.bfd: Remove trailing blanks.
* elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
	* strings.c (get_char): Initialize value.
	* config/tc-mips.c (mips_cpreturn_offset): Better comment.
	(load_register): Better error message. Cast away signedness
	mismatches. Add casts needed for varargs.
	(load_address): Replace checks of HAVE_64BIT_ADDRESS with dbl.
	Remove superfluous casts.
	(macro): Cast away signedness mismatches. Remove superfluous casts.
	(s_cpload): Fix wrong comment.
	(s_mips_weakext): Standardize output message.
	(get_number): Likewise.
2001-12-04 14:38:48 +00:00
Thiemo Seufer 7496292d88 * config/tc-mips.c (append_insn): Add jump address range overflow
check.
2001-12-04 14:05:54 +00:00
Thiemo Seufer 34ba82a8bb * config/tc-mips.c (md_parse_option): Fix comment. Allow -mabi option
for ELF only.
	(show): Document -mabi option.
2001-12-04 13:27:56 +00:00
Nick Clifton 8350bcd967 Only clear cpu part when specifying 'xscale' cpu (don't change the fpu part) 2001-12-04 11:28:29 +00:00
Alexandre Oliva 461448d855 * config/tc-d10v.c (find_opcode): Reject SP operand if
OPERAND_NOSP flag is present.
2001-12-04 10:07:03 +00:00
Eric Christopher d11008e15f 2001-12-03 Eric Christopher <echristo@redhat.com>
* config/tc-mips.c (tc_gen_reloc): One missed BFD_RELOC_MIPS_GPREL.
2001-12-04 00:51:33 +00:00
Thiemo Seufer cdf6fd85e6 * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
	* pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
	* elf32-mips.c (mips_reloc_map): Likewise. Replace
	BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
	* elf64-mips.c (mips_reloc_map): Likewise.
	* reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
	(BFD_RELOC_MIPS_GPREL32): Remove.
	* config/tc-mips.c (macro_build): Replace BFD_RELOC_MIPS_GPREL
	by BFD_RELOC_GPREL16.
	(load_address): Likewise.
	(macro): Likewise.
	(md_apply_fix): Likewise. Replace BFD_RELOC_MIPS_GPREL32 by
	BFD_RELOC_GPREL32.
	(s_gpword): Replace BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
	(tc_gen_reloc): Replace BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
	*config/tc-mips.h: Replace BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
2001-12-02 13:14:48 +00:00
Alexandre Oliva 3543a2f195 * config/tc-d10v.c (get_operands): Emit OPERAND_PLUS for
prefix `+'.
2001-11-29 18:23:11 +00:00
Alexandre Oliva 55aa1bc40b * config/tc-d10v.c (find_opcode): Reject non-SP operand if
flags requires SP.
2001-11-29 18:04:12 +00:00
Nick Clifton 1000a02a29 Remove case sensitivity in register names. 2001-11-29 09:41:34 +00:00
Jakub Jelinek f7460f5f76 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
(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-28 19:15:14 +00:00
Andreas Schwab acebd4ce9d * as.c (parse_args): Call md_after_parse_args if defined.
* config/tc-ia64.h (md_after_parse_args): Define.
	* config/tc-ia64.c (ia64_after_parse_args): Reject --gstabs.
	* doc/internals.texi (CPU backend): Document md_after_parse_args.
2001-11-28 17:00:46 +00:00
Jakub Jelinek f8df10f4f5 * elf.c (_bfd_elf_rela_local_sym): New.
* elflink.h (elf_link_input_bfd): Don't consider empty
	merged sections as removed in relocation tests.
	* elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
	* elf32-i386.c (elf_i386_relocate_section): Handle relocs
	against STT_SECTION symbol of SHF_MERGE section.
	* elf32-arm.h (elf32_arm_relocate_section): Likewise.
	* elf32-avr.c (elf32_avr_relocate_section): Call
	_bfd_elf_rela_local_sym.
	* elf32-cris.c (cris_elf_relocate_section): Likewise.
	* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
	* elf32-fr30.c (fr30_final_link_relocate): Likewise.
	* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
	* elf32-i370.c (i370_elf_relocate_section): Likewise.
	* elf32-i860.c (elf32_i860_relocate_section): Likewise.
	* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
	* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-s390.c (elf_s390_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
	* elf32-v850.c (v850_elf_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	* elf-hppa.h (elf_hppa_relocate_section): Likewise.
	* elf-m10200.c (mn10200_elf_relocate_section): Likewise.
	* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
	* elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
	* elf32-sh.c (sh_elf_relocate_section): Likewise for
	!partial_inplace relocs. Handle relocs against STT_SECTION
	symbol of SHF_MERGE for partial_inplace relocs.

	* config/tc-alpha.c (tc_gen_reloc): Remove SEC_MERGE test.
	* write.c (adjust_reloc_syms): Don't handle relocs against
	SEC_MERGE section symbols specially.
	(fixup_segment): Likewise.
2001-11-23 12:17:21 +00:00
Richard Sandiford add55e1f31 * config/tc-mips.c (mips_need_elf_addend_fixup): New, extracted from...
(md_apply_fix3): ...here.  Don't prevent the symbol value being
	subtracted twice from GPREL addends.
	(tc_gen_reloc): Add the symbol value to a GPREL addend if it was
	subtracted by the previous function.
2001-11-21 11:24:13 +00:00
Nick Clifton a6567fe028 Fix md_apply_fix3 typo. 2001-11-20 09:33:49 +00:00
Ben Elliston f021c2a7b7 2001-11-20 Ben Elliston <bje@redhat.com>
* config/tc-m88k.c (md_apply_fix3): Match local variable `val' to
	 usage after md_apply_fix3 cleanups.
2001-11-20 03:33:30 +00:00
Hans-Peter Nilsson 920e417765 Fix typo in comment in last commit 2001-11-17 18:51:15 +00:00
Hans-Peter Nilsson 451a1fc524 * config/tc-cris.c (md_apply_fix3): Cast value, not pointer, in
val assignment.
2001-11-17 18:39:03 +00:00
Alan Modra bbe8ef22ff * config/tc-m68k.c (md_apply_fix3): Change val back to a signed type. 2001-11-16 09:34:28 +00:00
H.J. Lu e0ac8af02a 2001-11-15 H.J. Lu <hjl@gnu.org>
* config/tc-hppa.c (md_apply_fix3): Fix a typo.
2001-11-16 07:27:59 +00:00
H.J. Lu 5ce56ab925 2001-11-15 H.J. Lu <hjl@gnu.org>
* config/tc-alpha.c (md_apply_fix3): Fix a typo.
2001-11-16 07:17:12 +00:00
Nick Clifton 94f592af1b Update all uses of md_apply_fix to use md_apply_fix3. Make it a void function. 2001-11-15 21:29:00 +00:00
Alan Modra a847613f74 * config/tc-i386.h (md_end): Define.
(i386_elf_emit_arch_note): Declare.
	(CpuUnknown): Delete.
	* config/tc-i386.c (default_arch): Constify.
	(smallest_imm_type): Remove CpuUnknown test.
	(md_assemble): Don't bother checking cpu_arch_flags non-zero.
	(i386_elf_emit_arch_note): New function.
2001-11-15 13:19:46 +00:00
Thiemo Seufer 645dc66c72 * config/tc-mips.c (mips_ip): Re-allow %hi() op for non-ELF assembler. 2001-11-15 09:50:00 +00:00
Alan Modra 802a735ed9 binutils/ChangeLog
* doc/binutils.texi (objdump): Document ppc -M options.
gas/ChangeLog
	* config/tc-ppc.c (ppc_insert_operand): Pass (ppc_cpu | ppc_size)
	to operand->insert.
	(md_assemble): Likewise.
gas/testsuite/ChangeLog
	* gas/ppc/booke.d: Modify reloc and target matches for powerpc64.
include/opcode/ChangeLog
	* ppc.h (struct powerpc_operand <insert, extract>): Add dialect param.
opcodes/ChangeLog
	* ppc-opc.c (PPC64): Revert 2001-10-12. Do include PPC_OPCODE_PPC.
	(insert_bat, extract_bat, insert_bba, extract_bba,
	insert_bd, extract_bd, insert_bdm, extract_bdm,
	insert_bdp, extract_bdp, valid_bo,
	insert_bo, extract_bo, insert_boe, extract_boe,
	insert_ds, extract_ds, insert_de, extract_de,
	insert_des, extract_des, insert_li, extract_li,
	insert_mbe, extract_mbe, insert_mb6, extract_mb6,
	insert_nb, extract_nb, insert_nsi, extract_nsi,
	insert_ral, insert_ram, insert_ras,
	insert_rbs, extract_rbs, insert_sh6, extract_sh6,
	insert_spr, extract_spr, insert_tbr, extract_tbr): Add dialect param.
	(extract_bd, extract_bdm, extract_bdp,
	extract_ds, extract_des,
	extract_li, extract_nsi): Implement sign extension without conditional.
	(insert_bdm, extract_bdm,
	insert_bdp, extract_bdp, valid_bo): Handle 64 bit branch hints.
	(extract_bdm, extract_bdp): Correct 32 bit validation.
	(AT1_MASK, AT2_MASK): Define.
	(BBOAT_MASK): Define.
	(BBOATCB_MASK, BBOAT2CB_MASK, BBOATBI_MASK): Define.
	(BOFM64, BOFP64, BOTM64, BOTP64): Define.
	(BODNZM64, BODNZP64, BODZM64, BODZP64): Define.
	(PPCCOM32, PPCCOM64): Define.
	(powerpc_opcodes): Modify existing 32 bit insns with branch hints
	and add new patterns to implement 64 bit branches with hints.  Move
	booke instructions so they match before ppc64.
	* ppc-dis.c (powerpc_dialect): Set PPC_OPCODE_64 in dialect for
	64 bit default targets, and parse "32" and "64" in options.
	Formatting fixes.
	(print_insn_powerpc): Pass dialect to operand->extract.
2001-11-15 01:08:53 +00:00
Nick Clifton 42ebd756d5 Do not remove the symbol's value from the addend for fixups against local
symbols in SEC_MERGE sections - it was not added in, in the first place.
2001-11-14 14:07:26 +00:00
Timothy Wall 6e91790347 Fix tic54x testsuite failures and Lmem disassembly bugs. 2001-11-13 14:22:53 +00:00
Alan Modra e4afe74295 * config/obj-elf.c (obj_elf_version): Ensure terminating NUL is
put in note section.  Use sizeof instead of hard-coded constants.
2001-11-13 03:24:25 +00:00
Thiemo Seufer ae948b86fe * config/tc-mips.c (support_64bit_objects): Define for OBJ_ELF only.
(md_longopts): Allow OPTION_MABI for ELF compilation only. RE-allow
	OPTION_GP32, OPTION_GP64, OPTION_FP32 for non-ELF compilation.
	Sort options a bit more logical.
	(md_parse_option): Allow OPTION_32, OPTION_N32, OPTION_N64,
	OPTION_MABI only for elf targets.
	* gas/mips/mips.exp: Change naming of some conditionals to reflect
	the object format they actually mean. Don't try mips-abi32 and
	mips-abi32-pic tests for ecoff.
2001-11-12 22:22:20 +00:00
Thiemo Seufer 2396cfb964 * config/tc-mips.c (set_at): Add cast needed for varargs.
(load_register): Likewise.
	(macro): Likewise. Some code reformatting.
	(macro2): Add cast needed for varargs.
	(mips16_macro): Likewise.
2001-11-12 22:20:44 +00:00
Thiemo Seufer c4e7957cc8 * config/tc-mips.c (md_assemble): Remove superflous casts.
(append_insn): Likewise.
	(mips16_macro_build): Likewise.
	(macro): Likewise.
	(mips16_ip): Likewise.
	(s_cpload): Likewise.
	(mips_relax_frag): Likewise.
2001-11-12 22:19:30 +00:00
Thiemo Seufer a325df1d97 * config/tc-mips.c (mips_abi_level): Move in front of
mips_set_options.
	(mips_set_options): Add members gp32, fp32, abi.
	(file_mips_gp32): New flag.
	(file_mips_fp32): New flag.
	(mips_opts): Initialize the new members.
	(mips_gp32): Remove.
	(mips_fp32): Remove.
	(HAVE_32BIT_GPRS): Use the new values from mips_opts.
	(HAVE_32BIT_FPRS): Likewise.
	(HAVE_NEWABI): Likewise.
	(HAVE_64BIT_OBJECTS): Likewise.
	(md_begin): Likewise. Save default (file) values.
	(md_parse_option): Use the new values from mips_opts.
	(s_mipsset): Likewise. Fix logic to keep the ABI selection if
	possible. Let .set mipsN work together with .set push/pop.
	Enhance error messages.
	(mips_elf_final_processing): Use file_mips_* for header processing.
2001-11-12 16:54:54 +00:00
Denis Chertykov 1f8ae5e6f2 * config/tc-avr.c (mcu_types): Update for new devices. 2001-11-10 09:35:53 +00:00
Thiemo Seufer d993a84ec2 * config/tc-mips.c (mips_force_relocation): Remove duplicate code. 2001-11-08 19:32:24 +00:00
Eric Christopher 76b3015fc1 2001-11-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* config/tc-mips.c (my_getSmallParser): Fix small parser bug.
2001-11-06 21:39:09 +00:00
Martin Schwidefsky b8edc45c30 Force got and plt relocations. 2001-11-05 08:47:46 +00:00
Richard Earnshaw c9b604bd23 * tc-arm.c: Re-arrange prototypes by architecture.
(insns): Re-arrange instructions by archtitecture.  Pld instruction
is part of ARMv5E.
(tinsns): blx and bkpt are part of ARMv5T.
(do_fp_{ctrl,ldst,ldstm,dyadic,monadic,cmp,from_reg,to_reg}): Rename
to do_fpa_*.  All callers changed.

* tc-arm.c (insns): Add two temporary instructions to handle
ldrd/strd.
2001-11-02 17:25:11 +00:00
Stephane Carrez 4fe7ef9639 * config/tc-m68hc11.c (build_jump_insn): Allocate worst case storage
for bra/bsr and use frag_variant(), this ensure that the possible
	16-bit BFD_RELOC_16 will be in the same frag.
2001-11-01 09:56:17 +00:00
Chris Demetriou afdbd6d03b [ bfd/ChangeLog ]
2001-10-31  Chris Demetriou  <cgd@demetriou.com>

	* elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
	relocations properly.

[ gas/ChangeLog ]
2001-10-31  Chris Demetriou  <cgd@broadcom.com>

	* config/tc-mips.c (HAVE_32BIT_ADDRESSES): If compiling embedded
	PIC code, assume pointers the same size as GPRs.
	(macro): In M_LA_AB handling for embedded PIC code, support
	"la $treg,foo-bar($breg)".  In load/store handling
	(label ld_st) support "<op> $treg,<sym>-<local_sym>($breg)"
	which is used by the compiler for switch statements.
	In load/store double multi-instruction macro handling
	(label ldd_std) add a comment that no special handling
	is currently done for embedded PIC.
	(mips_ip): In 'o' (16-bit offset) case, only accept 16
	bit offsets.

[ gas/testsuite/ChangeLog ]
2001-10-31  Chris Demetriou  <cgd@broadcom.com>

	* gas/mips/empic.s: Undo damage inflicted on 2000-12-02.
	* gas/mips/empic.d: Likewise.
	* gas/mips/elempic.d: Likewise (it was copied into other files).
	* gas/mips/telempic.d: Likewise.
	* gas/mips/tempic.d: Likewise.

	* gas/mips/empic2.s: New test to check new 'la' and 'lw' (and
	related ops) syntax, test loads with large offsets.
	* gas/mips/emcic2.d: Likewise.
	* gas/mips/mips.exp: Run the new test on ELF platforms.
2001-11-01 01:33:47 +00:00
Richard Earnshaw b89dddec96 General cleanup of feature definitions.
* tc-arm.c (ARM_EXT_LONGMUL, ARM_EXT_HALFWORD, ARM_EXT_THUMB): Delete.
(ARM_2UP, ARM_ALL, ARM_3UP, ARM_6UP): Delete.
(FPU_CORE, FPU_FPA10, FPA_FPA11, FPU_ALL, FPA_MEMMULTI): Delete.
(ARM_EXT_V{1,2,2S,3,3M,4,4T,5T,5ExP}): New defines.
(ARM_EXT_V{5,5E}): Synchronize with above.
(ARM_ARCH_V*): Define a complete set in terms of above features.
(ARM_{1,2,3,250,6,7,8,9,STRONG}): Define in terms of architecture.
(FPU_FPA_EXT_V[12]): Define.
(FPU_ARCH_FPE, FPU_ARCH_FPA): Define in terms of above.
(FPU_ANY): Define.
(FPU_DEFAULT): Default to FPA.
(CPU_DEFAULT): For XScale, this is now just ARM_ARCH_XSCALE; for
Thumb, this is now ARM_ARCH_V5T.
(insns): Rework for new feature defines.
(tinsns): Likewise.
(opcode_select, do_ldst, md_begin, md_parse_option): Likewise.
2001-10-31 14:48:23 +00:00
Nick Clifton 3c3bdf30e4 Add MMIX support 2001-10-30 15:20:14 +00:00
Chris Demetriou 0a758a1221 2001-10-24 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (hilo_interlocks, cop_interlocks): Make
        these evaluate to true if mips_arch indicates SB-1.
2001-10-24 21:08:34 +00:00
Chris Demetriou 2e4acd247e 2001-10-20 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (md_show_usage): Print "sb1" for Broadcom
        SB-1 CPU for consistency.
        (mips_cpu_info_table): Tweak comment about SB-1.
2001-10-21 05:58:55 +00:00
H.J. Lu 8420dfca80 2001-10-20 H.J. Lu <hjl@gnu.org>
* config/tc-arm.c (do_c_shift): Use ISDIGIT instead of isdigit.
	(cirrus_parse_offset): Likewise.
2001-10-20 22:41:09 +00:00
Nick Clifton da89cce1af Restore line_comment_chars after a SNAFU. 2001-10-19 10:53:19 +00:00
Nick Clifton f57c81f6dd Remove semicolon from ARM comment chars list 2001-10-18 21:06:03 +00:00
Matthew Green f5c120c5dc [gas/ChangeLog]
* config/tc-ppc.c (md_show_usage): Add missing -maltivec, -m7400,
	-m7410, -m7450 and -m7455 options.

[gas/testsuite/ChangeLog]
	* gas/ppc/altivec.s: New test for AltiVec.
	* gas/ppc/altivec.d: New file.
	* gas/ppc/ppc.exp: Test altivec.s

[include/opcode/ChangeLog]
	* ppc.h (PPC_OPCODE_BOOKE64): Fix typo.

[opcodes/ChangeLog]
	* ppc-opc.c (STRM): New AltiVec operand.
	(XDSS): New AltiVec instruction form.
	(mtvscr): Correct operand list.
	(dst, dstt, dstst, dststt, dss, dssall): AltiVec instructions.
2001-10-17 13:13:16 +00:00
Alan Modra 15c1449b25 * config/tc-ppc.c (PPC_HA, PPC_HIGHERA, PPC_HIGHESTA): Simplify.
(ppc_size): Select PPC_OPCODE_64 if 64 bit.
	(md_begin): Don't set ppc_size here.
	(ppc_target_format): Test ppc_size as well as BFD_DEFAULT_TARGET_SIZE.
	(md_shortopts): Constify.
	(md_longopts): Likewise.
	(md_longopts_size): Likewise.
	(ppc_elf_suffix): Only allow 64-bit relocs when ppc_size specifies
	64-bit opcodes.
	(ppc_machine): Explain why this function is a nop.
2001-10-17 06:03:41 +00:00
Alan Modra d3ecfc599f * bit_fix.h: Comment typo fix.
* config/tc-mips.c: Likewise.
	* config/tc-sh.c: Likewise.
	* config/tc-arc.c (arc_code_symbol): Remove unnecessary test.
2001-10-17 05:51:12 +00:00
Alan Modra 18566f5563 * config/tc-m68k.c (m68k_ip): Correct absolute jmp opcodes. 2001-10-16 14:27:03 +00:00
Hans-Peter Nilsson 05982cacb9 * config/tc-sh.c (shl): Remove.
(big): New function.
	(little): Remove shl handling.  Emit error for endian mismatch.
	(md_show_usage): Add description of -big.
	(md_parse_option): Handle OPTION_BIG.  Remove shl handling.
	(OPTION_BIG): Add.
	(md_pseudo_table): Add .big.
	(md_longopts): Add -big.
	(md_begin): Don't set target_big_endian here.
	* config/tc-sh.h (TARGET_BYTES_BIG_ENDIAN): Remove.
	(LISTING_HEADER, COFF_MAGIC, TARGET_FORMAT): Use target_big_endian.
	(shl): Remove.
	* configure.in (endian): Default is big.
	(sh-*-pe*): Little endian.
	(cpu_type): Set sh for target sh*.
	* configure: Regenerate.
2001-10-16 02:36:20 +00:00
Thiemo Seufer e369bcce27 * config/tc-mips.c (md_apply_fix): Preliminary handling of NewABI
relocations.
2001-10-15 19:48:04 +00:00
Nick Clifton 05d2d07e5f Replace CONST with const 2001-10-13 09:50:02 +00:00
Matthew Green 418c174284 [gas/ChangeLog]
* config/tc-ppc.c (md_parse_option): New -m7410, -m7450 and -m7455
	flags, equivalent to -m7400.  New -maltivec to enable AltiVec
	instructions.  New -mbook64 and -mbooke/-mbooke32 flags to enable
	64-bit and 32-bit BookE support, respectively.  Change -m403 and
	-m405 to set PPC403 option.
	(md_show_usage): Adjust for new options.
	* doc/all.texi: Set PPC.
	* doc/as.texinfo: Add PPC support and pull in c-ppc.texi.
	* doc/c-ppc.texi: New file.
	* doc/Makefile.am (CPU_DOCS): Add c-ppc.texi.
	* doc/Makefile.in: Regenerate.

[gas/testsuite/ChangeLog]
	* gas/ppc/booke.s: New test for Motorola BookE.
	* gas/ppc/booke.d: New file.
	* gas/ppc/ppc.exp: Test booke.s.

[include/opcode/ChangeLog]
	* ppc.h (PPC_OPCODE_BOOKE, PPC_OPCODE_403): New opcode flags for
	BookE and PowerPC403 instructions.

[opcodes/ChangeLog]
	* ppc-opc.c (insert_de, extract_de, insert_des, extract_des): New
	instruction field instruction/extraction functions for new BookE
	DE form instructions.
	(CT): New macro for CT field in an X form instruction.
	(DE, DES, DEO, DE_MASK): New macros for DE/DES fields in DE form
	instructions.
	(PPC64): Don't include PPC_OPCODE_PPC.
	(403): New opcode macro for PPC403 processors.
	(BOOKE): New opcode macro for BookE processors.
	(bce, bcel, bcea, bcela, bclre, bclrel: New BookE instructions.
	(bcctre, bcctrel, be, bel, bea, bela, icbt, icbte, lwzxe): Likewise.
	(dcbste, lwzuxe, luxe, dcbfe, lbzxe, lwarxe, lbzuxe): Likewise.
	(stwcxe, stwxe, stxe, stwuxe, stuxe, stbxe, dcbtste, stbuxe): Likewise.
	(mfapidi, dcbte, lhzxe, lhzuxe, lhaxe, lhauxe, subfe64): Likewise.
	(subfeo64, adde64, addeo64, sthxe, sthuxe, subfze64): Likewise.
	(subfzeo64, addze64, addzeo64, dcbie, subfme64, subfmeo64): Likewise.
	(addme64, addmeo64, stdcxe., mcrxr64, lwbrxe, lfsxe, lfsuxe): Likewise.
	(lfdxe, lfduxe, stwbrxe, stfsxe, stfsuxe, stfdxe, dcbae): Likewise.
	(stfduxe, tlbivax, tlbivaxe, lhbrxe, ldxe, lduxe, tlbsx): Likewise.
	(tlbsxe, sthbrxe, stdxe, stduxe, icbie, stfiwxe, dcbze, lbze): Likewise.
	(lbzue, ldue, lhze, lhzue, lhae, lhaue, lwze, lwzue): Likewise.
	(stbe, stbue, sthe, sthue, stwe, stwue, lfse, lfsue, lfde): Likewise.
	(lfdue, stde, stdue, stfse, stfsue, stfde, stfdue): Likewise.

	* ppc-dis.c (print_insn_big_powerpc, print_insn_little_powerpc): Look
	for a disassembler option of `booke', `booke32' or `booke64' to enable
	BookE support in the disassembler.
2001-10-13 01:59:09 +00:00
Kazu Hirata b6ff326eba * config/tc-alpha.c: Fix comment typos.
* config/tc-cris.c: Likewise.
	* config/tc-hppa.c: Likewise.
	* config/tc-i370.c: Likewise.
	* config/tc-mips.c: Likewise.
	* config/tc-mn10200.c: Likewise.
	* config/tc-mn10300.c: Likewise.
	* config/tc-sh.c: Likewise.
	* config/tc-tahoe.c: Likewise.
	* config/tc-v850.c: Likewise.
2001-10-11 23:56:33 +00:00
Thiemo Seufer 6478892d2e * config/tc-mips.c (mips_cpreturn_offset): New variable.
(mips_cpreturn_register): Likewise.
	(mips_gp_register): Likewise.
	(s_cpsetup): New function prototype.
	(s_cplocal): Likewise.
	(s_cpreturn): Likewise.
	(s_gpvalue): Likewise.
	(mips_pseudo_table): Add .cpsetup, .cplocal, .cpreturn, .gpvalue
	pseudo-ops.
	(macro): Don't warn about .cprestore for NewABI.
	(md_pcrel_from): Code cleanup.
	(mips_force_relocation): Force output of some NewABI relocations even
	without a defined symbol.
	(s_cpload): Ignore .cpload for NewABI.
	(s_cpsetup): Handle .cpsetup.
	(s_cplocal): Handle .cplocal.
	(s_cprestore): Ignore .cprestore for NewABI.
	(s_cpreturn): Handle .cpreturn.
	(s_gpvalue): Handle .gpvalue.
	(s_cpadd): Ignore .cpadd for NewABI.
	(nopic_need_relax): Take g_switch_value into account as gp
	optimization.
	(tc_gen_reloc): Don't handle BFD_RELOC_MIPS_{CALL,GOT}* for NewABI.
2001-10-10 01:08:35 +00:00
Thiemo Seufer ad8d3bb3cf * config/tc-mips.c (my_getSmallParser): New function prototype.
(small_ex_type): Named this enum, more return values for
	my_getSmallExpression.
	(mips_ip): Allow SPC and HT between arguments. Handle some NewABI
	triple relocations. Protect some parts with ifdef OBJ_ELF.
	(percent_op_match): New struct, lookup table for %some_reloc().
	(my_getSmallParser): New function, parses nested percent_ops also.
	(my_getSmallExpression): Rewite to support nested percent_ops.
2001-10-10 00:54:53 +00:00
Thiemo Seufer d6bc6245d6 * config/tc-mips.c
(load_address): Support both 32- and 64-bit addresses.
	(macro): Call load_register correctly. Expand 64-bit loads ans stores.
	(macro2): Call load_address correctly.
2001-10-10 00:43:36 +00:00
Nick Clifton a5d2034ac0 fix z8k assembly and disassembly 2001-10-09 17:25:58 +00:00
Aldy Hernandez 90f9b791a1 * config/tc-arm.c: Change MAVERIK to MAVERICK. 2001-10-09 16:08:57 +00:00
Alan Modra aa1f4858a4 * config/obj-elf.c: Make use of elf_group_name and elf_next_in_group
throughout file.
	(obj_elf_change_section): Rename "group" to "group_name".
	(obj_elf_section): Likewise.
	(elf_frob_file): Don't use sec->lineno for SHT_GROUP section to store
	first member section; Instead use elf_next_in_group.
2001-10-09 13:13:09 +00:00
Alan Modra 060adf0e2f * config/obj-elf.c: (obj_elf_change_section): Add "group" param.
Set elf_section_data group from it.  Warn if group name changed.
	(obj_elf_parse_section_letters): Parse 'G' too.
	(obj_elf_section): Parse group name.
	(struct group_list): New.
	(build_group_lists): New function.
	(elf_frob_file): Create SEC_GROUP section(s).

	* config/obj-elf.c: (elf_copy_symbol_attributes): Zap trailing
	whitespace.
2001-10-09 06:07:33 +00:00
Aldy Hernandez 22d9c8c52f updated credits 2001-10-08 19:31:33 +00:00
Aldy Hernandez 404ff6b5ae * gas/config/tc-arm.c (ARM_EXT_MAVERIK): New macro.
(cirrus_regtype): New enum.
	(LONGEST_INST): Change to 10.
	(CIRRUS_MODE1): New.
	(CIRRUS_MODE2): New.
	(CIRRUS_MODE3): New.
	(CIRRUS_MODE4): New.
	(CIRRUS_MODE5): New.
	(CIRRUS_MODE6): New.
	(insns): Add cirrus dsp instructions.
	(ARM_EXT_MAVERIKSC_REG): New.
	(cirrus_register): New.
	(cirrus_mvf_register): New.
	(cirrus_mvd_register): New.
	(cirrus_mvfx_register): New.
	(cirrus_mvdx_register): New.
	(cirrus_mvax_register): New.
	(ARM_EXT_MAVERIKsc_register): New.
	(reg_table): Add cirrus registers.
	(cirrus_valid_reg): New.
	(cirrus_reg_required_here): New.
	(do_c_binops_1): New.
	(do_c_binops_2): New.
	(do_c_binops_3): New.
	(do_c_triple_4): New.
	(do_c_triple_5): New.
	(do_c_quad_6): New.
	(do_c_dspsc_1): New.
	(do_c_dspsc_2): New.
	(do_c_shift_1): New.
	(do_c_shift_2): New.
	(do_c_ldst_1): New.
	(do_c_ldst_2): New.
	(do_c_ldst_3): New.
	(do_c_ldst_4): New.
	(do_c_binops): New.
	(do_c_triple): New.
	(do_c_quad): New.
	(do_c_dspsc): New.
	(do_c_shift): New.
	(cirrus_parse_offset): New.
	(do_c_ldst): New.
	(md_parse_option): Add arm9e.
	(md_show_usage): Same.
2001-10-08 19:05:34 +00:00
Tom Rix 8642cce86a Fix 2 xcoff line number problems 2001-10-08 18:14:43 +00:00
Alan Modra 6ce8b3699c * config/obj-elf.c: Standardize error/warning messages - don't
capitalise, no final period or newline, don't say "ignoring" for
	as_bad messages.  In some cases, change the wording to that used
	elsewhere for similar messages.
	(obj_elf_section_name): New function, split out from ..
	(obj_elf_section): .. here.  Correctly mask off SHF_MERGE if
	entsize not specified.
2001-10-07 06:16:54 +00:00
Alexandre Oliva 7dc8f5ceec * config/tc-mn10300.c (tc_gen_reloc): Don't free
reloc->sym_ptr_ptr if it's not allocated.
2001-10-05 07:49:24 +00:00
Thiemo Seufer f668894301 * config/tc-mips.c (prev_insn_reloc_type): Make it an array to hold a
relocation triple.
	(prev_insn_fixp): Likewise.
	(append_insn): Changed prototype to accept a relocation pointer.
	(imm_reloc): Make it an array.
	(offset_reloc): Likewise.
	(md_assemble): Handle triple relocations.
	(append_insn): Likewise. Add handling for some NewABI relocations.
	(mips_no_prev_insn): Handle triple relocations.
	(macro_build): Likewise. Add handling for some NewABI relocations.
	Move handling for the 'u' case to append_insn().
	(mips16_macro_build): Handle triple relocations.
	(macro_build_lui): Likewise. Don't handle _gp_disp as special symbol
	for NewABI.
	(mips_ip): Handle triple relocations.
	(mips16_ip): Likewise.
	(mips_force_relocation): Force handling of triple relocations
	without symbols for NewABI.
	(md_apply_fix): Add handling for some NewABI relocations.
2001-10-04 20:07:00 +00:00
Alan Modra 1ae008798a * config/tc-i386.c (parse_register): If not producing code for
x86_64, reject x86_64 register name matches.
	(md_assemble): Remove now redundant check for x86_64 regs.
2001-10-04 18:01:46 +00:00
Alan Modra 9c7977b3bd * config/tc-ppc.c (md_assemble <DS relocs>): Test ppc_size as well
as BFD_DEFAULT_TARGET_SIZE.
	(ppc_tc): Likewise.
	(ppc_is_toc_sym): Likewise.
	(md_apply_fix3): Likewise.
2001-10-04 05:03:44 +00:00
Thiemo Seufer e013f6904c * config/tc-mips.c (mips_64): Remove.
(mips_target_format): Move downwards in file, use HAVE_64BIT_OBJECTS
	in it.
	(mips_abi_level, mips_abi): New enum.
	(mips_32bit_abi): Remove.
	(HAVE*PRS): Use mips_abi instead of mips_32bit_abi.
	(HAVE_NEWABI): New define.
	(HAVE_64BIT_OBJECTS): New define.
	(HAVE_32BIT_ADDRESSES): Don't return true for 64bit objects.
	(HAVE_64BIT_ADDRESSES): New define, inverse of HAVE_32BIT_ADDRESSES.
	(support_64bit_objects): New prototype.
	(md_begin): Use mips_abi instead of mips_32bit_abi. Don't write
	.reginfo section for n32, use .MIPS.options instead.
	(support_64bit_objects): New function, code from md_parse_option.
	(md_longopts): Add -n32 option.
	(md_parse_option): Use mips_abi instead of mips_32bit_abi/mips64.
	Add -n32 option. Protect with OBJ_ELF.
	(s_mipsset): Use mips_abi instead of mips_32bit_abi.
	(mips_elf_final_processing): Likewise. Don't write .reginfo section
	for n32, use .MIPS.options instead.
2001-10-03 20:30:15 +00:00
Alan Modra 32a5aae294 * config/tc-ppc.c (md_apply_fix3 <BFD_RELOC_CTOR>): Make it 64
bits if target is 64 bit.
2001-10-02 09:28:53 +00:00
H.J. Lu 34105363c2 2001-09-30 H.J. Lu <hjl@gnu.org>
* config/obj-elf.c (obj_elf_parse_section_letters): Accept "am"
	and "ams" for compatibility.
2001-10-01 06:30:19 +00:00
Hans-Peter Nilsson 79ad6e9430 * config/tc-sh.h (MD_PCREL_FROM_SECTION): Define.
(md_pcrel_from_section): Prototype.
2001-10-01 00:08:36 +00:00
Hans-Peter Nilsson ef17112f8d * config/tc-sh.c (md_pcrel_from_section): Transformed from
md_pcrel_from.  Handle pc-relativeness against link-time
	symbol.  Handle relativeness to elsewhere than the fixup.
2001-10-01 00:06:58 +00:00
Stephane Carrez 27302d639b * config/tc-m68hc11.c (cmp_opcode): Define prototype.
(print_opcode_format, skip_whites): Likewise.
	(convert_branch, m68hc11_new_insn): Likewise.
	(build_dbranch_insn, build_indexed_byte): Likewise.
	(build_reg_mode, find, find_opcode): Likewise.
	(print_insn_format): Fix call to print_opcode_format.
	(md_assemble): Fix call to build_dbranch_insn.
2001-09-30 09:20:55 +00:00
Nick Clifton 2c20dfb248 Add missing function protoypes. 2001-09-27 09:58:01 +00:00
Alexandre Oliva 6e22e505ed * config/tc-mn10300.c (tc_gen_reloc): Don't emit an *ABS*
relocation for differences between symbols in a section other
than the one in which the difference is to be placed; apply
the relocation instead.
2001-09-25 08:51:52 +00:00
Nick Clifton 89b57c9acc fix compile time warning messages 2001-09-24 14:47:10 +00:00
Nick Clifton a80076a171 Fix compile time warnings 2001-09-22 09:23:31 +00:00
Alan Modra 7146a6f592 * config/tc-openrisc.c: Don't include <ctype.h>. 2001-09-21 12:34:40 +00:00
Nick Clifton 16a419ba01 Add option -mwarn-areg-zero. 2001-09-20 10:59:42 +00:00
Alan Modra 44addf7f7b * config/tc-i370.c: Fix typo in last change. 2001-09-19 08:13:04 +00:00
H.J. Lu 3882b01078 Locale changes from Bruno Haible <haible@clisp.cons.org>. 2001-09-19 05:33:36 +00:00
Nick Clifton b6849f55b9 s390 assembler improvements and testsuite 2001-09-18 15:41:33 +00:00
Alan Modra 0e1a166b28 * dwarf2dbg.c (dwarf2_directive_file): Avoid signed/unsigned warning.
* write.c (set_symtab): Update bfd_alloc declaration.  Use a temp
	var to ensure bfd_alloc arg is the right type.
	(write_object_file): Cast args of bfd_seek.  Replace bfd_write with
	bfd_bwrite.

	* config/obj-coff.c: Replace calls to bfd_write with calls to
	bfd_bwrite.  Cast args of bfd_seek.

	* config/obj-elf.c (obj_elf_change_section): Avoid signed/unsigned
	warning.

	* config/tc-mn10300.c (set_arch_mach): Make param unsigned.

	* config/tc-tic54x.c (tic54x_mlib): Replace bfd_read call with
	call to bfd_bread.
2001-09-18 10:08:15 +00:00
Hans-Peter Nilsson e08ae97912 * config/tc-sh.h (sh_force_relocation): Prototype.
(struct fix): Forward declare.
	* config/tc-sh.c (type sh_operand_info): Move to top of file.
	(cons, s_align_bytes): Remove old-type declarations.
	(sh_elf_suffix, parse_reg, dot, parse_exp, parse_at, get_operand,
	get_operands, get_specific, insert, build_relax,
	insert_loop_bounds, build_Mytes): Prototype.
	(little): Make static.  Prototype.
	(check, tc_Nout_fix_to_chars): Delete unused functions.
2001-09-15 14:49:54 +00:00
Eric Christopher 920acd6218 2001-09-14 Eric Christopher <echristo@redhat.com>
* config/tc-mips.c (md_parse_option): Remove setting mips_64 via
	-mgp32/mgp64.
2001-09-14 20:18:54 +00:00
Thiemo Seufer 233b8738b0 * config/tc-mips.c (append_insn): Don't rightshift BFD_RELOC_16_PCREL. 2001-09-12 21:19:37 +00:00
Richard Henderson d61a78a7af * config/tc-alpha.c (alpha_elf_section_letter): New.
(alpha_elf_section_flags): New.
        * config/tc-alpha.h (md_elf_section_letter): New.
        (md_elf_section_flags): New.
        * config/tc-ia64.c (ia64_elf_section_letter): New.
        * config/tc-ia64.h (md_elf_section_letter): New.
2001-09-11 18:26:04 +00:00
Jakub Jelinek 9469ddf0d0 * config/obj-elf.c (obj_elf_parse_section_letters): Use 'M' instead
of 'm', 'S' instead of 's'.  Update bad_msg.
	* config/tc-ppc.c (ppc_section_letter): Update bad_msg.
	* config/tc-i370.c (i370_sectioN_letter): Update bad_msg.
2001-09-11 16:46:38 +00:00
Alan Modra e0890092b6 * expr.c (expr): Move code setting "retval" to the end of the loop,
and rearrange for efficiency.  For "PIC code" subtraction, use
	"rightseg" rather than recalculating.  For "symbol OP symbol"
	subtract, set "retval" to absolute_section if symbols in same
	section.
	* symbols.c (resolve_symbol_value): Resolve "sym +/- expr" to an
	O_symbol.  Simplify a +/- b code.  Allow equality and non-equality
	comparisons on symbols from any section.  Allow other comparison
	operators as for subtraction.
	(symbol_equated_reloc_p): New predicate function.
	* symbols.h (symbol_equated_reloc_p): Declare.
	* write.c (adjust_reloc_syms): Use symbol_equated_reloc_p.
	(write_relocs): Likewise.
	(write_object_file): Likewise.
	(relax_segment <rs_machine_dependent>): Ensure segment for
	expression syms is set correctly.
	* config/tc-mips.c (md_estimate_size_before_relax): Likewise.
	* config/tc-i386.c (md_assemble <Output jumps>): Don't lose part
	of a complex expression when setting up frag_var.
2001-09-09 14:01:17 +00:00
Richard Henderson ec8fcf4a1d * config/tc-alpha.c (alpha_reloc_op_tag): Replace need_seq with
require_seq and allow_seq.  Let !literal omit the sequence number.
        (tokenize_arguments): Reject sequence numbers of !allow_seq.
2001-09-08 01:12:00 +00:00
Jakub Jelinek 891937bff4 * config/tc-sparc.c (md_apply_fix3): Handle relocs against SEC_MERGE
section symbols the same way as externs.
2001-09-07 22:41:03 +00:00
Thiemo Seufer 553178e47b Reallow unrestricted use of .set mipsX pseudo-op in gas.
Update testcases accordingly.
2001-09-07 05:54:12 +00:00
Thiemo Seufer cb56d3d327 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
of R_MIPS_PC16.

	* config/tc-mips.c (append_insn): Handle BFD_RELOC_16_PCREL.
	(macro_build): Use BFD_RELOC_16_PCREL_S2 only for embedded
	PIC, BFD_RELOC_16_PCREL for the rest.
	(mips_ip): Likewise.
        (md_pcrel_from): return the right offset for the differently shifted
        pcrel relocs.
	(md_apply_fix): Handle BFD_RELOC_16_PCREL.

	* gas/mips/beq.d: Check branches to external labels.
	* gas/mips/beq.s: Likewise.
	* gas/mips/bge.d: Likewise.
	* gas/mips/bge.s: Likewise.
	* gas/mips/bgeu.d: Likewise.
	* gas/mips/bgeu.s: Likewise.
	* gas/mips/blt.d: Likewise.
	* gas/mips/blt.s: Likewise.
	* gas/mips/bltu.d: Likewise.
	* gas/mips/bltu.s: Likewise.
	* gas/mips/elempic.d: Switch from R_MIPS_GNU_REL16_S2 to R_MIPS_PC16.
	* gas/mips/empic.d: Likewise.
	* gas/mips/empic.s: Likewise.
	* gas/mips/telempic.d: Likewise.
	* gas/mips/tempic.d: Likewise.
2001-09-07 05:00:37 +00:00
Richard Henderson 3969b680c3 * config/tc-ia64.c (FUNC_IPLT_RELOC): New.
(pseudo_func): Add @iplt.
        (pseudo_opcode): Add data16 and data16.ua.
        (md_begin): Set iplt pseudo.
        (ia64_cons_fix_new): Handle 16 byte iplt reloc specially.
2001-09-05 20:20:37 +00:00
Richard Henderson 19f785835e * config/tc-alpha.c (struct alpha_insn): Make sequence scalar long.
(MACRO_LITERAL, MACRO_BASE, MACRO_BYTOFF, MACRO_JSR): Remove.
 	(alpha_macros): Remove occurrences of same.
 	(O_lituse_addr, O_gprel): New.
 	(DUMMY_RELOC_LITUSE_*): New.
 	(s_alpha_ucons, s_alpha_arch): Prototype.
 	(alpha_reloc_op): Construct elements via DEF macro.
 	(ALPHA_RELOC_SEQUENCE_OK): Remove.
 	(struct alpha_reloc_tag): Rename from alpha_literal_tag; rename
 	members to not be literal specific.
 	(next_sequence_num): New.
 	(md_apply_fix3): Cope with missing GPDISP_LO16.  Adjust for
 	added/removed BFD relocations.
 	(alpha_force_relocation, alpha_fix_adjustable): Likewise.
 	(alpha_adjust_symtab_relocs): Handle GPDISP relocs as well.
 	(tokenize_arguments): Parse ! relocations properly.
 	(find_macro_match): Delete unused macro argument types.
 	(assemble_insn): Add reloc parameter; emit that instead of the
 	default as appropriate.
 	(get_alpha_reloc_tag): New.  Split from ...
 	(emit_insn): ... here.  Allocate a reloc tag for GPDISP.
 	(assemble_tokens): Don't search macros if user relocation present.
 	Copy reloc sequence number to insn struct.
 	(emit_ldgp): Remove user reloc handling.
 	(load_expression, emit_lda, emit_ldah, emit_ir_load): Likewise.
 	(emit_loadstore, emit_ldXu, emit_ldil, emit_stX): Likewise.
 	(emit_sextX, emit_division, emit_jsrjmp, emit_retjcr): Likewise.
 	* config/tc-alpha.h (tc_adjust_symtab): Always define.
 	(struct alpha_fix_tag): Name members less literal specific.

 	* gas/alpha/alpha.exp: New file.
 	* gas/alpha/elf-reloc-1.[sd]: New test.
 	* gas/alpha/elf-reloc-2.[sl]: New test.
 	* gas/alpha/elf-reloc-3.[sl]: New test.
 	* gas/alpha/elf-reloc-4.[sd]: New test.
 	* gas/alpha/fp.exp: Remove file.
 	* gas/alpha/fp.s: Output to .data not .rdata.
 	* gas/alpha/fp.d: Adjust to match.
2001-09-05 02:39:43 +00:00
Jeff Law de342d07b9 * tc-h8300.c (tc_gen_reloc): Give an error if we try to take the
address of two symbols in different sections.
2001-09-05 02:01:08 +00:00
Jeff Law 3c1ba8a308 * config/tc-h8300.c (build_bytes): For OBJ_ELF, make relocation's
offset match H8 ELF spec.
        (md_section_align): Alternate implementation for BFD_ASSEMBLER.
        (md_apply_fix): Fix argument and return types for BFD_ASSEMBLER.
2001-08-31 22:43:55 +00:00
Eric Christopher 3c02b2abd6 2001-08-31 Eric Christopher <echristo@redhat.com>
Jason Eckhardt  <jle@redhat.com>

	* config/tc-mips.c (mips_cpu_info): Add support for mipsisa32,
	5kc, and 20kc.  Clean up old entries.
2001-08-31 21:06:40 +00:00
Jeff Law 36ed2fff06 * tc-h8300.c (relocation mappings): Remove. Moved to tc-h8300.h.
(build_bytes): Mark fixups for PCrel branches as signed.  For
        OBJ_ELF, make sure the reloc's offset points to the first byte
        to be modified.
        (md_convert_frag): Update definiton based on BFD_ASSEMBLER.
        * tc-h8300.h (relocation mappings): Add.
2001-08-31 17:43:52 +00:00
Jeff Law 5facebfccc Nuts. Checked in wrong version of previous patch. Fixed. 2001-08-30 20:38:35 +00:00
Jeff Law f333765ffd Thu Aug 30 12:05:13 2001 J"orn Rennecke <amylaar@redhat.com>
* tc-h8300.c (tc_crawl_symbol_chain, tc_headers_hook): Don't
        define for BFD_ASSEMBLER.
        (tc_reloc_mangle): Likewise.
        (tc_gen_reloc): New function for BFD_ASSEMBLER.
More of Joern's patches with minor changes s/OBJ_ELF/BFD_ASSEMBLER/
2001-08-30 20:15:06 +00:00
Jeff Law 7e0de7bf18 * tc-h8300.c: If OBJ_ELF, include elf/h8.h, and define
assorted coff relocations to the corresponding elf relocations.
        * tc-h8300.h (TARGET_ARCH, TARGET_FORMAT): Define appropriately.
More of Joern's patches.
2001-08-29 18:56:50 +00:00
Jeff Law 83e20b45a3 * config/tc-h8300.c (h8300hmode): Record the machine type
if BFD_ASSEMBLER is defined.
	(h8300smode, md_begin): Similarly.
2001-08-29 18:50:56 +00:00
Thiemo Seufer 7283eb8605 * tc_mips.c (load_address): Reflect change to MAX_GPREL_OFFSET.
(macro): Reflect change to MAX_GPREL_OFFSET.
2001-08-27 18:48:27 +00:00
Alan Modra 0baf16f23c * configure.in: Recognise powerpc*le*, not just powerpcle*.
* configure: Regenerate.
	* config/tc-ppc.c (PPC_LO, PPC_HI, PPC_HA, PPC_HIGHER,
	PPC_HIGHERA, PPC_HIGHEST, PPC_HIGHESTA, SEX16): New macros.
	(md_assemble): Use them.
	(ppc_machine): Support stub for ELF64 as well as XCOFF.
	(md_pseudo_table): Add "llong", "quad".
	(md_parse_option): Match default_cpu of powerpc*.
	(ppc_arch): Likewise.
	(ppc_subseg_align): Only for OBJ_XCOFF.
	(ppc_target_format): Return elf64-powerpc strings for 64 bit ELF.
	(md_begin): Select PPC_OPCODE_64 for 64 bit.
	(ppc_insert_operand): Don't bother testing 'file' before calling
	as_bad_where.  Use as_bad_where for operand->insert errors.
	(mapping): Add ELF64 relocation modifiers.
	(ppc_elf_suffix): Replace symbol on BFD_RELOC_PPC64_TOC reloc
	expressions with abs_symbol.
	(ppc_elf_cons): Correct offset for little endian targets.
	(ppc_elf_frob_symbol): New.
	(md_assemble): Add support for 64 bit ELF relocs.
	(ppc_tc): Ensure 8 byte alignment when 64 bit.
	(ppc_is_toc_sym): Only define for OBJ_XCOFF and OBJ_ELF.  Match
	".toc" section for 64 bit ELF.
	(ppc_fix_adjustable): New.  Macro body moved from tc-ppc.h.
	(md_apply_fix3): Silence warning with ATTRIBUTE_UNUSED.  Only do
	the ppc_is_toc_sym check for OBJ_XCOFF and OBJ_ELF.  For 64 bit,
	use BFD_RELOC_PPC64_TOC16_DS instead of BFD_RELOC_PPC_TOC16.
	Expand on comments, error message.  Add support for 64 bit relocs,
	and use PPC_HI etc. macros.
	* config/tc-ppc.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define.
	(HANDLE_ALIGN): Define to generate nops in code sections rather
	than zeros.
	(TC_FORCE_RELOCATION): Force for BFD_RELOC_PPC64_TOC.
	(ELF_TC_SPECIAL_SECTIONS): Add 64 bit ELF sections.
	(tc_fix_adjustable): Move body of macro to tc-ppc.c.
	(ppc_fix_adjustable): Declare.
	(tc_frob_symbol): Define.
	(ppc_elf_frob_symbol): Declare.
2001-08-27 10:42:16 +00:00
Andreas Jaeger 9d654c1ca4 * config/tc-s390.c: Add missing prototypes
(md_gather_operands): Make static.
2001-08-26 11:44:51 +00:00
Thiemo Seufer e7d556dfef * tc_mips.h (MAX_GPREL_OFFSET): Change it to the maximum allowed
value, not the word beyond maximum.
	* tc_mips.c (macro_build_lui): Code cleanup.
	(macro): Reflect change to MAX_GPREL_OFFSET.
	(mips_ip): Check explicitly against S_EX_NONE.
	(my_get_SmallExpression): parse for %gp_rel, not %gprel.
	(md_apply_fix): Code cleanup.
2001-08-26 10:42:12 +00:00
Andreas Jaeger 34f63668bf * config/tc-ppc.h: Fix prototype declaration. 2001-08-24 19:18:45 +00:00
Jakub Jelinek c538998c23 * config/tc-ia64.c (dot_endp): Set function symbol sizes.
* config/obj-elf.c (obj_elf_size): When size is constant, free
	and clear symbol_get_obj(sym)->size if any.
2001-08-23 20:43:01 +00:00
Thiemo Seufer 1ff54a84b4 * tc_mips.c (md_begin): Warn about incompatibility between -march=FOO
and -mipsN option, continue with default ISA.
2001-08-21 01:13:05 +00:00
Thiemo Seufer a6bacc8047 * config/tc-mips.c (md_parse_option): #ifdef the
traditional/non-traditional names as it is done in mips_target_format.
2001-08-21 00:59:48 +00:00
Richard Henderson ca3f769514 * config/tc-alpha.h (MD_APPLY_FIX3): Define.
* config/tc-alpha.c (md_apply_fix3): Rename from md_apply_fix;
        use seg parameter instead of now_seg.
2001-08-21 00:22:23 +00:00
H.J. Lu e87a02842a 2001-08-18 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (show): Add the missing prototype.
2001-08-18 18:03:24 +00:00
Thiemo Seufer fb1b323293 * config/tc-mips.c (S_EX_*): New enum for my_getSmallExpression()
return values.
	(mips_ip): Use the new return values instead of characters. Add
	support for %higher and %highest.
	(LP): Remove.
	(RP): Remove.
	(my_getSmallExpression): Make parsing case insensitive and more
	reliable. Add support for %higher and %highest. Further support	to
	parse %gprel and %neg is implemented but currently deactivated.
2001-08-18 17:24:52 +00:00
Thiemo Seufer be00bdddad Set MIPS n32 ABI flag in ELF header if appropriate. 2001-08-16 21:48:28 +00:00
Thiemo Seufer 07ae3efa01 Remove obsolete special handling of 64bit Relocations. 2001-08-16 15:12:09 +00:00
Nick Clifton 5d430f8ba5 Add missing prototypes 2001-08-13 11:05:29 +00:00
Andreas Jaeger 198ce79b6b * config/tc-s390.c (s390_elf_cons): Correct fixups for PLT
relocations.
2001-08-13 08:03:52 +00:00
Nick Clifton 4ffadb11c8 Fix behaviour of unaligned data directives 2001-08-12 08:47:02 +00:00
Kazu Hirata f72c8c98df * config/tc-mips.c: Fix a comment typo. 2001-08-11 15:15:15 +00:00
Richard Sandiford ea1fb5dc3b * config/tc-mips.c (move_register): New function.
(macro_build): Remove OPCODE_IS_MEMBER's gp32 argument.
	(mips_ip): Likewise.
	(macro2): Use move_register rather than macro_build for moves.
	(mips16_macro): Likewise.
	(macro): Likewise.  Handle M_MOVE.
2001-08-10 16:24:32 +00:00
Alan Modra 11b37b7b84 Revert 2001-08-08 changes. 2001-08-10 01:34:47 +00:00
Alan Modra 8d28c9d7be * symbols.c: Add missing prototypes.
* config/e-i386elf.c: Likewise.
	* config/e-i386coff.c: Likewise.
	* config/e-i386aout.c: Likewise.
	* config/obj-coff.c: Likewise.
	(def_symbol_in_progress, stack): Move definition.
	* config/obj-elf.c: Add missing prototypes.
	(obj_elf_change_section): Make static.
	(obj_elf_parse_section_letters): Likewise.
	(obj_elf_section_word): Likewise.
	(obj_elf_section_type): Likewise.
2001-08-09 14:42:07 +00:00
Alan Modra fce3099f60 * config/tc-ppc.c (md_apply_fix3): Replace haphazard code for
determining reloc type with code reading operands->reloc field.
2001-08-08 13:23:07 +00:00
Alan Modra 8fd3e36b84 * config/obj-elf.c (elf_copy_symbol_attributes): Make it a global
function, and expand old obj-elf.h OBJ_COPY_SYMBOL_ATTRIBUTES here.
	* config/obj-elf.h (elf_copy_symbol_attributes): Declare.
	(OBJ_COPY_SYMBOL_ATTRIBUTES): Call elf_copy_symbol_attributes.
2001-08-08 13:11:58 +00:00
Thiemo Seufer 38487616e6 Replace a bunch of magic constants in tc-mips.c with their proper
defines from mips.h.
2001-08-07 13:22:46 +00:00
Thiemo Seufer 9a41af6410 Some formatting fixes and assorted cleanup in tc-mips.c. 2001-08-07 13:15:26 +00:00
Thiemo Seufer 6dce9e24b3 * config/tc-mips.c (md_begin): Take -mcpu value into account even when
-mipsX is specified. Make both -mcpu/-march and -mcpu/-mtune pairs
	mutually exclusive (if they are different).
	(md_parse_option): Warn if an -march/-mtune/-mcpu/-m<cpu> option is
	set more than once.
2001-08-07 12:46:22 +00:00
Richard Sandiford 236bd878b5 * config/tc-mips.c (md_apply_fix): Don't subtract the symbol value
from GPREL addends.
2001-08-03 18:33:34 +00:00
Richard Sandiford ca4e0257d1 * doc/c-mips.tex (-mgp32, -mfp32): Added -mfp32, unified with -mgp32.
* config/tc-mips.c (mips_fp32, mips_32bit_abi): New static variables.
	(md_long_opts): Add -mfp32 option.
	(md_parse_option): Handle it.  Set mips_32bit_abi given -mabi=32.
	(md_show_usage): Show usage for -mfp32 and -mgp32.
	(HAVE_32BIT_GPRS, HAVE_32BIT_FPRS): New macros.
	(HAVE_64BIT_GPRS, HAVE_64BIT_FPRS): New macros, inverse of the above.
	(HAVE_32BIT_ADDRESSES): New macro.
	(load_register): Use HAVE_32BIT_GPRS to determine the register width.
	(load_address): Use HAVE_32BIT_ADDRESSES to determine the address size.
	(s_cprestore, s_cpadd): Likewise.
	(macro): Use HAVE_32BIT_GPRS to determine the width of registers
	used in branch and M_LI_D macros.  Use HAVE_64BIT_FPRS to determine
	the width registers used in M_LI_DD macros.  Use HAVE_32BIT_ADDRESSES
	to determine the width of addresses in load, store and jump macros.
	(macro2): Use HAVE_32BIT_GPRS to determine the width of registers
	used in set instructions; do not check the address size for them.
	Use HAVE_32BIT_ADDRESSES to determine the width of addresses in
	unaligned load and store macros.
	(mips_ip): Use the new macros to check the width of a register when
	processing float constants.  Force a constant into memory if it is
	destined for an FPR and the FPRs are wider than the GPRs.  Warn about
	odd FPR numbers if HAVE_32BIT_FPRS.  Use HAVE_32BIT_GPRS rather
	than mips_gp32 to select synthetic instructions.
	(macro_build): Use HAVE_32BIT_GPRS rather than mips_gp32 to select
	synthetic instructions.
2001-08-02 10:15:24 +00:00
Nick Clifton 28bab82b5a Cleanups for z8k target 2001-08-01 15:39:17 +00:00
Alan Modra 28f815927f * config/tc-i386.c (lex_got): Match lower case relocation tokens.
Don't allocate more space than necessary for the input line copy.
2001-08-01 02:27:11 +00:00
Geoffrey Keating e138127ab2 * config/tc-ppc.c (ppc_elf_validate_fix): It's OK to have
any kind of relocation against a not-loaded section.
2001-07-31 19:24:57 +00:00
Alan Modra 468cced8b9 * config/obj-elf.c (obj_elf_symver): Temporarily modify lex_type
to include '@' in symbol names when parsing versioned symbols
	rather than calling get_symbol_end multiple times.
	* config/tc-i370.c (register_name): Format fixes.  Don't call
	get_symbol_end after parsing number.
	* config/tc-mn10200.c (data_register_name): Format fixes.  Hoist
	code out of conditional.
	(address_register_name): Likewise.
	(other_register_name): Likewise.
	* config/tc-mn10300.c (r_register_name): Likewise.
	(xr_register_name): Likewise.
	(data_register_name): Likewise.
	(address_register_name): Likewise.
	(other_register_name): Likewise.
	* config/tc-ppc.c (register_name): Likewise.
	* config/tc-s390.c (register_name): Likewise.
2001-07-30 06:15:49 +00:00
Stephane Carrez 13283e2df1 * config/tc-m68hc11.c (md_estimate_size_before_relax): Fix bsr
and bra relax: update fragP->fr_fix after the fixup.
2001-07-28 19:28:04 +00:00
H.J. Lu 46bac6de18 2001-07-25 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (md_estimate_size_before_relax): Make sure
	we treat weak like extern only for ELF.
	(mips_fix_adjustable): Make sure we don't adjust extern/weak
	symbols only for ELF.
2001-07-25 22:27:46 +00:00
Chris Demetriou 2f4dcb115b 2001-07-25 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c: Fix spelling error in comment.
2001-07-25 20:34:39 +00:00
Kazu Hirata 0772685173 * config/tc-alpha.h: Fix formatting.
* 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-07-23 14:02:13 +00:00
Alan Modra ac62c3468d * symbols.c (S_GET_VALUE): Don't treat O_constant and local
symbols specially.  Always resolve, adding fr_address to value.
	* write.c (write_object_file): Don't add fr_address to sym values.
	(relax_frag): Likewise.
	(relax_segment): Likewise.
	* config/obj-ieee.c (do_symbols): Likewise.
	* config/tc-cris.c (md_convert_frag): Likewise.
	* config/tc-fr30.c (md_convert_frag): Likewise.
	* config/tc-i386.c (md_convert_frag): Likewise.
	* config/tc-m32r.c (md_convert_frag): Likewise.
	* config/tc-m68hc11.c (md_convert_frag): Likewise.
	* config/tc-mcore.c (md_convert_frag): Likewise.
	* config/tc-mips.c (mips16_extended_frag): Likewise.
	* config/tc-ns32k.c (md_convert_frag): Likewise.
	* config/tc-m68k.c (md_convert_frag_1): Likewise.
	(BRANCHBWL, BRABSJUNC, BRABSJCOND, BRANCHBW, FBRANCH, DBCCLBR,
	DBCCABSJ, PCREL1632, PCINDEX, ABSTOPCREL): Decrement.
	(md_relax_table): Remove first four entries.  Format.
	(md_estimate_size_before_relax): Remove old_fix.  Don't bother
	setting fr_var.  Simplify byte branch checks.
2001-07-23 13:03:40 +00:00
Alan Modra 677537c186 * config/tc-hppa.c (pa_parse_nonneg_cmpsub_cmpltr): Remove
"isbranch" param as all calls have it set.
	(pa_parse_neg_cmpsub_cmpltr): Likewise.
	(pa_parse_nonneg_add_cmpltr): Likewise.  Remember result of
	strcasecmp in "nullify" var.
	(pa_parse_neg_add_cmpltr): Likewise.
	(pa_ip): Don't "save_s" unnecessarily.  Update calls to above
	functions.  Don't print wrong conditions in error messages.
2001-07-23 12:50:22 +00:00
Andreas Jaeger c745b67a33 * config/tc-s390.c (s390_force_relocation): Removed.
* config/tc-s390.h: Remove double declaration of
	TC_FORCE_RELOCATION.
2001-07-23 10:21:22 +00:00
H.J. Lu 2b3c5a5dc1 2001-07-22 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (s_mips_end): Remove unused variables.
	(s_mips_frame): Add ATTRIBUTE_UNUSED.
2001-07-22 18:11:29 +00:00
Andreas Schwab f27a38390b * config/tc-m68k.c (md_pseudo_table) [OBJ_ELF]: Add .file and
.loc.
	(md_assemble) [OBJ_ELF]: Call dwarf2_emit_insn before emitting
	insn.
	* config/tc-m68k.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
2001-07-18 10:25:58 +00:00
Matthew Green 5bae9b28a0 * config/tc-i386.c (comment_chars): Don't use '/' as comment start if
TE_NetBSD.
	(line_comment_chars): Set to '/' if TE_NetBSD.
2001-07-17 09:57:52 +00:00
John Healy cdbb0887ba *** empty log message *** 2001-07-11 19:35:17 +00:00
Nick Clifton bdbe95c8c5 Don't merge if the storage class of the non-debug symbol is C_NULL. 2001-07-11 09:26:27 +00:00
John Healy 07e97ae2e3 2001-07-10 John Healy <jhealy@redhat.com>
* config/obj-elf.c (obj_elf_section): md_elf_section_change_data_hook
	added to grab section information after it's been extracted from the
	.section directive.
2001-07-10 21:49:11 +00:00
John Healy 002de68b31 2001-07-06 John Healy <jhealy@redhat.com>
* cgen.c (gas_cgen_save_fixups): Modified to allow more than one
        set of fixups to be stored.
        (gas_cgen_restore_fixups): Modified to allow the fixup chain to be
        restored to be chosen from any that are saved.
        (gas_cgen_swap_fixups): Modified to allow the current set of
        fixups to be swapped with any other set that has been saved.
        (gas_cgen_initialize_saved_fixups_array): New routine.
        * cgen.h: Modifed prototypes for gas_cgen_save_fixups,
        gas_cgen_restore_fixups, and gas_cgen_swap_fixups.  Added definitions
        or MAX_SAVED_FIXUP_CHAINS.
        * config/tc-m32r.c (assemble_two_insns): Changed calls to fixup
        store, swap and restore fuctions to reflect the new interface.
2001-07-06 19:09:23 +00:00
Nick Clifton 7099f9f917 Catch and ignore empty, ineffectual alignment frags when deciding if a
branch can be short.
2001-07-06 08:21:35 +00:00
Jim Wilson 557debbaef 32-bit unwind data for ia64-hpux, from Steve Ellcey
* config/tc-ia64.c (special_section): Add SPECIAL_SECTION_INIT_ARRAY
	and SPECIAL_SECTION_FINI_ARRAY.
	(special_section_name): Add .init_array and .fini_array.
	(md_pseudo_table): Add init_array and fini_array.
	(md): Add pointer_size and pointer_size_shift fields.
	(setup_unwind_header): New static function.
	(output_unw_records): Modify to use setup_unwind_header.
	(generate_unwind_image, dot_endp): Modify to use md.pointer_size and
	md.pointer_size_shift.
	(md_begin): Initialize md.pointer_size and md.pointer_size_shift.
2001-07-06 07:32:42 +00:00
Ben Elliston 4ad0936356 2001-07-05 Ben Elliston <bje@redhat.com>
* config/tc-m88k.c (md_pseudo_table): Remove redundant "global".
2001-07-05 07:28:06 +00:00
Jim Wilson 87885043df Fix ia64-linux gas ehopt testsuite failure.
* config/tc-ia64.c (md_pseudo_table): Add 2byte, 4byte, and 8byte.
2001-07-05 03:34:42 +00:00
Jim Wilson 3e37788f8d Fix 2 ia64-linux gas testsuite failures.
* config/tc-ia64.c (is_conditional_branch): Rewrite to exclude mod
	sched branches.
2001-07-05 02:30:21 +00:00
Eric Christopher 18ae5d728b 2001-07-04 Eric Christopher <echristo@redhat.com>
* doc/c-mips.texi (MIPS Opts): Document 12000 as valid cpu.

	* config/tc-mips.c (mips_cpu_info_table): Add rm5200, rm5231, rm5261,
	and rm5721 as valid cpu strings.
	(md_show_usage): Add rm5200, rm5231, rm5261, rm5721.
2001-07-04 12:32:07 +00:00
Richard Sandiford 7461da6e23 [gas]
* config/tc-mips.c (md_apply_fix): Prevent addend from becoming zero
	if it's expected to be non-zero.
[gas/testsuite]
	* gas/mips/elf-rel3.s: Add zero word to end of file.
2001-07-04 09:49:29 +00:00
Nick Clifton 7bcad3e505 Fix seg fault by replacing symbol_get_frag() with fscan->fx_frag. 2001-07-03 15:22:19 +00:00
Alan Modra 99a814a1cc * config/tc-ppc.c: Formatting fixes. 2001-07-02 10:54:49 +00:00
Ben Elliston bd59b34f1e 2001-07-01 Ben Elliston <bje@redhat.com>
* config/tc-m88k.c: Back out warning fixes from 2001-06-24, as
	they cause some subtle breakage.  Will fix them again later.
2001-07-01 06:36:43 +00:00
Nick Clifton e237d851a4 Treat a .ln directive outside of a function as a .appline directive. 2001-06-30 10:09:40 +00:00
Eric Christopher ec68c924f0 2001-06-28 Eric Christopher <echristo@redhat.com>
H.J. Lu  <hjl@gnu.org>

        * config/tc-mips.c (mips_arch): New. Use mips_arch instead
        of mips_cpu for the ISA selection.
        (md_longopts): Add OPTION_MARCH and OPTION_MTUNE.
        (md_parse_option): Handle OPTION_MARCH and OPTION_MTUNE.
	(mips_tune): New.  Use mips_tune for scheduling and optimization
	issues.
	(append_insn): Use mips_tune and mips_arch.
	(macro_build): Ditto.
	(mips_ip): Ditto.
	(md_begin): Handle mips_arch, mips_tune and mips_cpu.  For
	backwards compatability mips_cpu generates arch and tune.
	(md_show_usage): Document new behavior.

	* doc/c-mips.texi (MIPS Opts): Document -march and -mtune.
	Deprecate -mcpu.

	* NEWS: Update.

2001-06-28  Eric Christopher  <echristo@redhat.com>

	* gas/mips/usd.d: Change for march/mtune.
	* gas/mips/ulh-xgot.d: Ditto.
	* gas/mips/uld.d: Ditto.
	* gas/mips/trunc.d: Ditto.
	* gas/mips/rol.d: Ditto.
	* gas/mips/nodelay.d: Ditto.
	* gas/mips/mul.d: Ditto.
	* gas/mips/mul-ilocks.d: Ditto.
	* gas/mips/trap20.d: Ditto.
	* gas/mips/mips4.d: Ditto.
	* gas/mips/mips16.d: Ditto.
	* gas/mips/lif-xgot.d: Ditto.
	* gas/mips/lif-svr4pic.d: Ditto.
	* gas/mips/ld-xgot.d: Ditto.
	* gas/mips/ld-svr4pic.d: Ditto.
	* gas/mips/ld-ilocks-addr32.d: Ditto.
	* gas/mips/lb-xgot.d: Ditto.
	* gas/mips/jal-xgot.d: Ditto.
	* gas/mips/jal-svr4pic.d: Ditto.
	* gas/mips/delay.d: Ditto.
	* gas/mips/lb-xgot-ilocks.d: Ditto.
	* gas/mips/div.d: Ditto.
	* gas/mips/break20.d: Ditto.
	* gas/mips/delay.d: Ditto.
	* gas/mips/elf_e_flags3.d: Ditto.
	* gas/mips/elf_e_flags4.d: Ditto.
	* gas/mips/lineno.d: Ditto.
	* gas/mips/mips16.d: Ditto.
	* gas/mips/mips4.d: Ditto.
	* gas/mips/mips4010.d: Ditto.
	* gas/mips/mips4650.d: Ditto.
2001-06-29 21:27:43 +00:00
Nick Clifton d827344236 Use MVN to build simple inverted constants. 2001-06-27 08:15:52 +00:00
Jakub Jelinek 6f112c47dc * config/tc-alpha.c (tc_gen_reloc): Handle relocs against SEC_MERGE
section symbols the same way as externs.
2001-06-24 16:43:31 +00:00
Ben Elliston 453520d7ad 2001-06-24 Ben Elliston <bje@redhat.com>
* config/tc-m88k.c (md_number_to_imm): Remove; unused since 1993.
	(emit_relocations): Ditto.
	(s_bss): Ditto.
	(md_begin): Reformat comments to conform to the GNU standards.
	(md_assemble): Ditto.
2001-06-24 06:01:49 +00:00
Ben Elliston e21e484e83 * fixes to silence all compiler warnings.
2001-06-24  Ben Elliston  <bje@redhat.com>

	* config/tc-m88k.c (get_reg): Adjust type of `reg_prefix' to char.
	(md_parse_option): Mark parameters as unused.
	(md_show_usage): Ditto.
	(calcop): Adjust type of `reg_prefix' to char.
	(get_reg): Ditto.
	(getval): Adjust type of local `c' to char.
	(md_create_short_jump): Mark from_addr, to_addr params as unused.
	(md_create_long_jump): Ditto.
	(md_estimate_size_before_relax): Mark parameters as unused.
2001-06-24 01:56:48 +00:00
Ben Elliston a181d81e0c 2001-06-24 Ben Elliston <bje@redhat.com>
* config/tc-m88k.c (md_pseudo_table): Properly terminate the table
	to allay a possible compiler warning.
2001-06-23 23:02:57 +00:00
Nick Clifton 8be31359fc Add %mrp (millicode return pointer) alias for %r2 or %r31, depending on 32 or
64 bit architecture.
2001-06-22 08:17:57 +00:00
Nick Clifton 1cac90122e Allow adrCCl. [Patch from Phillip BLundel]
Updated ARM tests.
2001-06-21 19:46:54 +00:00
Alan Modra b091f402a9 * config/tc-hppa.c (CHECK_FIELD_WHERE): Define.
(md_apply_fix): Use it here.  Replace printf with equivalent
	as_bad_where.
	(tc_gen_reloc): Use as_bad_where instead of as_bad.
	(md_apply_fix): Here too.
	* config/tc-i386.c (tc_gen_reloc): Use as_bad_where instead of as_bad.
	* config/tc-m68k.c (tc_gen_reloc): Likewise.
	(md_convert_frag_1): Likewise.
2001-06-21 06:12:11 +00:00
Tom Rix 1ad63b2f00 Fix for problem with default alignment of .comm 2001-06-20 13:34:10 +00:00
Nick Clifton b99bd4efbd Restore file accidentally deleted during man page cleanup 2001-06-19 16:26:43 +00:00
Nick Clifton c45021f2d2 Remove auot generated man pages 2001-06-19 11:57:29 +00:00
Phil Blundell 2172d73b21 2001-06-18 Philip Blundell <philb@gnu.org>
* config/tc-arm.c (do_msr): Remove restriction on usage of
	immediate operands.
2001-06-19 07:33:21 +00:00
Phil Blundell 0b317b0807 2001-06-13 Philip Blundell <philb@gnu.org>
* config/tc-arm.c (thumb_shift): Improve wording of error message.
	(do_t_arit): Likewise.
2001-06-14 07:58:12 +00:00
Nick Clifton 2bc0a1288f Stop sh-coff port from trying to call dwarf2 debug functions 2001-06-13 16:46:05 +00:00
Nick Clifton e1f44d1052 Fix m68k/mri mode problems. 2001-06-12 10:35:24 +00:00
Nick Clifton 3971ce954f fix test for overlflow of literal pool 2001-06-12 08:27:53 +00:00
H.J. Lu 63486801dd 2001-06-11 H.J. Lu <hjl@gnu.org>
* NEWS: Updated for the new -n option for the MIPS assembler.

	* config/tc-mips.c (md_show_usage): Add -n.

	* doc/as.texinfo: Document the new -n option.
	* doc/c-mips.texi: Likewise.
	* doc/as.1: Regenerated.
2001-06-11 20:40:36 +00:00
Alan Modra 5dd0794dca Branch hints for Pentium4 as insn modifiers, and some minor tweaks
to formatting.
2001-06-10 14:07:12 +00:00
H.J. Lu 39c0a33100 2001-06-08 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (warn_nops): New variable. Set to 0 to
	disable warning about all NOPS that the assembler generates.
	(macro): Warn NOPS generated only if warn_nops is not 0.
	(md_shortopts): Add `n'.
	(md_parse_option): Set warn_nops to 1 for `n'.
2001-06-09 05:24:39 +00:00
H.J. Lu 268f6bed84 2001-06-08 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (mips_ip): Properly handle illegal operands.
2001-06-09 05:01:29 +00:00
H.J. Lu ea4ff978a2 2001-06-08 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (md_apply_fix): Don't adjust common
	extern/weak symbols for ELF.
	(md_estimate_size_before_relax): Treat weak like extern for
	ELF.
	(mips_fix_adjustable): Don't adjust extern/weak symbols for
	ELF.
2001-06-09 03:28:04 +00:00
Alan Modra 98aa84af0e * Makefile.am: 'som' is not wrongly spelled 'some'.
* Makefile.in: Regenerate.

	* config/tc-mips.c (mips16_mark_labels): Reduce number of calls to
	S_GET_VALUE by using a temp.
	(append_insn): Likewise, and for S_GET_VALUE too.
	(mips_emit_delays): Likewise.
	(my_getExpression): Likewise.
	(md_apply_fix): Likewise.  Use "valueT" rather than "long" for "value".
	(mips16_extended_frag): Remove code concerned with avoiding
	locking in a frag address now that symbols are not finalized until
	relaxation is complete.  Cater for first relaxation pass having
	bogus addresses.  Use relax_marker to reliably determine whether a
	symbol frag has been reached on the current pass.
2001-06-08 06:07:13 +00:00
H.J. Lu add565213d 2001-06-07 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (mips_pseudo_table): Add "extern" if
	MIPS_STABS_ELF is defined.
2001-06-07 16:52:19 +00:00