Commit graph

254 commits

Author SHA1 Message Date
Ken Raeburn
8d3be8030e * messages.c (as_fatal): Do mention that it's the assembler that
got the fatal error.
1993-10-11 20:17:28 +00:00
Ian Lance Taylor
1aa6938eb3 * config/tc-mips.c (mips_gprmask, mips_cprmask): New variables to
hold register masks.
	(md_begin): Initialize them to zero.
	(append_insn): Update mips_gprmask and mips_cprmask.  Also add
	register variables pinfo and prev_pinfo.
	* config/tc-mips.h (mips_gprmask, mips_cprmask): Declare.
	* config/obj-ecoff.c (ecoff_frob_file): If TC_MIPS, set gprmask
	and cprmask from mips_gprmask and mips_cprmask.
1993-10-08 20:01:10 +00:00
Ian Lance Taylor
8822543394 * config/tc-mips.h: Define TARGET_FORMAT if OBJ_ELF.
* config/tc-mips.c (GPOPT): Define if OBJ_ECOFF or OBJ_ELF.
	(various): Change all references to GP references to apply if
	GPOPT, not if OBJ_ECOFF.
	(s_change_sec): Rearrange somewhat.  If OBJ_ELF, use .rodata
	instead of .rdata.  If OBJ_ELF, set section flags for .rodata and
	.sdata sections.
	(s_frame, s_loc, s_mask): Comment out entire functions, rather
	than just body.  They're not used anyhow.
	* configure.in: Set cpu_type to mips for mips*.  Accept
	mips-*-elfl* and mips-*-elf*.
1993-10-08 18:24:41 +00:00
Ian Lance Taylor
17a0da33ca Thu Oct 7 18:36:29 1993 Michael Meissner (meissner@osf.org)
* config/obj-elf.c (obj_elf_common): Allow the alignment field to
	not be specified.
1993-10-08 17:15:03 +00:00
Ian Lance Taylor
abdad6bc5f * config/tc-mips.c (cons_fix_new_mips): New function. Turn
BFD_RELOC_64 into BFD_RELOC_32.
	* config/tc-mips.h (TC_CONS_FIX_NEW): Define.
	(cons_fix_new_mips): Declare.
1993-10-06 18:36:20 +00:00
Ian Lance Taylor
80aab57939 Changes to let cons handle bignums like general expressions.
* expr.h (expressionS): New field X_unsigned.
	* expr.c (operand): Initialize X_unsigned to 1.  Set it to 0 for
	unary minus case.
	(expr) Fix typo resultP to right if missing operand.  Set
	X_unsigned to 1 when building new expression.
	* read.c (potable): Make "octa" and "quad" call cons, not
	big_cons.
	(cons): Handle bignums.  If given an O_constant (small integer) to
	fill a big space, turn it into a bignum.
	(parse_bitfield_cons): Set X_unsigned field.
	(bignum_low, bignum_limit, bignum_high, grow_bignum, big_cons):
	Removed.
	* read.h (big_cons): Remove prototype.
	* symbols.c (resolve_symbol_value): Don't give a warning if a
	symbol in expr_section can not be resolved.
	(S_SET_VALUE): Clear X_unsigned.
	* write.c (write_object_file): If resolve_symbol_value failed on a
	symbol we are writing out, give a warning.
	* config/tc-h8500.c (parse_reglist): Set X_unsigned.
	* config/tc-hppa.c (md_pseudo_table): Change "octa" and "quad" to
	call pa_cons, not pa_big_cons.
	(pa_big_cons): Remove.
	* config/tc-hppa.h (pa_big_cons): Remove declaration.
	* config/tc-i960.c (md_pseudo_table): Change "quad" to call cons,
	not big_cons.
