Commit graph

226 commits

Author SHA1 Message Date
Ian Lance Taylor
414b2c8f7a * config/obj-elf.c (obj_elf_section): Set SEC_LOAD when using
default flag values.
1993-09-08 19:11:47 +00:00
Stan Shebs
1531386bca Add missing ifdef to make m68k-aout targets happy. 1993-09-08 00:20:59 +00:00
Stan Shebs
4064305ec0 Changes to support stabs-in-coff 1993-09-07 17:39:56 +00:00
Ken Raeburn
81b407c990 PA and ELF changes 1993-09-03 22:38:18 +00:00
Ian Lance Taylor
ff3a5c1866 Reverted previous change, and added this one instead:
* config/tc-mips.c (macro_build): Accept 'z', and ignore it.
	(macro): Use "z,s,t" for div instructions to match corresponding
	change in opcode table.
	(mips_ip): Added 'z'--must be zero register.
1993-09-02 17:19:14 +00:00
Ian Lance Taylor
1849d6464f * config/tc-mips.c (macro): If $0 is destination of divide, just
generate the simple machine instruction, for compatibility with
	the MIPS assembler.
1993-09-02 14:46:54 +00:00
Ken Raeburn
e96d50d03c write.c, configure.in changes 1993-09-01 19:58:44 +00:00
K. Richard Pixley
56607c4e13 add an alias for data section type 1993-09-01 19:20:54 +00:00
K. Richard Pixley
37d719bb44 recognize m88110 1993-08-25 23:16:39 +00:00
Ken Raeburn
2834499323 more hppa elf support from utah 1993-08-25 20:15:17 +00:00
Ian Lance Taylor
6e8dda9c46 * config/tc-mips.c (set_at): Added unsignedp argument. Use
load_register.
	(set_at_unsigned): Removed; changed callers to use set_at.
	(load_register): Removed unused ip argument.  Changed callers.
	(append_insn): Don't swap branch and branch likely.
	(macro_build): Handle 'u'.
	(load_register): Handle 64 bit constants.
	(macro): Added M_DABS, removed M_ABSU.  Numerous changes to
	support 64 bit constants.
	(mips_ip): Use hex constants in range checks for clarity.
	(md_number_to_chars): Support 8 byte values.
1993-08-23 17:04:49 +00:00
K. Richard Pixley
1e35cd8f6d comments for tc-m88k.h change 1993-08-20 23:52:35 +00:00
Ian Lance Taylor
8358c818ff * config/tc-mips.c (mips_isa): New static variable.
(md_begin): Initialize mips_isa based on TARGET_CPU.  Don't sanity
	check macros.  Set text alignment and GP size here.
	(md_assemble): Don't set text alignment and GP size here.
	(append_insn): Don't insert NOPs for load delays if mips_isa >= 2.
	Use the right mask and shift for WRITE_FPR_T and WRITE_FPR_S.  Add
	a NOP after a branch likely.
	(mips_emit_delays): Don't insert NOPS for load delays if mips_isa
	>= 2.
	(macro): Support r6000 and r4000 macros.
	(mips_ip): Check insn ISA level against mips_isa before using it.
	Added 'x' case for ignored register.
	(md_parse_option): Handle -mipsN and -mcpu=XX.
1993-08-20 15:45:50 +00:00
Ken Raeburn
c8d4cda17c tc-i386, tc-sparc, obj-elf, tc.h changes 1993-08-20 05:29:56 +00:00
Ken Raeburn
4915cac01d obj-elf, write, symbols, read changes 1993-08-18 21:21:23 +00:00
Ian Lance Taylor
19ed896035 * config/tc-mips.c (append_insn): Don't swap branch instructions
if .set nobopt or .set volatile.
	(gp_reference): .lit8 and .lit4 are accessed via the GP register.
	(macro): Added cases M_LI_S, M_LI_SS.  Fixed M_LI_D and M_LI_DD.
	(mips_ip): Added cases 'F', 'L', 'f', 'l' for floating point.
	* config/obj-ecoff.c: Renamed some variables to avoid shadow
	warnings.
1993-08-18 19:45:17 +00:00
David D. Zuhn
ae8c28f8fc use coffbfd for z8k 1993-08-16 21:17:04 +00:00
Ian Lance Taylor
0aa07269cf * config/tc-mips.c (mips_ip): Suggested by
davidj@ICSI.Berkeley.EDU (David Johnson): Don't accept symbolic
	names for 'E' and 'G' argument types (coprocessor registers) and
	don't warn if $1 is used on the coprocessor.
