Commit graph

846 commits

Author SHA1 Message Date
Steve Chamberlain
2493403561 * config/tc-z8k.c (get_specific, built_bytes): Understand all the
aspects of lda.
1993-10-25 18:19:16 +00:00
Ian Lance Taylor
9b2fd75ba1 * config/tc-sparc.c (sparc_ip): Use strtol to parse membar
argument, to permit hexadecimal numbers.
1993-10-25 18:08:33 +00:00
Ken Raeburn
84678d1690 doc/Makefile.in, write.c, config/tc-sparc.* changes 1993-10-25 17:51:05 +00:00
Ken Raeburn
84fa9814e9 * write.c (write_relocs): For relocs that are pc_relative and
pcrel_offset and not partial_inplace, adjust reloc->addend to
	compensate for a bfd_perform_relocation bug.
1993-10-25 17:49:24 +00:00
Ken Raeburn
9b6a882eeb * config/tc-sparc.h: Removed remaining non-BFD_ASSEMBLER code.
* config/tc-sparc.c: Ditto.
(tc_gen_reloc): Include fx_offset for pcrel fixups.
1993-10-25 17:45:17 +00:00
Ken Raeburn
4a350ee6b2 bunch of changes... 1993-10-25 16:48:51 +00:00
Ken Raeburn
1c7b72b373 keep diff1.s 1993-10-25 16:48:30 +00:00
Ken Raeburn
b59797d28a new test case for relocations with addends 1993-10-25 16:46:55 +00:00
Ken Raeburn
24f1de41a7 keep pic1.s 1993-10-25 16:45:26 +00:00
Ken Raeburn
761fa67d6f test case for relocations with addends 1993-10-25 16:40:44 +00:00
Ken Raeburn
49647ad595 keep new sun4 dir 1993-10-25 16:39:21 +00:00
Jim Wilson
52aa70b52d Add support for .dword pseudo op to mips port. 1993-10-24 23:52:09 +00:00
David D. Zuhn
ab0751c895 use lowercase "format" instead of Format/format 1993-10-24 05:25:35 +00:00
Ian Lance Taylor
8efed14f10 * input-scrub.c (physical_input_file, logical_input_file,
physical_input_line, logical_input_line): Made static.
	(as_where): Return current file name and line number, don't print
	them out.
	* messages.c (as_show_where): New static function.  Other
	functions use it instead of as_where.
	(as_bad_internal): New static function.
	(as_bad): Use as_bad_internal.
	(as_bad_where): New function, like as_bad but taking a file name
	and line number.
	* as.h (as_bad_where): Declare.
	(as_where): Change prototype for new arguments.
	* write.h (fixS): Added fields fx_file and fx_line.
	* write.c (fix_new_internal): Save file and line number in fix.
	(fixup_segment): Use as_bad_where, not as_bad.
	* input-file.c (f_in, file_name): Made static.
	* cond.c (struct file_line): Just use file and line fields.
	(s_else): Use as_where and as_bad_where, not get_file_line and
	set_file_line.
	(get_file_line, set_file_line): Removed.
	* listing.c (listing_newline): Use as_where.
	* config/obj-coffbfd.c (obj_coff_init_stab_section): Use as_where.
	* config/obj-ecoff.c (add_file): Use as_where.
	* config/obj-elf.c (obj_elf_init_stab_section): Use as_where.
	* config/tc-m68k.c (md_apply_fix_2): Use as_bad_where.
	* config/tc-mips.c (tc_gen_reloc): Use as_bad_where, not assert.