1993-10-06 17:31:31 +00:00
Ian Lance Taylor
4f5666c520 * read.c (big_cons): Handle "0" correctly.
* config/tc-mips.c (md_begin): Set target_big_endian correctly.
1993-10-04 21:13:48 +00:00
Ken Raeburn
31909d4099 configure.in: Alphabetize list of cpu type alternatives. Enable OS values of
"linux*elf*" and "linux*coff*" to select those formats, with linux emulation.
Don't bother checking for upper- or mixed-case versions of "ose".
1993-10-04 20:17:30 +00:00
Ken Raeburn
8208ab5a91 tc-m68k.c change 1993-10-04 20:10:50 +00:00
K. Richard Pixley
6cc87fbb75 correct a few mistakes found while extending the dissassembler. 1993-09-29 23:18:06 +00:00
Stan Shebs
8f3956b328 More Lynx support, plus better stabs-in-coff generation. 1993-09-28 19:22:08 +00:00
Ken Raeburn
43029a8f84 Whitespace/comment cleanup. Use PARAMS in tc-vax.c.
Make various routines return null pointer instead of empty string for
success indication.
1993-09-28 04:47:32 +00:00
Ken Raeburn
b9790da889 expr.c (expr) [DIFF_EXPR_OK]: Permit subtraction of symbols in different segs. 1993-09-27 04:23:13 +00:00
Ken Raeburn
b7318ac442 some 68k pic stuff 1993-09-27 03:57:58 +00:00
Ken Raeburn
c996b1994e minor tc-m68k.c changes 1993-09-25 09:32:32 +00:00
K. Richard Pixley
58f3e8a9db * config/tc-m88k.c (get_o6): new function.
(get_bf, get_cmp, get_cnd, get_cr, get_fcr, get_imm16, get_reg,
	  get_vec9, getval, get_pcr, calcop, match_name): make static and
	  prototype.
	  (s_file): remove extraneous forward decl.
	  (md_begin): add const to retval decl.
	  (calcop): cope with instructions without arguments.  Handle 'o'
	  type argument, the o6 field of the prot insn.
	  (md_estimate_size_before_relax): return a dummy value.
1993-09-24 19:47:59 +00:00
K. Richard Pixley
6d6b97b749 * config/m88k-opcode.h (m88k_opcodes): comment change; o6 field is
in bits 10 through 7.  flt.[dxs]s requires an r register in the
	  second argument.  New instruction lda.x.  New instruction muls
	  (alias for mul).
1993-09-24 19:41:51 +00:00
Ken Raeburn
6110df28cd obj-coffbfd relax_align change 1993-09-23 17:24:51 +00:00
Ian Lance Taylor
9bd0d6499c * read.c (get_stab_string_offset): Make non-static. Make
arguments const.  Don't align strings to 4 byte boundaries.
	* read.h: Declare get_stab_string_offset.
	* config/obj-elf.c (obj_elf_section): Set SEC_ALLOC as well as
	SEC_LOAD for progbits section.
	(obj_elf_init_stab_section): New function.
	(adjust_stab_sections): Add casts to avoid warnings.
	* config/obj-elf.h (INIT_STAB_SECTION): Call
	obj_elf_init_stab_section.
	(OBJ_PROCESS_STAB): Removed definition.
1993-09-20 23:29:42 +00:00
Ian Lance Taylor
80903ca67b * config/obj-elf.h (S_GET_SIZE): Define.
(obj_frob_forward_symbol): Define.
	* config/tc-i386.c (line_comment_chars): Initialize in all cases.
1993-09-17 22:16:29 +00:00
Ian Lance Taylor
1399802122 * tc.h: Declare tc_gen_reloc differently depending upong
RELOC_EXPANSION_POSSIBLE.
	* config/obj-elf.c (obj_elf_section): Only set flags when first
	creating the section.
1993-09-16 18:26:36 +00:00
Ian Lance Taylor
90397ff823 * config/obj-elf.c (obj_elf_data, obj_elf_text): New functions;
set previous_section and previous_subsection and then call s_data
	and s_text, respectively.
	(obj_pseudo_table): Add data and text.
	(obj_elf_section): Add SEC_LOAD to default initialization of
	flags.  Treat .rodata1 like .rodata.  Set SEC_LOAD as well as
	SEC_ALLOC for "alloc" string.  Don't bother trying to find the
	section; just use subseg_new.