1993-08-12 15:52:57 +00:00
Ken Raeburn
6a9cf6fa53 * write.c (merge_data_into_text): Define only if BFD_ASSEMBLER is
defined or BFD is not.
	(relax_and_size_all_segments): Declare local variable fragP.
1993-08-09 17:40:58 +00:00
Ken Raeburn
b114e49215 changes to write.c, obj-elf.c, tc-sparc.c 1993-08-06 19:27:43 +00:00
Ian Lance Taylor
3d2330f897 * configure.in (mips-*-riscos*, mips-*-sysv*): New (untested)
targets, using ecoff and mips-big.
1993-08-06 18:46:17 +00:00
Ian Lance Taylor
ac32a7e7df * config/tc-mips.c (mips_ip): From davidj@ICSI.Berkeley.EDU (David
Johnson): Added case for 'C' for coprocessor instruction codes.
1993-08-06 15:14:31 +00:00
Ken Raeburn
273aa9471d read.c change; yesterdays elf/sparc changes 1993-08-05 17:14:11 +00:00
Ian Lance Taylor
4573d18601 * config/obj-ecoff.c: Updated for BFD ECOFF changes. Now gets the
swapping routines and external structure sizes via the
	ecoff_backend information.  No longer includes coff/mips.h.
1993-08-03 20:25:58 +00:00
Ian Lance Taylor
4c7ff23d32 * config/obj-ecoff.c (get_tag): Save tag name in permanent memory
and in hash_ptr->string.
1993-08-02 22:28:25 +00:00
Ian Lance Taylor
b4703fa618 * app.c (do_scrub_next_char): Reset state to 0 after .appline if
file name is not seen.
1993-08-02 21:39:05 +00:00
Ian Lance Taylor
ced16de6bd * write.c: Don't use short int in a prototype. 1993-07-30 05:22:12 +00:00
Ian Lance Taylor
ab4d34cd91 * expr.c (operand): Make return value simply depend on contents of
returned expression.
1993-07-30 05:06:58 +00:00
David D. Zuhn
0ccc65ec79 fix ANSI decl conflicts 1993-07-30 01:40:25 +00:00
Ian Lance Taylor
7fe1797032 * config/tc-m68k.c (m68k_ip): If we have a normal constant when we
expect a bignum, turn it into a bignum.  Output extra zeroes
	before a short bignum, rather than after.
1993-07-28 15:36:45 +00:00
Ken Raeburn
0c2734c384 symbols.c: Use DEBUG_SYMS instead of DEBUG. 1993-07-27 19:58:39 +00:00
Ian Lance Taylor
e9f108bcba mips_optimize is also affected by -g. 1993-07-27 18:36:19 +00:00
Ian Lance Taylor
4fe45d2254 * config/tc-mips.c (mips_optimize): New static variable.
(append_insn): If ! mips_optimize, don't swap branches.
	(md_parse_option): If -Ox, set mips_optimize accordingly.
1993-07-27 15:47:11 +00:00
K. Richard Pixley
de9310b92b * Makefile.in (clean): if testsuite does not exist, then skip it. 1993-07-27 01:05:23 +00:00
Ken Raeburn
7767e7e9c8 obj-elf.c, tc-sparc.c, symbols.c changes 1993-07-23 17:18:20 +00:00
Ian Lance Taylor
2a2d3d08d6 * write.c (fix_new_exp): Handle a O_uminus expression. 1993-07-23 03:32:57 +00:00
Ian Lance Taylor
e979ea0409 * expr.c (expr): Don't let absolute_section override
undefined_section for the return value.
1993-07-23 03:02:17 +00:00
Ian Lance Taylor
cf897ce253 * read.c (read_a_source_file): In NO_PSEUDO_DOT case, if we find a
pseudo-op with a poc_handler field of NULL, ignore it and treat it
	as an instruction instead.
	* config/tc-m88k.c (md_pseudo_table): Add "set" with a NULL
	poc_handler field.
1993-07-23 02:55:25 +00:00
Ian Lance Taylor
88b457e59a * config/tc-h8500.c (md_begin): Use a local variable when
initializing md_relax_table to avoid warnings about modifying a
	supposedly const data structure.
