Commit Graph

1450 Commits

Author SHA1 Message Date
Ian Lance Taylor 0f616818c0 Add SH ELF support.
* configure.in (sh-*-elf*): New target.
	* config/tc-sh.h (TARGET_ARCH): Define.
	(WORKING_DOT_WORD): Define.
 	(TC_COFF_FIX2RTYPE): Only define if OBJ_COFF.
	(BFD_ARCH, COFF_MAGIC, TC_COUNT_RELOC): Likewise.
	(TC_RELOC_MANGLE, tc_coff_symbol_emit_hook): Likewise.
	(DO_NOT_STRIP, NEED_FX_R_TYPE, TC_KEEP_FX_OFFSET): Likewise.
	(TC_COFF_SIZEMACHDEP, tc_frob_file): Likewise.
	(SUB_SEGMENT_ALIGN): Likewise.
	(RELOC_32): Don't define.
	(tc_frob_file_before_adjust): Define if BFD_ASSEMBLER.
	(target_big_endian): Declare if OBJ_ELF.
	(TARGET_FORMAT): Define if OBJ_ELF.
	* config/tc-sh.c: Use BFD reloc codes instead of SH COFF reloc
	numbers throughout.
	(tc_crawl_symbol_chain): Only define if OBJ_COFF.
	(tc_headers_hook, tc_coff_sizemachdep): Likewise.
	(struct sh_count_relocs): Define.
	(sh_count_relocs): New static function, broken out of
	sh_frob_file.  Add BFD_ASSEMBLER code.
	(sh_frob_section): Likewise.
	(sh_frob_file): Call sh_frob_section.
	(md_convert_frag): If BFD_ASSEMBLER, change type of headers, and
	call section_symbol rather than seg_info (seg)->dot.
	(md_section_align): Add OBJ_ELF version.
	(SWITCH_TABLE_CONS): Define.
	(SWITCH_TABLE): Use SWITCH_TABLE_CONS.
	(md_apply_fix): Change parameter types if BFD_ASSEMBLER.  Only
	handle fx_r_type == 0 if not BFD_ASSEMBLER.  Return 0 if
	BFD_ASSEMBLER.
	(struct reloc_map): Define if not BFD_ASSEMBLER.
	(coff_reloc_map): Likewise.
	(sh_coff_reloc_mangle): Use coff_reloc_map to convert fx_r_type.
	(tc_gen_reloc): New function if BFD_ASSEMBLER.
	* write.c (write_relocs): Ifdef out fx_where test which triggers
	inappropriately for SH ELF.
	(write_object_file): Call tc_frob_file_before_adjust and
	obj_frob_file_before_adjust if they are defined.

	* write.c (write_object_file): Use BFD_RELOC_16, not
	BFD_RELOC_NONE, when calling fix_new_exp for a broken word.
1996-08-30 22:29:42 +00:00
Martin Hunt 20dbcd5c31 Fri Aug 30 14:47:38 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c (find_opcode): Fix problem with calculating
	branch sizes in across sections.
1996-08-30 21:50:52 +00:00
Jeff Law 05631de266 * config/tc-850.c (md_assemble): Handle hi() correctly. Handle
hi0() too.
Bugfix.
1996-08-30 06:44:44 +00:00
Martin Hunt e592d28fa4 Wed Aug 28 19:20:04 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c (find_opcode): Fix a bug which could generate
	the wrong opcode for cases like st2w where there are many forms
	of the same instruction.
1996-08-29 02:22:25 +00:00
Ian Lance Taylor 6fce31a64b * expr.c (operand): If md_parse_name is defined, call it before
calling symbol_find_or_make.
	* config/tc-ppc.h (md_parse_name): Define.
	(ppc_parse_name): Declare.
	* config/tc-ppc.c (reg_name_search): Add regs and regcount
	parameters.
	(register_name): Update call to reg_name_search.
	(cr_operand): New static variable.
	(cr_names): New static const array.
	(ppc_parse_name): New function.
	(md_assemble): If PPC_OPERAND_CR is set in the operand flags, set
	cr_operand before calling expression.
PR 10460.
1996-08-27 17:56:47 +00:00
Jeff Law a58b037adc * config/tc-hppa.c (tc_gen_reloc): Add new argument to
hppa_gen_reloc_type call.
Fixing a problem with -mlinker-opt.
1996-08-27 15:21:30 +00:00
Martin Hunt 3017263b68 Mon Aug 26 18:24:51 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Fixed ".word".  Fixed problem with range checking
	on addresses.  Improved error messages.
	* doc/c-d10v.texi: Added docs for register pairs.