1993-09-14 22:28:22 +00:00
Ian Lance Taylor
4f0bccc7d8 Some more gcc lint, and:
* read.c (change_to_section): Removed.  This is now done by
	subseg_new.
	(get_stab_string_offset): Rearranged somewhat.  Create the section
	using subseg_new.  Store the string index in seg_info, rather than
	in a static variable.  Force the first string to be empty.  Use
	frag_more rather than FRAG_APPEND_1_CHAR.
	(s_stab_generic): Rewrote.
	* subsegs.h (segment_info_type): Added stabu union.
	* subsegs.c (subseg_new): Initialize stab_string_size to 0.
	* config/obj-aout.c: Don't include aout/stab_gnu.h.
	(obj_aout_stab, obj_aout_desc): Removed.
	(obj_pseudo_table): Removed desc and stabX entries.
	* config/obj-bout.c: Same changes as config/obj-aout.c.
	* config/obj-bout.h (S_SET_TYPE): Define.
	(tc_bout_fix_to_chars): Declare.
	* config/obj-coff.c (obj_coff_stab): Removed.
	(obj_pseudo_table): Removed desc and stabX entries.
	* config/obj-coff.h (SEPARATE_STAB_SECTIONS): Define.
	* config/obj-coffbfd.c (current_stab_symbol): Removed.
	* config/obj-coffbfd.h (obj_symbol_type): Removed n_strx, n_type,
	n_other, n_desc and n_value fields.
	(S_{S,G}ET_{OFFSET,OTHER,TYPE,DESC}): Removed.
	(MAKE_STAB_SYMBOL): Removed.
	* config/obj-ecoff.c (obj_ecoff_stab): Renamed to ecoff_stab.
	Changed arguments and removed parsing code.
	(obj_pseudo_table): Removed stabX entries.
	* config/obj-ecoff.h (ecoff_stab): Declare.
	(OBJ_PROCESS_STAB): Define.
	* config/obj-elf.c: Don't include aout/stab_gnu.h.
	(obj_elf_stab, obj_elf_xstab, obj_elf_desc,
	elf_stab_symbol_string, elf_stab_symbol, obj_elf_stab_generic):
	Removed.
	(obj_pseudo_table): Removed desc, stabX and xstabs entries.
	(obj_elf_version): Use subseg_new, not bfd_make_section.  Don't
	set SEC_LOAD for .note section.
	(adjust_stab_sections): Get frag pointer from seg_info, rather
	than looking through frags.
	* config/obj-elf.h (S_{S,G}ET_{OTHER,TYPE,DESC}): Removed.
	(SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB):
	Define.
	* config/obj-vms.c (obj_aout_stab): Removed.
	(obj_pseudo_table): Removed stabX entries.
	* config/obj-vms.h (S_SET_TYPE): Define.
1993-09-14 17:58:35 +00:00
Ian Lance Taylor
604633aeca * subsegs.c: Renamed non-BFD_ASSEMBLER subseg_new to subseg_set.
Wrote non-BFD_ASSEMBLER subseg_new.  Now subseg_new always takes a
	section name, and subseg_set always takes a segT.  Changed all
	callers as appropriate.
	* config/obj-coffbfd.c 	(change_to_section): Renamed to
	obj_coff_add_segment.  Corrected.  Made callers use subseg_new.
	* config/obj-coffbfd.h (obj_segment_name, obj_add_segment):
	Define.

Also some more gcc warning removal.
1993-09-13 21:32:07 +00:00
David Edelsohn
54e3e909d2 config/tc-sparc.h (LOCAL_LABEL): Remove test for name[0] == 'L'. 1993-09-13 20:16:03 +00:00
Ian Lance Taylor
58d4951d00 gcc lint. See ChangeLog for details. Also:
* config/obj-elf.h (S_SET_SIZE): Actually set the size.
1993-09-10 16:01:07 +00:00
Ken Raeburn
892a3ff190 gcc -Wall cleanups from Utah 1993-09-09 21:53:03 +00:00
Ian Lance Taylor
abdd08c97c * read.c (get_stab_string_offset, s_stab_generic): If
BFD_ASSEMBLER, call subseg_set rather than subseg_new.
1993-09-09 19:09:23 +00:00
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