1993-07-22 19:11:48 +00:00
Brendan Kehoe
88e124608b * config/obj-aout.c: Only include aout/aout64.h if BFD_ASSEMBLER
is defined.
1993-07-22 18:00:17 +00:00
Fred Fish
86a6ada2fd * configure.in (case ${host}): Map *-*-sysv4* to gas_host=sysv.
* configure.in (case ${generic_target}):  Add i[34]86-*-sysv4*
	case to set obj_format=elf.  Must go before i386-*-sysv* case that
	sets obj_format=coffbsd.  Add *-*-sysv4* to *-*-elf and
	*-*-solaris case, and move to before *-sysv* case that wants to
	set obj_format to coff.
	* config/tc-i386.c (i386_operand): Change all 'exp.X_op' to
	'exp->X_op'.
	* config/tc-i386.c (md_apply_fix):  Fix valp to be 'valueT *' for
	BFD_ASSEMBLER case.
1993-07-22 00:43:13 +00:00
Ian Lance Taylor
2c5c299f93 * config/obj-aout.c: Include aout/aout64.h.
(obj_aout_frob_symbol): Set BSF_DEBUGGING for a constructor
	symbol, so that BFD doesn't tamper with the type.
1993-07-21 19:26:20 +00:00
Ian Lance Taylor
8ff6f40e74 * read.c (read_a_source_file): If NO_PSEUDO_DOT is defined, look
up opcodes as pseudo-ops even if they don't start with '.'.
	* config/tc-m88k.h (NO_PSEUDO_DOT): Define.
	* config/tc-m88k.c (md_assemble): Removed special pseudo-op
	handling.
	(md_apply_fix): Set fx_offset to the upper 16 bits of the reloc.
	Output the low 16 bits for RELOC_HI16, not the high 16 bits.
	* config/obj-coffbfd.c (do_relocs_for): If TC_M88K, set the
	r_offset field of the reloc to the fixup offset.
	(fixup_segments): If TC_M88K, don't warn about fixup overflows.
	* doc/as.texinfo: Minor updates.