1996-08-27 01:28:10 +00:00
Martin Hunt f9085532dd Mon Aug 26 13:39:27 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c (parallel_ok): Fix bug in parallel
	checking code.
1996-08-26 20:42:19 +00:00
Ian Lance Taylor 58275724ff * ecoff.c (init_file): Initialize fMerge to 1.
(add_file): Restore old file merging code, but only merge files if
	fMerge is set.
	(ecoff_directive_loc): Clear fMerge field of current file.
	(ecoff_generate_asm_lineno): Likewise.
1996-08-26 19:07:06 +00:00
Jeff Law 88b47a8521 * config/tc-v850.c (md_assemble): Rough cut at demanding
"ep" or "r30" in sst and sld instructions.
        (md_apply_fix3): Don't abort.  Just warn that we don't
        have relocs yet.
1996-08-23 20:58:13 +00:00
Jeff Law c9f1b2d9c7 * config/tc-v850.c (CC_NAME_CNT): Define.
(cc_name): New function.
        (md_assemble): Handle V850_OPERAND_CC correctly.
setf stuff
1996-08-23 19:01:37 +00:00
Martin Hunt b1c28263c9 Fri Aug 23 11:40:47 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* doc/c-d10v.texi: Fix typo.
1996-08-23 18:43:48 +00:00
Jeff Law d5974c571c * config/tc-v850.c (md_assemble): Don't forget to initialize
"insn"!
1996-08-23 18:19:08 +00:00
Jeff Law 0e8f9bd15e * config/tc-v850.c (reg_name_search): Generalize to search
any given register table.
        (register_name): Pass appropriate table and size to reg_name_search.
        (system_register_name): New function.
        (SYSREG_NAME_CNT): Define.
        (md_assemble): Handle operands which are system registers.
Still working on the parser..
1996-08-23 17:39:43 +00:00
Jeff Law c9a32d6ca7 * config/tc-v850.c (md_assemble): If we find a register, but the
opcode doesn't want a register, then we don't have a match.
        (md_assemble): Get size of the instruction from the opcode table.
So we choose the right opcode and so that we get the sizes right.
1996-08-23 16:43:23 +00:00
Ian Lance Taylor 8ee90d359b * configure.in: Set and substitute HLDENV.
* configure: Rebuild.
	* Makefile.in (HLDENV): New variable.
	(as.new): Use $(HLDENV).
1996-08-23 00:10:40 +00:00
Ian Lance Taylor eeef602f20 * ecoff.c (ecoff_directive_endef): Avoid a division by zero error
if an array dimension is not known.
PR 10426.
1996-08-22 21:00:36 +00:00
Martin Hunt 6be9ec8d75 Thu Aug 22 10:50:00 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Fix a reloc bug caused by my last change.
	* doc/c-d10v.texi: Cleanup.
1996-08-22 17:53:59 +00:00
J.T. Conklin c6aa56bca9 * config/tc-v850.c: New file.
* config/tc-v850.h: New file.
* configure (v850-*-elf): New target.
* configure.in (v850-*-elf): New target.
1996-08-21 23:37:04 +00:00
Martin Hunt 2c2e562634 Wed Aug 21 15:50:54 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* doc/c-d10v.texi: New file.
	* doc/all.texi: Added D10V stuff.
	* doc/as.texinfo: Added D10V stuff.
1996-08-21 22:53:14 +00:00
Martin Hunt ab457c4c0b Tue Aug 20 14:10:02 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: All references to defined symbols should
 	now use the optimal instruction.  .float and .double now work.
1996-08-20 21:15:05 +00:00
Ian Lance Taylor d4e1b0be7b * config/obj-coff.c (fixup_segment): Adjust PC relative reloc by
section address for the i960 as is done for the i386.
PR 10344.
1996-08-19 21:42:49 +00:00
Martin Hunt b98b04eadb Thu Aug 15 13:24:30 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Add additional information to the opcode
        table to help determinine which instructions can be done
        in parallel.
1996-08-15 20:26:03 +00:00
Ian Lance Taylor 126436a8ca * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust relocs
against weak symbols.
1996-08-14 17:51:49 +00:00
Ian Lance Taylor 0e94336ef5 * config/tc-ppc.h (TC_FORCE_RELOCTION): Define if OBJ_XCOFF.
(ppc_force_relocation): Declare if OBJ_XCOFF.
	* config/tc-ppc.c (ppc_force_relocation): New function if
	OBJ_XCOFF.