1993-10-22 19:15:20 +00:00
Ken Raeburn
efa0c22e67 Various arious PA changes from Utah.
V9 bugfix.
See changelog...
1993-10-21 20:03:19 +00:00
Ken Raeburn
2d4f509a1f delete some code in "#if 0" 1993-10-21 19:55:01 +00:00
Ian Lance Taylor
7766838e96 * config/tc-sparc.c (md_parse_option): Accept and ignore -sparc
option, which is used by the SunOS make default .s.o rule.
1993-10-21 19:50:57 +00:00
Ken Raeburn
8cac6ca6e2 Set bfd_gas for all sparc targets. Added facility for keeping or rejecting
configurations still under development; default is to assume production
environment, and reject configs still being worked on.  Mark Elf configurations
(except sparc and i386) as developmental.  Deleted cases matching some generic
names in favor of more specific names.  (E.g., when we get Alpha
support, we'll still only support VMS for Vax.)
1993-10-21 19:50:06 +00:00
Ken Raeburn
9971d72545 new test m68k/pic1.s - simple pic code generation 1993-10-20 15:51:24 +00:00
Ken Raeburn
82a69c1720 new test diff1.s - difference of two undefined symbols (should be rejected) 1993-10-20 15:50:04 +00:00
Ken Raeburn
0b63552c67 * Makefile.in (OBJDUMP_FOR_TARGET): Define similar to AS_FOR_TARGET.
(check): Don't pass ASFLAGS variable.
(site.exp): Put ASFLAGS, OBJDUMP, OBJDUMPFLAGS into site.exp.
1993-10-20 15:47:59 +00:00
Ken Raeburn
726b30ba28 Makefile.in (OBJDUMP_FOR_TARGET): Define similar to AS_FOR_TARGET.
(check): Don't pass ASFLAGS variable.
(site.exp): Put ASFLAGS, OBJDUMP, OBJDUMPFLAGS into site.exp.

From Jeff Law:

lib/gas-defs.exp (objdump_start, objdump_finish): New functions
so that tests can parse the output of objdump looking for errors
in relocation entires, file headers and the like.
1993-10-20 15:38:42 +00:00
Ian Lance Taylor
dff60b7d48 * config/tc-m68k.h (AOUT_MACHTYPE): Define to be external variable
m68k_aout_machtype.
	* config/tc-m68k.c (omagic): Remove obsolete and unused variable.
	(m68k_aout_machtype): New variable, if OBJ_AOUT.
	(md_assemble): Initialize m68k_aout_machtype based on
	current_architecture, if OBJ_AOUT.
	(md_parse_option): Remove obsolete reference to omagic.
1993-10-19 22:18:15 +00:00
Ian Lance Taylor
dd3f1f765f * config/tc-mips.c (md_pseudo_table): Ignore .livereg pseudo-op.
(s_option): Ignore .option O* and .option pic*.
	(s_ent): Skip whitespace between symbol and optional digit.
1993-10-14 21:06:52 +00:00
Ian Lance Taylor
5450813848 * app.c (do_scrub_next_char): Always accept 'x' and 'X' as escape
characters in state 6.
	* read.c (next_char_of_string): Accept \Xh* and \xh* where h* are
	hexidecimal digits.
1993-10-14 21:03:14 +00:00
Ian Lance Taylor
c17cd70926 * config/tc-i386.c (md_apply_fix_1): Make cross segment calls work
for ELF by hacking around bizarre bfd_perform_relocation behaviour
	that I don't dare change.
1993-10-14 20:54:09 +00:00
Ian Lance Taylor
ad660eb164 Thu Oct 14 11:33:25 1993 Michael Meissner (meissner@osf.org)
* config/tc-i386.c: (md_begin): Do not zero static arrays.  Don't
	call strchr for each character to see if it is a special char,
	instead add a second loop over special_chars.  Set alignment
	of text, data and bss sections to 4.
	(pi, te, pt, pe, ps): Add declarations so that DEBUG386 can be
	used again.
	(reloc): Don't return 8 and 16 bit non-PC relative relocations on
	ELF, since the ELF object format does not have these type of
	relocations.  Change the abort into as as_bad and return
	BFD_RELOC_NONE to silence compiler warnings.
	(md_assemble): Keep track of the instruction size.  Allow white
	space between the $ and the constant for compatibility with older
	gases and other assemblers.
	(i386_operand): Skip spaces between $ and expression.
	(tc_gen_reloc): Don't allow anything but 32 bit relocations on
	ELF.  Convert abort into an as_bad and assert into as_fatal.
1993-10-14 15:41:52 +00:00
Ken Raeburn
132239bfda obj-coffbfd change for wellfleet pic 1993-10-13 20:54:54 +00:00
Ken Raeburn
56f61233b2 * config/obj-coffbfd.c (fixup_segment) [DIFF_EXPR_OK]: If
sub_symbolP is in the current segment, convert to a PC-relative
	fixup and discard the symbol.
(Copied from write.c.)
1993-10-13 20:54:03 +00:00
Ian Lance Taylor
463b185190 * config/obj-ecoff.c (ecoff_build_symbols): Handle st_End symbol
for st_StaticProc just like st_Proc.
1993-10-13 18:53:03 +00:00
Ian Lance Taylor
b7cbb59ff6 * write.c (relax_and_size_all_segments): Moved #endif for OBJ_BOUT
so that OBJ_BOUT doesn't forget to adjust all the fragments in the
	.bss section.

Fixes critical PR 3600.
1993-10-13 18:04:53 +00:00
Ian Lance Taylor
f2a663d3a3 * config/tc-mips.c: If OBJ_ELF, include elf/mips.h.
(mips_regmask_frag): New static variable, if OBJ_ELF.
	(md_begin): If OBJ_ELF, create .reginfo section and set
	mips_regmask_frag to a frag.
	(mips_elf_final_processing): New function, if OBJ_ELF.  Set
	mips_regmask_frag to register mask information.
	* config/tc-mips.h (elf_tc_final_processing): New macro, defined
	if OBJ_ELF.
1993-10-12 21:31:29 +00:00
Ken Raeburn
2145a18385 messages.c (as_fatal): use myname in printed message 1993-10-12 15:48:22 +00:00
Ken Raeburn
9902404797 more null/empty string fixups 1993-10-12 08:45:49 +00:00
Steve Chamberlain
2dd4520949 fix for pr 3571
* config/tc-h8300.c (get_specific): Special action if 8 bit
	address seen. (check_operand): Don't complain if truncating top
	bits of an 8 bit address.  (build_bytes): Allow an immediate and
	an absolute in the same insn.
1993-10-11 23:48:55 +00:00
Ian Lance Taylor
f37449aaf3 * write.c (write_contents): Don't crash if seginfo is NULL.
* config/obj-ecoff.c (ecoff_frob_file): Write out register masks
	by modifying .reginfo section, not by directly modifying BFD
	backend data.
1993-10-11 21:40:10 +00:00
David D. Zuhn
fec552ce18 remove extern time() decl 1993-10-11 21:12:37 +00:00
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
d0c25cae81 Keep te-lynx.h 1993-09-28 20:20:27 +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