1993-07-21 17:19:33 +00:00
Ian Lance Taylor
5ac34ac37e * Extensive changes to permit symbols to contain any expression
type and to delay the computation of the expression until the
	value is actually needed.  This permits setting symbols to values
	calculated based on object code size.  Expressions were changed to
	no longer be in a section, to stop the overloading of segment and
	expression type that previously occurred.

	* as.c (big_section, pass1_section, diff_section, absent_section):
	Removed.
	(expr_section): Added (used for dummy symbols which hold
	intermediate expression values).
	(perform_an_assembly_pass): Create expr_section, do not create the
	sections now removed.
	* as.h (segT): Removed SEG_ABSENT, SEG_PASS1, SEG_BIG, and
	SEG_DIFFERENCE.  Added SEG_EXPR.
	(SEG_NORMAL): Corresponding changes.
	* subsegs.c (seg_name, subsegs_begin): Changed accordingly.
	* write.c (write_object_file): Ditto.
	* config/obj-aout.c (seg_N_TYPE): Ditto.
	* config/obj-bout.c (seg_N_TYPE): Ditto.
	* config/obj-coff.c (seg_N_TYPE): Ditto.
	* config/obj-coffbfd.c (seg_N_TYPE): Ditto.
	* config/obj-vms.c (seg_N_TYPE): Ditto.

	* expr.h (operatorT): Moved in from expr.c, added some values.
	(expressionS): Added X_op field, removed X_seg field; renamed
	X_subtract_symbol to X_op_symbol.
	* expr.c: Extensive changes to assign expression types rather than
	sections and to simplify the parsing.
	* write.c (fix_new_internal): New static function.
	(fix_new): Removed sub_symbol argument.
	(fix_new_exp): New function, takes expression argument.
	* write.h: Prototype changes for fix_new and fix_new_exp.
	* cond.c (s_if): Changed accordingly.
	* read.c (s_lsym, pseudo_set, emit_expr, parse_bitfield_cons,
	parse_repeat_cons, get_segmented_expression,
	get_known_segmented_expression, get_absolute_expression): Ditto.
	* symbols.c (resolve_symbol_value, S_GET_VALUE, S_SET_VALUE):
	Ditto.
	* write.c (write_object_file): Ditto.
	* config/obj-coff.c (obj_coff_def, obj_coff_val): Ditto.
	* config/obj-coffbfd.c (obj_coff_def, obj_coff_val,
	obj_coff_endef, yank_symbols): Ditto.
	* config/obj-elf.c (obj_elf_stab_generic, obj_elf_size): Ditto.
	* config/tc-a29k.c (md_assemble, parse_operand, machine_ip,
	print_insn, md_operand): Ditto.
	* config/tc-h8300.c (parse_exp, colonmod24, check_operand,
	do_a_fix_imm, build_bytes): Ditto.
	* config/tc-h8500.c (parse_exp, skip_colonthing, parse_reglist,
	get_specific, check, insert, md_convert_frag): Ditto.
	* config/tc-hppa.c (the_insn, fix_new_hppa, cons_fix_new_hppa,
	md_assemble, pa_ip, getExpression, getAbsoluteExpression,
	evaluateAbsolute, pa_build_unwind_subspace, pa_entry,
	process_exit): Ditto.
	* config/tc-hppa.h (STAB_FIXUP, is_DP_relative, is_PC_relative,
	is_complex): Ditto.
	* config/tc-i386.c (pe, md_assemble, i386_operand,
	md_estimate_size_before_relax, md_create_long_jump): Ditto.
	* config/tc-i860.c (md_assemble, getExpression, print_insn):
	Ditto.
	* config/tc-i960.c (parse_expr, subs, segs, md_convert_frag,
	get_cdisp, mem_fmt, parse_ldconst, relax_cobr, s_sysproc,
	i960_handle_align): Ditto.
	* config/tc-m68k.c (struct m68k_exp, struct m68k_it, seg, op,
	subs, add_fix, isvar, m68k_ip, md_assemble, md_convert_frag_1,
	md_estimate_size_before_relax, md_create_long_jump, get_num):
	Ditto.
	* config/tc-m88k.c (md_assemble, get_imm16, get_pcr,
	md_create_short_jump, md_create_long_jump): Ditto.
	* config/tc-mips.c (md_assemble, append_insn, gp_reference,
	macro_build, macro, my_getExpression): Ditto.  Also removed
	get_optional_absolute_expression; just use get_absolute_expression
	instead.
	* config/tc-ns32k.c (get_addr_mode, evaluate_expr, convert_iif,
	fix_new_ns32k, fix_new_ns32k_exp, cons_fix_new_ns32k): Ditto.
	* config/tc-ns32k.h (fix_new_ns32k prototype): Ditto.
	* config/tc-sh.c (parse_exp, check, insert, md_convert_frag):
	Ditto.
	* config/tc-sparc.c (md_assemble, sparc_ip, getExpression,
	print_insn): Ditto.
	* config/tc-tahoe.c (struct top, md_estimate_size_before_relax,
	tip_op, md_assemble): Ditto.
	* config/tc-vax.c (seg_of_operand, md_assemble,
	md_estimate_size_before_relax, md_create_long_jump): Ditto.
	* config/tc-z8k.c (parse_exp, check_operand, newfix): Ditto.
1993-07-21 00:41:42 +00:00
David D. Zuhn
84873870d7 add i386-lynx support 1993-07-20 19:18:13 +00:00
Ken Raeburn
623d6e9ab8 various changes 1993-07-19 20:05:41 +00:00
Ian Lance Taylor
ce2ad89aca * config/tc-m68k.c (m68k_ip_op): Don't decrement strend when
calculating opP->isiz; this permits the expression size to be
	determined as well, later on.

Fixes PR 2911.
1993-07-19 19:13:30 +00:00
Ian Lance Taylor
ffffc8fb5c * expr.c (clean_up_expression): Don't cancel the subtraction of
undefined symbols.

Fixes PR 2997.

	* read.c (s_data), config/obj-coffbfd.c (obj_coff_data): If -R,
	switch to text section rather than data section.

Fixes PR 2971.
1993-07-19 18:46:39 +00:00
Ken Raeburn
9d4dfbf379 fix net-equip pr 2975: tm-m68k.c(m68k_ip): adjust for pc-rel offset before using value, not after 1993-07-19 16:49:01 +00:00
Ian Lance Taylor
1e9cf56586 * read.c (float_cons): Simplified parsing logic. If
REPEAT_CONS_EXPRESSIONS is defined, accept a repeat count.

	* symbols.c (colon): Rather than a special case for TC_HPPA,
	use new macro tc_frob_label.
1993-07-16 16:26:03 +00:00