1996-08-14 01:02:04 +00:00
Ian Lance Taylor 817e4f757f * config/tc-mips.h (BYTE_ORDER): Don't define. No longer used. 1996-08-12 23:51:25 +00:00
Martin Hunt f494d50348 Fri Aug 9 17:48:28 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Fix problem with relocs.
1996-08-10 00:50:28 +00:00
Ian Lance Taylor 8d07d2c915 * config/tc-sh.c (sh_do_align): If not BFD_ASSEMBLER, always align
with nops if not in data_section or bss_section.
PR 10312.
1996-08-09 18:16:54 +00:00
Ian Lance Taylor f649d525ed Thu Aug 8 12:32:56 1996 Klaus Kaempf <kkaempf@progis.de>
Add support for openVMS/Alpha.
	* as.h (PRINTF_LIKE): Don't define if VMS, for now.
	* config/obj-evax.c: New file.
	* config/obj-evax.h: New file.
	* config/tc-alpha.c: Add support for EVAX format if OBJ_EVAX is
	defined.
	* config/tc-alpha.h: Add support for EVAX format if OBJ_EVAX is
	defined.  Add case for bfd_target_evax_flavour.
	* config/vms-a-conf.h: New file.
	* conf-a-gas.com: New file.
	* configure.in: Add target alpha-*-*vms*.
	* configure: Rebuild.
	* makefile.vms: New file.
	* read.c (s_lcomm): Align bss_seg on 8 byte boundary if OBJ_EVAX.
	Don't call ffs on openVMS/Alpha.
1996-08-08 16:42:41 +00:00
Ian Lance Taylor d10df990c7 * symbols.c (resolve_symbol_value): Handle addition or subtraction
by a constant before entering the main switch.  Reject attempts to
	apply an arithmetic function to non-absolute symbols, except for
	the special case of subtraction of two symbols in the same
	section.
1996-08-07 20:13:50 +00:00
Ian Lance Taylor 5cece52677 Wed Aug 7 14:19:03 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* configure.in: Make GAS_CHECK_DECL_NEEDED include <string.h> or
	<strings.h> if they exist.  Call GAS_CHECK_DECL_NEEDED on strstr
	and sbrk.
	* acconfig.h (NEED_DECLARATION_STRSTR): New macro.
	(NEED_DECLARATION_SBRK): New macro.
	* configure, conf.in: Rebuild.
	* as.h: Only include <strings.h> if HAVE_STRINGS_H.
	(strstr): Declare if NEED_DECLARATION_STRSTR.
	* as.c: If HAVE_SBRK and NEED_DECLARATION_SBRK, declare sbrk.
1996-08-07 18:23:08 +00:00
Ian Lance Taylor cf32394d07 * config/tc-mips.c (md_section_align): Do align if OBJ_ELF, but
not to more than a 16 byte boundary.
1996-08-07 17:17:33 +00:00
Ian Lance Taylor e592f0e63d * config/tc-i386.c (tc_gen_reloc): Accept all relocs; remove
#ifndef OBJ_ELF lines.  From Eric Valette <valette@crf.canon.fr>.
	(tc_gen_reloc): If out of memory call as_fatal rather than
	assert.  If no howto found, call as_bad_where rather than
	as_fatal.  Change the error message slightly.  Set howto to a
	non-NULL value in order to keep going.
1996-08-07 15:54:33 +00:00
Martin Hunt 5d9a99a79b Tue Aug 6 12:58:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Added code to support 32-bit fixups for stabs.
1996-08-06 20:00:50 +00:00
Jeff Law 6a8e003654 * config/tc-h8300.c (get_specific): New operand "size" derived
from ".b", ".w" and ".l" extensions.  All callers changed.  If
        the base instruction has no operands, then use the size to
        determine which specific instruction to use.
Fixing eepmov instructions.
1996-08-06 17:17:34 +00:00
Ian Lance Taylor 3d7b0c499b * config/tc-i960.c (mem_fmt): Call parse_expr before emit.
PR 10274.
1996-08-05 18:21:50 +00:00
Ian Lance Taylor 10a14e3639 * config/tc-mips.c (md_section_align): Don't change addr if
OBJ_ELF.
PR 10181.
1996-08-02 15:30:09 +00:00
Jeff Law 470a679caf * config/tc-hppa.c: Revert yesterday's changes.
Trying another approach to the EH problem.
1996-08-02 05:52:41 +00:00
Martin Hunt b5cf677932 Wed Jul 31 14:46:11 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Disable range checking on 16-bit values.
1996-07-31 22:00:21 +00:00
Ian Lance Taylor 159eb3c0df * config/tc-m68k.c (m68k_ip): Set ok_arch for every instruction,
not just the ones that don't match.
1996-07-31 20:29:00 +00:00
Martin Hunt 37e05f6443 Wed Jul 31 11:45:15 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Fixed bugs in short relocs and range checking.
1996-07-31 18:49:56 +00:00
Jackie Smith Cashion c479fc62f4 oWed Jul 31 15:41:42 1996 James G. Smith <jsmith@cygnus.co.uk>
* config/tc-arm.c: Changed INSN_SIZE to variable insn_size, as
 	pre-cursor to adding Thumb support. Also added cpu_variant flag
 	information to each of the asm_flg structures.
	(md_parse_option): Updated ARM7 parsing to allow 't' for
 	thumb/halfword support, aswell as 'm' for long multiply.
	(md_show_usage): Updated help message.
	(md_assemble): Check that instruction flags are applicated to the
 	current cpu variant.
	(md_apply_fix3, tc_gen_reloc): Add BFD_RELOC_ARM_OFFSET_IMM8 and
 	BFD_RELOC_ARM_HWLITERAL relocation support for new halfword and
 	signextension instructions.
	(do_ldst): Generate halfword and signextension variants if
 	mnemonic flags match.
	(ldst_extend): Do not allow shifts in the offset field of halfword
 	or signextension instructions.
	(validate_offset_imm): Provide check on halfword and signextension
 	immediate range.
	(add_to_lit_pool): Merge identical literal pool values.

Wed Jul 31 15:55:12 1996  James G. Smith  <jsmith@cygnus.co.uk>

	* gas/arm/arm7t.s: Added.
	* gas/arm/arm7t.d: Added.
	* gas/arm/arm.exp: Updated to run the new test.
1996-07-31 14:57:57 +00:00
Jeff Law 448b5aadbb * config/tc-hppa.c (selector_table): Add 'E' selector.
(cons_fix_new_hppa): Don't coke on e_esel.
        (tc_gen_reloc, SOM version): Handle R_COMP2 when used
        to help generate exception handling tables.
        (md_apply_fix): Don't try to apply fixups with an e_esel
        selector.
        (hppa_fix_adjustable): Fixups with e_esel selectors
        are not adjustable.
Another stab at EH on the PA.
1996-07-30 20:30:49 +00:00
Ian Lance Taylor 8dfb05cc95 * config/tc-sparc.c (md_pseudo_table): Add 2byte, 4byte, and 8byte
pseudo-ops.
1996-07-30 20:02:02 +00:00
Martin Hunt 8544dc0329 Fri Jul 26 11:43:03 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Added lots of error checking.  Added hacks
	to support accumulator shifts.
1996-07-26 18:52:01 +00:00
Ian Lance Taylor 5ca547dc23 * symbols.c (S_SET_EXTERNAL): Let .weak override.
(S_CLEAR_EXTERNAL): Likewise.
	(S_SET_WEAK): Remove error; just let .weak override.
1996-07-26 15:58:57 +00:00
Martin Hunt 35ad20a1a5 Thu Jul 25 15:22:51 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c (md_assemble): Now handles multiline
	instructions.
1996-07-25 22:27:17 +00:00
Martin Hunt 7c09665202 Thu Jul 25 12:03:33 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* config/tc-d10v.c: Fix packaging bug. Added range checking.
	Added kludge for divs instruction.  Fixed minor problem with
	multiple text sections.
	* config/tc-d10v.h (d10v_cleanup): Change prototype.
1996-07-25 19:14:27 +00:00
Martin Hunt 9305039104 start-sanitize-d10v
Tue Jul 23 10:49:36 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>

	* config/tc-d10v.c (md_apply_fix3): Fix all instruction
	addresses to be right-shifted by 2.

end-sanitize-d10v
1996-07-23 17:59:22 +00:00
Martin Hunt 0ef325594a start-sanitize-d10v
Mon Jul 22 11:32:36 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>

	* config/tc-d10v.c: Many changes to get relocs working.
 	(register_name): No longer creates a symbol for register names.
 	(pre_defined_registers): moved to opcodes/d10v-opc.c.
	(d10v_insert_operand): Now works correctly for either container.
	* config/tc-d10v.h (d10v_cleanup): Declare.

end-sanitize-d10v
1996-07-22 18:55:27 +00:00