Commit Graph

1257 Commits

Author SHA1 Message Date
Ian Lance Taylor 5f757edc84 * Makefile.in (EXPECT): New variable.
(CHECKFLAGS): Remove.
	(site.exp): New target.
	(check): Rewrite to invoke runtest directly, rather than recurring
	down into testsuite.
	(clean-here): Remove testsuite directory.
	(clean, distclean): Don't recur into testsuite.
	* configure.in: Don't call AC_CONFIG_SUBDIRS(testsuite).
	* configure: Rebuild.
1995-09-13 20:35:17 +00:00
Ian Lance Taylor f00f5ecd1d * write.c (relax_and_size_seg): Change to the segment we are
relaxing, in case md_convert_frag, called by cvt_frag_to_fill,
	wants to call fix_new.
	* config/tc-m68k.c (m68k_ip): Permit PC relative code if the
	segment of the symbol is the current segment, not just in
	text_section.
	(md_convert_frag_1): Don't call subseg_change.
	(md_estimate_size_before_relax): Likewise.
1995-09-13 17:19:27 +00:00
David Edelsohn 58a4f585f7 * config/tc-arm.c (md_atof): Fix debugging printf, and leave it
out by default.
1995-09-12 17:39:15 +00:00
Ian Lance Taylor 812e4a9bc2 * doc/configure.in: Remove unused file. 1995-09-11 20:53:46 +00:00
Ian Lance Taylor 33bd5d6153 * app.c (do_scrub_chars): Grab all available spaces at start of
line before preserving a single space.  Remove state == 0 test
	which will never succeed.
	* macro.c (macro_expand_body): Delete local variables from the
	formal hash table.
	(macro_expand): In MRI mode, stop when whitespace is seen in the
	argument list.
1995-09-11 18:34:55 +00:00
Ian Lance Taylor e325f98f13 * sb.c: Include "libiberty.h".
* macro.c: Likewise.  Also include <stdlib.h> if it exists.
1995-09-11 15:48:13 +00:00
Ian Lance Taylor 92a25e12ff * app.c (do_scrub_chars): In MRI mode, keep a space before a
possible comment character.
	* config/tc-m68k.c (m68k_ip): In MRI mode, ignore anything after
	an instruction which takes no operands.
1995-09-08 19:17:46 +00:00
Ian Lance Taylor 138b11d825 * Makefile.in (install): Don't install gasp in $(tooldir). 1995-09-08 18:43:50 +00:00
Ian Lance Taylor ee14a559e3 * config/tc-mips.c (macro): Handle a non zero base register for
M_U{L,S}{D,W,H}_A.
PR 7947.
1995-09-08 05:06:45 +00:00
Ian Lance Taylor 1359db1b8c * gasp.c (show_usage): Put program_name argument in first fprintf,
not second.
1995-09-08 04:30:24 +00:00
Ian Lance Taylor 3dce804d95 * expr.c (operand): Handle 08 and 09 in MRI mode.
* macro.c (ISSEP): Remove duplicated `"' character.
 	(get_any_string): Copy some characters for which ISSEP is true:
	';', '>', '(', ')'.  Otherwise we can get in an infinite loop.
	* read.c (s_space): In MRI mode, the expressions stop at the first
	unquoted space.
	(cons_worker): In MRI mode, restore the terminating character at
	the end of the function.
1995-09-07 21:54:13 +00:00
Ian Lance Taylor 94a7312289 * read.c (cons_worker): Don't use #elif; old compilers don't
support it.
1995-09-07 16:35:37 +00:00
Ian Lance Taylor 86038ada17 * app.c (do_scrub_chars): In MRI mode, silently end quoted strings
at newline characters.  In MRI mode, always keep spaces in the
	operands field.  In MRI mode, treat a line comment character as a
	regular comment character following a space.
	* cond.c (ignore_input): Use strncasecmp rather than strncmp when
	looking for special pseudo-ops.
	* read.c (cons_worker): In MRI mode, the expressions stop at the
	first unquoted space.
	(equals): Likewise.
1995-09-07 01:17:16 +00:00
Stan Shebs dcf62f7359 * config/tc-mips.c: Remove CYGNUS LOCAL comments.
(md_begin): Use 0/1 instead of TRUE/FALSE.
	(md_show_usage): Break up long format string for the benefit
	of lame compilers.
	* config/tc-m68k.c (md_show_usage): Ditto.
	* gasp.c (show_usage): Ditto.
	* macro.c (check_macro): Cast result of hash_find.
1995-09-06 00:33:55 +00:00
Ken Raeburn 0ee4870895 * configure.in: When testing for a free() declaration in system header files,
cast the address to a function pointer, not to an integer.

* write.c (fix_new_internal): Call TC_INIT_FIX_DATA if TC_FIX_TYPE is defined.
Don't initialize fx_bsr.  Verify that fx_size field is wide enough to hold
stored value.
* write.h (struct fix): Change tc_fix_data to type TC_FIX_TYPE if that is
defined, otherwise omit it.  Delete fx_bsr.  Change fx_size to unsigned char.
* config/tc-i960.h (TC_FIX_TYPE, fx_bsr, TC_INIT_FIX_DATA): New macros.
* config/tc-ns32k.h (TC_FIX_TYPE, fx_bsr, TC_INIT_FIX_DATA): New macros.
* config/tc-hppa.h (TC_FIX_TYPE): Define as PTR.

* config/tc-i860.c (md_apply_fix): Delete code for checking fx_im_disp, and for
handling non-zero values, since it never gets set after being initialized to
zero.

* write.h (struct fix): Make fx_im_disp always 2 bits, since the only tc-*
files actually using it need that much.

NS32K changes from Ian Dall:
* configure.in: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
ns32k-pc532-lites* like ns32k-pc532-netbsd*.
* config/tc-ns32k.h (LOCAL_LABELS_FB): Define to 1.
1995-09-05 22:36:41 +00:00
Jackie Smith Cashion 8343d9d806 This change does not affect the MIPS instruction assembly. It is
present only to stop gas complaining when gcc passes through the
"-mcpu=vr4300" switch.

Fri Sep  1 08:20:19 1995  James G. Smith  <jsmith@beauty.cygnus.com>

        * config/tc-mips.c (md_parse_option, md_begin, md_show_usage):
        Add support for "-mcpu=vr4300" as processor identifier.
1995-09-01 15:22:29 +00:00
Steve Chamberlain 305a3af6e3 Thu Aug 31 16:41:06 1995 steve chamberlain <sac@slash.cygnus.com>
* write.c (fixup_segment): Remove change of 29th.
	* config/tc-{i386,arm}.h (TC_FORCE_RELOCATION): Keep RVA relocs.
1995-08-31 23:46:47 +00:00
Ian Lance Taylor f2f232cde2 Tue Aug 29 19:42:58 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* config/tc-m68k.c (m68k_ip) [case POST/PRE/BASE]: Fix typo when
 	looking at outer displacement.  Don't set the postindex bit if the
 	index suppress bit is set (for memory indirect addressing mode).
1995-08-31 17:50:20 +00:00
David Edelsohn 7408a167bd * config/tc-arm.c (tc_gen_reloc): Delete duplicated code. 1995-08-31 13:50:56 +00:00
Ian Lance Taylor ebcb9b6d4e * app.c (do_scrub_chars): Free saved_input when the from buffer
exactly fills the to buffer.
1995-08-31 03:53:43 +00:00
David Edelsohn 93dea4e685 * config/tc-sparc.c (parse_keyword_arg, parse_const_expr_arg): New fns.
(sparc_ip): Call them for asi, membar, and prefetch parsing.
1995-08-30 20:49:28 +00:00
David Edelsohn 593d18d36c * config/tc-sparc.c (sparc_ip): Clean up ASI support. 1995-08-29 22:48:54 +00:00
Steve Chamberlain 8c5560f25e Tue Aug 29 13:20:27 1995 steve chamberlain <sac@slash.cygnus.com>
* read.c (potable): Rva is new entry.
	(cons_worker): New, split from cons.  Handles rva.
	(cons, s_rva): Call cons_worker.
	* read.h (s_rva): New declaration.
	* write.c (fixup_segment): Don't throw away rva relocs.
	* config/tc-arm.c (md_apply_fix, tc_gen_reloc): Handle RVA.
	* config/tc-i386.c (tc_coff_fix2type): Handle RVA.
	* config/tc-i386.h (TC_COUNT_RELOC): Remember RVAs.
	(TC_RVA_RELOC): New definition.
1995-08-29 20:28:15 +00:00
David Edelsohn 338a706070 * config/tc-arm.c (do_swi): Allow optional leading '#'. 1995-08-28 00:45:44 +00:00
Ian Lance Taylor d634f0a8af * config/te-delta.h: Include obj-format.h.
* config/te-sco386.h: Likewise.
	* config/te-sysv32.h: Likewise.
1995-08-27 01:18:28 +00:00
Ian Lance Taylor 26743df55b * app.c (scrub_file): Remove.
(scrub_from_file, scrub_to_file): Remove.
	(scrub_string, scrub_last_string): Remove.
	(scrub_from_string, scrub_to_string): Remove.
	(saved_input, saved_input_len): New static variables.
	(struct app_saved): Remove scrub_string, scrub_last_string, and
	scrub_file fields.  Add saved_input and saved_input_len fields.
	(app_push): Adjust saved fields for changes in struct app_save.
	Initialize state and saved_input.
	(app_pop): Adjust saved fields for changes in struct app_save.
	(do_scrub_chars): Rename from do_scrub_next_char and rewrite to
	process a buffer at a time rather than a character at a time.
	(main, as_warn): Remove obsolete testing code.
	* as.h (do_scrub_next_char): Don't declare.
	(do_scrub_chars): Declare.
	(scrub_from_file, scrub_from_string): Don't declare.
	(scrub_to_file, scrub_to_string): Don't declare.
	* input-file.c (input_file_get): New static function.
	(input_file_give_next_buffer): Call do_scrub_chars rather than
	do_scrub_next_char.
	* read.c (scrub_string, scrub_string_end): New static variables.
	(scrub_from_string): New static function.
	(read_a_source_file): Call do_scrub_chars rather than
	do_scrub_next_char.
(and comment change in input-scrub.c)
1995-08-27 00:33:56 +00:00
Ian Lance Taylor 69cc18d2f0 * gasp.c (as_abort): New function.
* sb.c (sb_build): Revert yesterday's patch.
1995-08-25 02:00:39 +00:00
Ian Lance Taylor 791ee51949 * Makefile.in (gasp.new): Depend upon ../libiberty/libiberty.a.
Just link against libiberty, not against $(LIBS).
1995-08-25 01:51:14 +00:00
Ian Lance Taylor bd36216202 * sb.c (sb_build): Undefine abort before calling it, since gasp
does not provide as_abort.
1995-08-23 22:21:51 +00:00
Michael Meissner 6d93b96e48 Fix -mlittle/-mbig so that it really does override the default endianess 1995-08-23 14:59:16 +00:00
Ken Raeburn 06997b9a10 new routine xstrerror for better vms error handling; gas fixed to use it 1995-08-22 07:34:00 +00:00
Ken Raeburn 53499500e0 vms changes 1995-08-22 07:06:13 +00:00
Ian Lance Taylor a5e03353ae * as.c (parse_args): Accept --defsym SYM=VALUE.
* doc/as.texinfo, doc/as.1: Document --defsym.
1995-08-21 21:18:57 +00:00
Ian Lance Taylor 95074dc362 * doc/as.texinfo: Document irp, irpc, macro, and rept. MRI mode
now supports macros, ifc, ifnc, irp, irpc, rept, and endr, without
	using gasp.
1995-08-21 18:37:10 +00:00
Ian Lance Taylor 7e047ac2c1 Add support for macros.
* as.c: Include sb.h and macro.h.
	(max_macro_next): New global variable.
	(main): Call macro_init.
	(macro_expr): New static function.
	* as.h (max_macro_nest): Declare.
	* read.c (line_label): Rename from mri_line_label.  Change all
	uses.
	(potable): Add exitm, irp, irpc, macro, mexit, rept.
	(read_a_source_file): Always clear line_label at the start of a
	line, not just when flag_mri or LABELS_WITHOUT_COLONS.  Fixup
	MRI/LABELS_WITHOUT_COLONS handling.  In MRI mode, permit label:
	equ val.  Set line_label when calling colon.  In MRI mode, a
	leading '.' does not imply a pseudo-op.  Check for macro expansion
	before calling md_assemble.
	(s_irp): New function.
	(get_line_sb): New static function.
	(s_macro): New function.
	(s_mexit): New function.
	(s_rept): New function.
	* read.h (line_label): Rename from mri_line_label.
	(s_irp, s_rept): Declare.
	(s_macro, s_mexit): Declare.
	* input-scrub.c: Include sb.h.
	(sb_index, from_sb): New static variables.
	(macro_nest): New static variable.
	(struct input_save): Add sb_index and from_sb fields.  Change
	next_saved_file field to be struct input_save *.
	(next_saved_file): Changed to be struct input_save *.
	(input_scrub_push): Change to return type struct input_save *.
	Save sb_index and from_sb.
	(input_scrub_pop): Change parameter type to struct input_save *.
	Restore sb_index and from_sb.
	(input_scrub_include_sb): New function.
	(input_scrub_next_buffer): Handle reading from from_sb.
	(bump_line_counters): Only increment lines if not using from_sb.
	* config/tc-m68k.c (opt_table): Add nest.
	(opt_nest): New static function.
	* gasp.c: Include sb.h and macro.h.  Move all sb related functions
	and definitions to sb.h and sb.c.  Move all macro related
	functions and definitions to macro.h and macro.c.
	* sb.h, sb.c: New files, extracted from gasp.c.
	* macro.h, macro.c: Likewise.
	* Makefile.in (OBJS): Add sb.o and macro.o
	(GASPOBJS): Define.
	(gasp.new): Depend upon $(GASPOBJS).  Use $(GASPOBJS) to link.
	(TARG_CPU_DEP_m68k): Depend upon subsegs.h.
	(gasp.o): Depend upon sb.h and macro.h.
	(sb.o): New target.
	(macro.o): New target.
	(as.o): Depend upon sb.h and macro.h.
	(input-scrub.o): Depend upon sb.h.
	(read.o): Depend upon sb.h and macro.h.
1995-08-21 18:35:11 +00:00
Michael Meissner 840886d875 Allow @HA, @L, and @H on constant expressions. 1995-08-21 17:47:01 +00:00
Jim Wilson c2d8063d3b * config/tc-arm.c (md_reloc_size): Add const to declaration. 1995-08-20 22:56:02 +00:00
Ian Lance Taylor ca2329727e * read.c (s_include): In MRI mode, don't expect quotes around the
file name.
	* listing.c (listing_title): Don't require the title to be quoted.
1995-08-18 15:15:28 +00:00
Ian Lance Taylor f8d6e6cd08 * gasp.c (include_print_where_line): Always subtract 1 from
linecount before printing it.
	(process_file): In MRI mode, lines beginning with '*' or '!' are
	comments.
	(do_reg): In MRI mode, don't require parentheses.
	(do_include): In MRI mode, don't requires quotes.  If the file can
	not be found in the include path, try opening it in the current
	directory.  Print the file name correctly in the error message.
	(chartype_init): In MRI mode, set FIRSTBIT for '.'.
	(main): Set comment_char to ';' when entering MRI mode.
1995-08-18 15:09:57 +00:00
Ian Lance Taylor b4ec75e09f * config/tc-m68k.c: Include subsegs.h.
(m68k_ip): Pass 64 rather than -1 to add_Fix in 'B' 'B' case.
	(md_pcrel_from): If fx_pcrel_adjust is 64, use -1 instead.
You can't portably store negative numbers in a char.
1995-08-18 15:02:56 +00:00
Ken Raeburn 58bd5f50cf * as.h (alloca): Use void* declaration on HP/UX. 1995-08-16 22:15:28 +00:00
Ian Lance Taylor 4c67b523a3 * config/tc-sparc.c (tc_gen_reloc): If PIC, only change PCREL_S2
to WPLT30 for an undefined or external symbol.  Don't consider
	PC10 or PC22 to be a PC relative reloc when choosing between
	fx_addnumber and fx_offset.
1995-08-16 20:21:49 +00:00
Ian Lance Taylor 4decdd5669 * config/tc-z8k.c (md_number_to_chars): Don't do it here, call
number_to_chars_bigendian.
	* config/tc-z8k.h (TARGET_BYTES_BIG_ENDIAN): Define.
1995-08-16 20:05:54 +00:00
Ian Lance Taylor d86e4acb0f * expr.c (operand): Add support for .startof. and .sizeof. by
using magic symbol names which the linker will recognize
	specially.
	* doc/as.texinfo: Take out note that .startof. and .sizeof. are
	not supported.
1995-08-16 17:18:00 +00:00
Ken Raeburn 8513c9536d * write.c (write_contents): Always do it the BFD_FAST_SECTION_FILL way.
Reformat and reindent that code to GNU standards.
(BFD_FAST_SECTION_FILL): Don't define.
1995-08-15 01:28:59 +00:00
Ian Lance Taylor e15126c456 * gasp.c (do_align, get_any_string): Mark as static.
(do_assigna, do_assignc, new_file): Likewise.
1995-08-14 22:00:21 +00:00
Ian Lance Taylor 8e11ad0acd * config/tc-m68k.c (s_reg): Rename local op to rop to avoid
confusion with macro op.
1995-08-14 21:33:29 +00:00
Jeff Law b96c75f0b8 * config/tc-hppa.c (md_apply_fix): Don't try to apply BEGIN_BRTAB
or END_BRTAB fixups.
1995-08-14 20:10:21 +00:00
Ian Lance Taylor 7f5adcba04 * gasp.c (strip_comments): Comment out; it's not used.
(do_end): Add parameter.  In MRI mode, print it out.
	(do_irp): New static function.
	(sub_actual): Change parameter m to formal_hash, changing type
	from macro_entryh * to hash_table *.
	(macro_expand_body): New static function, broken out of
	macro_expand.
	(macro_expand): Call macro_expand_body.
	(K_*): Fully parenthesize.
	(K_IRP, K_IRPC): Define.
	(mrikinfo): Add IRP and IRPC.
	(process_pseudo_op): In MRI mode, print out END pseudo-op.  Pass
	line to do_end.  Handle K_IRP and K_IRPC.
1995-08-14 20:03:38 +00:00
Ian Lance Taylor 5c800455bf * frags.c (frag_align): Handle absolute_section.
* write.c (record_alignment): Likewise.
1995-08-13 21:19:00 +00:00
Ken Raeburn 2e00287afc fix up aug 8 log entry 1995-08-13 09:37:59 +00:00
Jeff Law 5ae218df2a * config/tc-hppa.c (md_pseudo_table): Add entries for
"begin_brtab" and "end_brtab" pseudo-ops.
	(pa_brtab): New function.
	(tc_gen_reloc, SOM version): Handle R_BEGIN_BRTAB and R_END_BRTAB.
	(hppa_force_relocation): Force relocations for BRTAB fixups
	when OBJ_SOM is defined.

More infrastructure for PA optimziations.
1995-08-13 06:39:39 +00:00
Ken Raeburn 3d0f44462f * Makefile.in (TE_OBJS): Add empty definition. 1995-08-12 00:49:19 +00:00
Ian Lance Taylor 19be7c0800 * gasp.c (change_base): Don't treat ' specially in MRI mode.
(process_file): Don't warn about missing END in MRI mode.
	(do_if): New static function.
	(get_mri_string, do_ifc): New static functions.
	(buffer_and_nest): Treat MRI mode like alternate syntax mode.
	(do_aendr): Change error message in MRI mode.
	(do_arepeat): Use REPT/ENDR in MRI mode.
	(do_formals): In MRI mode, add special NARG formal.
	(macro_expand): Various changes for MRI mode: permit a qualifier
	on the macro name; set special NARG formal; permit unnamed
	positional arguments; use && to concatenate named parameters;
	permit \d to specify an unnamed parameter; permit named parameters
	to not start with \; use == to see if a parameter exists.
	(getstring): In MRI mode, allow <> to quote a string.
	(K_IFEQ, K_IFNE, K_IFLT, K_IFLE, K_IFGE, K_IFGT): Define.
	(K_IFC, K_IFNC): Define.
	(struct keyword): Name structure used in kinfo array.
	(mrikinfo): New static array.
	(process_pseudo_op): Don't require leading '.' in MRI mode.
	Handle new MRI pseudo-op definitions.
	(add_keyword): New static function, broken out of process_init.
	(process_init): Use add_keyword.  In MRI mode, add mrikinfo table.
	(long_options): Add "mri".
	(show_usage): Mention -M/--mri.
	(main): Call process_init after processing arguments.  Handle -M.
	* doc/gasp.texi: Document -M/--mri.
1995-08-11 23:49:17 +00:00
Michael Meissner c7d7eed0a8 Allow large addends for BFD_RELOC_{LO16,HI16,HI16_S} relocs. 1995-08-11 17:36:54 +00:00
Ken Raeburn 12a065ee7e * read.c (s_mri_sect) [BFD_ASSEMBLER]: Fix typos in choosing and setting
section flags.
1995-08-11 01:11:30 +00:00
Ian Lance Taylor 79e15b8a98 * doc/as.texinfo: Add documentation for MRI compatibility mode.
* doc/as.1: Likewise.
1995-08-10 21:18:21 +00:00
Ian Lance Taylor 336435bc4d * config/tc-m68k.c (m68k_ip): When recognizing '#', use isbyte and
iword rather than expr8 and expr16.  When recognizing 'M', use
	issbyte rather than expr8.  When recognizing 'Q' and 't', just
	check for O_constant rather than using expr8.
	* config/m68k-parse.h (expr8, expr16): Don't define.
	* Makefile.in (m68k-parse.o): Depend upon m68k-parse.h, not
	m68k-parse.y.
1995-08-10 16:43:00 +00:00
Ian Lance Taylor e14994d980 * read.c (potable): Add spc, ttl, xcom, xref.
(s_mri_sect): New function.
	* read.h (s_mri_sect): Declare.
	* config/obj-coff.c (obj_coff_section) (both versions): In MRI
	mode, call s_mri_sect.
	(obj_pseudo_table): Add sect.s and section.s.  Move sect outside
	of ifndef BFD_ASSEMBLER.
	* config/obj-elf.c (elf_pseudo_table): Add section.s, sect,
	sect.s.
	(obj_elf_section): In MRI mode, call s_mri_sect.
	* config/tc-m68k.c (md_pseudo_table): Add restore, save.
	(struct save_opts): Define.
	(save_stack): New static variable.
	(s_save, s_restore): New static functions.
1995-08-10 16:19:34 +00:00
Ian Lance Taylor a920b69312 * read.c (s_set): Remove unused local ptr.
(hex_float): Check target_big_endian.
	(equals): Remove unused local p.
	* config/tc-a29k.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-h8500.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-hppa.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-i860.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-m68k.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-m88k.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-tahoe.h (TARGET_BYTES_BIG_ENDIAN): Define.
	* config/tc-sh.c (little): Set target_big_endian.
	(md_begin): Likewise.
	(md_parse_option): Likewise.
	(build_relax): Check target_big_endian rather than shl.
	(build_Mytes, md_atof): Likewise.
	(md_convert_frag, md_apply_fix): Likewise.
	(md_number_to_chars): Likewise.
1995-08-10 04:44:59 +00:00
Ian Lance Taylor 6700d36e84 * config/tc-m68k.c (m68k_abspcadd): New static variable.
(m68k_quick): New static variable.
	(m68k_rel32): New static variable.
	(md_pseudo_table): Add opt and reg.
	(m68k_ip): Permit absolute symbols in 'l'/'L' recognition.  Check
	m68k_quick in 'M' and 'Q' recognition.  Check m68k_abspcadd in
	DISP handling.  Check m68k_rel32 in BASE/POST/PRE handling.
	(md_begin): In MRI mode, initialize m68k_abspcadd and m68k_rel32.
	In MRI mode, change unsized branch aliases to be variable sized.
	(struct opt_action): Define.
	(opt_table): Define.
	(s_opt): New static function.
	(skip_to_comma): New static function.
	(opt_chip): New static function.
	(opt_list): New static function.
	(opt_list_symbols): New static function.
	(s_reg): New static function.
	* as.h (flag_keep_locals): Change from unsigned char to int.
	(flag_no_warnings): Likewise.
1995-08-09 23:22:13 +00:00
Ian Lance Taylor e28c40d725 * read.c (abs_section_offset): New global variable.
(potable): Add offset, struct.
	(do_org): New static function; handle changing the origin in the
	absolute section.
	(s_org): Use do_org.
	(s_set): Likewise.
	(equals): Likewise.
	(s_space): In absolute_section, just increase abs_section_offset.
	(s_struct): New function.
	(emit_expr): Handle absolute_section specially.
	* read.h (abs_section_offset): Declare.
	(s_struct): Declare.

	* read.c (potable): Add ifeq, ifge, ifgt, ifle, iflt, ifne.
	Change if to pass O_ne to s_if.
	(read_a_source_file): Don't define an label without a colon if
	ignore_input returns true.

	* read.c (potable): Add dcb, dcb.b, dcb.d, dcb.l, dcb.s, dcb.w,
	dcb.x, ds.d, ds.p, ds.s, ds.x, elsec, endc, fail, format, llen,
	noformat.
	(read_a_source_file): If pseudo-op handler is s_end, quit
	immediately.
	(s_end): New function.
	(s_fail): New function.
	(s_float_space): New function.
	(hex_float): New static function.
	(float_cons): Use hex_float.
	* read.h (s_fail): Declare.
	(s_float_space): Declare.
1995-08-09 19:36:25 +00:00
Ian Lance Taylor 99ca35f1fa Add ChangeLog entry for accidental checkin of read.c. 1995-08-09 15:44:05 +00:00
Ian Lance Taylor 286cb27aac * configure.in: Move random special target handling before
possible break.
	* configure: Rebuild.
1995-08-09 14:53:21 +00:00
Ian Lance Taylor bf4bd1fcf0 Tue Aug 8 23:41:25 1995 Alan Modra <alan@spri.levels.unisa.edu.au>
* configure.in: Consistently use ${target_cpu_type} rather than
	${cpu_type} after the loop.
	* configure: Rebuild.
	* Makefile.in (targ-cpu.o): Use @target_cpu_type@ rather than
	@cpu_type@.
1995-08-09 03:46:15 +00:00
Ken Raeburn 14d0c9fe26 * expr.h (operatorT): Remove comma after last enumerator value. 1995-08-09 01:44:02 +00:00
Ken Raeburn bdc82d8103 yet more vms work from pat rankin 1995-08-09 01:39:47 +00:00
Ken Raeburn 3b85367c58 * as.h (alloca): If __STDC__, declare void* instead of char*. 1995-08-09 01:16:09 +00:00
Ian Lance Taylor e9bb39b456 * config/tc-m68k.c (archs): Add 68ec000, 68hc000, 68hc001,
68ec020, 68ec030, 68ec040, and 68330.
	(md_pseudo_table): Add chip and comline.
	(m68k_init_after_args): Use strcasecmp when comparing default_cpu
	against architectures.
	(mri_chip, s_chip): New static functions.
1995-08-08 21:46:37 +00:00
Ian Lance Taylor 1356d77df3 * struc-symbol.h (struct symbol): Add sy_mri_common bit.
* read.h (mri_comon_symbol): Declare.
	(s_mri_common): Declare.
	* read.c (mri_line_label): New static variable.
	(mri_common_symbol): New global variable.
	(potable): Add "common" and "common.s".
	(read_a_source_file): In MRI mode, set mri_line_label for a label
	at the start of a line.
	(s_mri_common): New function.
	(s_space): Handle mri_common_symbol.
	* symbols.c (colon): Change return value from void to symbolS *,
	and return new symbol.  If mri_common_symbol is set, attach the
	new symbol to it.
	(resolve_symbol_value): Handle an sy_mri_common symbol.
	* symbols.h (colon): Change return value in declaration.
	* subsegs.c (subseg_set_rest): Clear mri_common_symbol.
	(subseg_set (both versions)): Likewise.
	* frags.c (frag_more): Warn if mri_common_symbol is not NULL.
	* write.c (adjust_reloc_syms): Skip sy_mri_common symbols.
	(write_object_file): Discard sy_mri_common symbols.
	(fixup_segment): Change relocations against sy_mri_common symbols
	to be against the common symbol itself.
	* config/obj-coff.c (yank_symbols): Discard sy_mri_common symbols.
	(fixup_segment): Change relocations against sy_mri_common symbols
	to be against the common symbol itself.
	* config/obj-aout.c (obj_crawl_symbol_chain): Discard
	sy_mri_common symbols.
1995-08-08 21:41:30 +00:00
Ian Lance Taylor c266c384ee * doc/c-m68k.texi: Add documentation for CPU specific options, and
for Motorola syntax.
1995-08-08 17:12:22 +00:00
Ian Lance Taylor 48bfed03b4 * config/m68k-parse.y (motorola_operand): For (%pc), set mode to
DISP, not BASE.
1995-08-08 17:09:10 +00:00
Ken Raeburn d4083e293a * write.c (relax_align): Add extra padding for linkrelax only if
LINKER_RELAXING_SHRINKS_ONLY is defined.
* config/tc-i960.h (LINKER_RELAXING_SHRINKS_ONLY): Define it.
* doc/internals.texi (Relaxation): Write up some stuff on linker relaxing and
LINKER_RELAXING_SHRINKS_ONLY.
1995-08-08 06:54:30 +00:00
Ian Lance Taylor 55243738ff Move testsuite ChangeLog entries to testsuite/ChangeLog. 1995-08-08 03:35:44 +00:00
Ian Lance Taylor a1c7c0f3ac * config/m68k-parse.y: New file: bison grammar for m68k operands,
including support for Motorola syntax.
	* config/m68k-parse.h: New file; definitions shared between
	m68k-parse.y and tc-m68k.c.
	* config/tc-m68k.c: Include m68k-parse.h.
	(enum operand_type): Move to m68k-parse.h, where it is named
	m68k_operand_type.  Rename all uses.  Rearrange somewhat.  Add
	FPREG.  Rename AOFF to DISP.  Rename AINDX to BASE.  Rename APODX
	to POST.  Rename APRDX to PRE.  Remove AMIND.  Rename MSCR to
	CONTROL.  Remove DINDR.
	(struct m68k_exp): Move to m68k-parse.h.  Remove e_beg, e_end and
	e_seg fields.  Rename e_exp to exp.  Rename e_siz to size, and
	change type to enum m68k_size.  Change all uses.
	(enum _register): Move to m68k-parse.h, where it is named
	m68k_register.  Rename all uses.  Add ZDATA0-7 and ZADDR0-7.
	(struct m68k_op): Move to m68k-parse.h.  Change all fields.
	(seg): Don't define.
	(add_exp): Remove.
	(FAIL, OK): Remove.
	(m68k_reg_parse): Move to m68k-parse.y, and rewrite.
	(SKIP_WHITE, SKIP_W): Remove.
	(try_moto_index, try_index): Remove.
	(m68k_ip_op): Move to m68k-parse.y, and rewrite to use grammar.
	(main): Remove obsolete test function.
	(m68k_ip): Extensive changes to use new grammar.
	(get_regs): Remove.
	(crack_operand): m68k_ip_op now returns 0 on success.
	(init_table): Add ssp, zd0-7 and za0-7.
	(md_assemble): Make er const.  Correct loop over operands when
	looking for error message.
	(md_begin): Set alt_notend_table for '(' and '@'.
	(get_num): Expression is already parsed.  Don't set seg.
	* configure.in: If cpu_type is m68k, put m68k-parse.o in
	extra-objects.
	* configure: Rebuild.
	* Makefile.in (DISTSTUFF): Add m68k-parse.c.
	(BISON): Use ../bison/bison if it exists.
	(BISONFLAGS): Define as empty.
	(TARG_CPU_DEP_m68k): Depend upon $(srcdir)/config/m68k-parse.h.
	(m68k-parse.c, m68k-parse.o): New targets.
1995-08-08 02:36:10 +00:00
Jeff Law 68d04794f7 * config/tc-sh.c (parse_reg): Handle new FP registers.
(get_specific): Handle new operand types.

Sanitized away for now.
1995-08-07 08:58:12 +00:00
Ian Lance Taylor 86b58ca2aa * config/tc-m68k.c: Remove BREAK_UP_BIG_DECL stuff.
(struct m68k_incant): Change m_operands field to be const.
	(struct m68k_it): Change args field to be const.
	(m68k_ip): Change local variable s to be const.
	(opcode_ptr): Remove.
	(md_begin): Use m68k_numopcodes, not numopcodes.  Use
	m68k_opcodes, not removed opcode_ptr.  Use m68k_numaliases, not
	numaliases.
1995-08-02 22:42:21 +00:00
Ian Lance Taylor 219deb70ce Initial support for MRI style labels and expressions.
* as.h (flag_mri): Declare/define.
	* as.c (show_usage): Mention -M and its synonym --mri.
	(parse_args): Add 'M' to std_shortopts.  Add "mri" to
	std_longopts.  Set flag_mri if -M is seen.
	(main): Call parse_args before input_scrub_begin.  Call
	expr_begin.
	* app.c (do_scrub_begin): Don't set lex for '"' or '\'' in MRI
	mode.  Do set lex for ';', '*', and '!' in MRI mode.
	(do_scrub_next_char): Remove MRI ifdef in LEX_IS_WHITESPACE case.
	In MRI mode, keep spaces between labels and colons.  Remove MRI
	ifndef around LEX_IS_ONECHAR_QUOTE case.  In MRI mode, don't use
	'!' or '*' as comment characters even if they are in
	comment_chars.
	* read.h (lex_type): No longer const.
	* read.c: Include libiberty.h.
	(lex_type): No longer const.
	(read_begin): In MRI mode, set lex_type of '?' to 3.
	(potable): Add dc, dc.b, dc.d, dc.l, dc.s, dc.w, dc.x, ds, ds.b,
	ds.l, ds.w, and xdef.
	(read_a_source_file): Change LABELS_WITHOUT_COLON ifdef to check
	for MRI mode at runtime rather than compile time.  Handle the EQU
	pseudo-op in MRI mode.  Remove bogus MRI ifdef around done_pseudo.
	Change NO_PSEUDO_DOT ifdef to also take effect for MRI mode at
	runtime.
	(cons): In MRI mode, always call parse_mri_cons rather than
	TC_PARSE_CONS_EXPRESSION.
	(parse_mri_cons): Always compile, not just when MRI is defined.
	Call TC_PARSE_CONS_EXPRESSION, not expression, when the input is
	not a string constant.  Handle A and E modifiers.
	(float_cons): Accept :xxxx, where the x's are hex digits.
	* expr.h (operatorT): Add O_eq, O_ne, O_lt, O_le, O_ge, O_gt.
	(expr_begin): Declare.
	* expr.c (integer_constant): In MRI mode, if the base was not
	specified, look for a suffix on the number to set the base.
	(mri_char_constant): New static function.
	(operand): Remove MRI ifdef.  In MRI mode, do various things: Pass
	0 as the base when calling integer_constant if there was no
	prefix.  Check for a hex constant suffix if when a leading '0' is
	seen.  Don't accept 0x or 0b as a prefix.  Check for E'chars' and
	A'chars'.  Handle MRI character constants.  Treat '"' as the
	unary bitwise not operator.  Treat $ as the program counter, or as
	the prefix for a hex constant.  Treat % as the prefix for a binary
	constant and @ as the prefix for an octal constant.  Treat : as
	the prefix for a hex constant.
	(op_encoding): Set '"' to O_bit_not, '<' to O_lt, and '>' to O_gt.
	(op_rank): No longer const.  Change rank values.
	(expr_begin): New function.
	(operator): New static function.
	(expr): Use operator.  Don't bother to mention the operator in
	warnings.  Remove bogus #if 0 code.  Handle new operatorT values.
	* atof-generic.c (atof_generic): In MRI mode, accept underscores
	around the exponent in floating point numbers.
	* symbols.h (symbols_case_sensitive): Declare.
	* symbols.c (symbols_case_sensitive): New global variable.
	(symbol_create): Check symbols_case_sensitive.
	(symbol_find_base): Likewise.
	(resolve_symbol_value): Handle new operatorT values.
	(print_expr_1): Likewise.
	(S_IS_LOCAL): In MRI mode, names beginning with two '?' characters
	are local.
1995-08-01 22:01:01 +00:00
Steve Chamberlain b97bd7d17c Tue Aug 1 11:35:18 1995 steve chamberlain <sac@slash.cygnus.com>
* tc-sh.c (md_convert_frag): Make some error messages more
	explict.
1995-08-01 18:39:08 +00:00
Steve Chamberlain 4f2f30116b * gasp.c (main): Parse -I option.
(do_include): Look through include list.
	* gasp.c (change_base): Don't modify numbers in strings.
	(pr7583)

 	* testsuite/gasp/*: New.
	* testsuite/Makefile.in: Use gasp tests.
	* testsuite/config/default.exp: Add gasp stuff.
1995-08-01 03:35:23 +00:00
Ken Raeburn ac24997f36 yet more vms work 1995-08-01 01:41:53 +00:00
Steve Chamberlain 5f57cea3f6 * gasp.c (change_base): Don't modify numbers in strings. (pr7583)
* testsuite/gas/gasp/*: New.
1995-08-01 01:31:42 +00:00
Ken Raeburn f641906be5 remove local variables, change-log-mode does all of that 1995-07-31 21:09:39 +00:00
Ken Raeburn 5700b874e4 more vms changes 1995-07-28 00:45:53 +00:00
Ken Raeburn a619d6d906 fix more compilation problems 1995-07-25 00:14:47 +00:00
Ian Lance Taylor a91c6b0885 * config/tc-sh.c (md_pseudo_table): Add "uses".
(s_uses): New static function.
	(sh_coff_frob_file): New function.
	(md_convert_frag): Call subseg_change before calling fix_new.
	(sh_handle_align): New function.
	(SWITCH_TABLE): Define.
	(sh_force_relocation): New function.
	(md_apply_fix): Handle R_SH_USES, R_SH_COUNT and R_SH_ALIGN.
	(sh_coff_reloc_mangle): Likewise.  Also handle switch table
	entries.
	* config/tc-sh.h (HANDLE_ALIGN): Define.
	(sh_handle_align): Declare.
	(TC_FORCE_RELOCATION): Define.
	(sh_force_relocation): Declare.
	(TC_COUNT_RELOC): Simplify; rely on TC_FORCE_RELOCATION instead.
	(tc_frob_file): Define.
	(sh_coff_frob_file): Declare.
	* config/obj-coff.c (write_object_file): Call tc_frob_file if it
	is defined.
	(fixup_mdeps): Call HANDLE_ALIGN if it is defined.
	(TC_FORCE_RELOCATION): Define if not defined.
	(fixup_segment): Use TC_FORCE_RELOCATION to decide whether to
	clear the symbol fields of fixP.
1995-07-24 18:18:39 +00:00
Ken Raeburn 5a929558f8 * configure.in (arm-*-riscix*): Don't set emulation. 1995-07-20 17:38:59 +00:00
Ken Raeburn 9d249d343c * config/tc-m68k.c (md_convert_frag): Rename argument seg to sec, since seg is
a macro name in this file.
1995-07-20 17:17:32 +00:00
David Edelsohn d0ac7e7039 * config/obj-coff.h (TE_PE): Delete.
* config/tc-arm.h (BYTE_ORDER): Delete.
	(TARGET_FORMAT): Provide value for OBJ_COFF and TE_PE.
	(ARM_BI_ENDIAN): Define if OBJ_COFF and TE_PE.
	* config/tc-arm.c (byte_order): Delete.
	(md_number_to_chars): Reference target_big_endian, not byte_order.
	(md_chars_to_number): Likewise.
	(md_longopts): Add -EB/-EL if ARM_BI_ENDIAN.
	(md_parse_options): Recognize -EB/-EL.
	(md_show_usage): List -EB/-EL.
1995-07-19 23:18:57 +00:00
Ian Lance Taylor fe98e22d83 * gasp.c (process_assigns): Use toupper before comparing against
upper case letter.
	(whatcond): Likewise.
PR 7281.
1995-07-19 16:22:14 +00:00
Ian Lance Taylor 5f8cb05eef * config/tc-sh.c (sh_relax): Rename from relax, and make global.
Renamed all uses.
	(insert): Pass a size of 2, not 4.
	(build_relax): Remove unused len variable.
	(md_show_usage): Mention -little option.
	(md_convert_frag): Add segT argument.  Rewrite to generate relocs
	rather than to generate complete instructions here.
	(md_apply_fix): Adjust and clarify R_SH_PCRELIMM8BY4 case for
	changes in insert and md_pcrel_from.  Add cases for R_SH_PCDISP
	and R_SH_PCDISP8BY2.
	(md_pcrel_from): Don't subtract 1, add 2.
	(tc_coff_fix2rtype): Remove.
	(sh_coff_reloc_mangle): New function.
	* config/tc-sh.h (TC_COFF_FIX2RTYPE): Just return fx_r_type.
	(sh_relax): Declare.
	(TC_COUNT_RELOC): If relaxing, count PC relative relocs.
	(TC_RELOC_MANGLE): Define.
	(sh_coff_reloc_mangle): Declare.
	(tc_coff_sizemachdep): Declare.
	* tc.h (md_convert_frag): Add segT parameter to non BFD_ASSEMBLER
	declaration.
	* write.c (cvt_frag_to_fill): Add sec argument to non
	BFD_ASSEMBLER version.  Pass it to md_convert_frag.
	(write_object_file): Pass SEG_TEXT to cvs_frag_to_fill.
	* config/obj-coff.c (do_relocs_for): Pass segment info to
	TC_RELOC_MANGLE.
	(fixup_mdeps): Pass segment type to md_convert_frag.
	* config/tc-a29k.c (md_convert_frag): Add segT argument.
	* config/tc-h8300.c (md_convert_frag): Likewise.
	* config/tc-h8500.c (md_convert_frag): Likewise.
	* config/tc-i386.c (md_convert_frag): Likewise.
	* config/tc-i860.c (md_convert_frag): Likewise.
	* config/tc-i960.c (md_convert_frag): Likewise.
	* config/tc-m68k.c (md_convert_frag): Likewise.
	* config/tc-m88k.h (md_convert_frag): Likewise.
	* config/tc-ns32k.c (md_convert_frag): Likewise.
	* config/tc-rce.c (md_convert_frag): Likewise.
	* config/tc-tahoe.c (md_convert_frag): Likewise.
	* config/tc-vax.c (md_convert_frag): Likewise.
	* config/tc-w65.c (md_convert_frag): Likewise.
	* config/tc-z8k.c (md_convert_frag): Likewise.
	* config/tc-h8300.h (TC_RELOC_MANGLE): Add segment argument.
	* config/tc-h8500.h (TC_RELOC_MANGLE): Likewise.
	* config/tc-rce.h (TC_RELOC_MANGLE): Likewise.
	* config/tc-w65.h (TC_RELOC_MANGLE): Likewise.
	* config/tc-z8k.h (TC_RELOC_MANGLE): Likewise.
1995-07-19 16:14:49 +00:00
Michael Meissner fadd4ee1d6 Allow compiler to mark relocs that are ok for -mrelocatable. 1995-07-15 04:10:31 +00:00
Ian Lance Taylor 88f4ab5ff1 Add support for SPARC SunOS PIC:
* config/tc-sparc.h (sparc_pic_code): Always declare, not just
	when OBJ_ELF.
	(TC_RELOC_RTSYM_LOC_FIXUP): Define when OBJ_AOUT.
	(tc_fix_adjustable): New definition for OBJ_AOUT.
	* config/tc-sparc.c (sparc_pic_code): Always define, not just when
	OBJ_ELF.
	(md_apply_fix): Adjust reloc addend for OBJ_AOUT and PIC.  In
	BFD_RELOC_32_PCREL_S2 case, don't increment val for an external
	symbol when PIC.
	(tc_gen_reloc): Generate different PIC relocs when OBJ_AOUT, as
	well as when OBJ_ELF.
	(md_shortopts): If OBJ_AOUT, include `k'.
	(md_parse_option): If OBJ_AOUT, handle 'k'.
	(md_show_usage): Mention -k if OBJ_AOUT, and -KPIC if OBJ_ELF.
	(md_pcrel_from): Don't add in size for an external symbol when
	PIC.
1995-07-15 00:00:32 +00:00
David Edelsohn 403d21d28f * config/tc-arc.c (byte_order): Provide explicit initial value.
Also delete entry for reverted -m{big,little}-endian patch.
1995-07-14 17:30:38 +00:00
Jeff Law 4575a69d6b * config/tc-hppa.h (UNDEFINED_DIFFERENCE_OK): Define for SOM.
* write.c (adjust_reloc_syms): Set sy_used_in_reloc for both
        symbols in a fixup where a defined symbol is subtracted from an
        undefined symbol (when UNDEFINED_DIFFERENCE_OK is defined).
        (fixup_segment): Do nothing for the difference of two symbols if
        UNDEFINED_DIFFERENCE_OK is defined.
1995-07-14 03:19:38 +00:00
Jim Wilson 37ea61215c Fix debug info bugs for SGI
* ecoff.c (add_file): Don't collapse multiple .file commands into
	a single file structure.
	(ecoff_build_lineno): Set ilineBase to sum of previous file's
	ilineBase and cline.
1995-07-13 19:00:19 +00:00
Ian Lance Taylor ac7530a895 * config/obj-coff.c (fixup_segment): Support MD_APPLY_FIX3. 1995-07-13 03:34:38 +00:00
Ken Raeburn f7da4a99d4 fix more compilation bugs 1995-07-12 20:45:57 +00:00
Ian Lance Taylor 6804bd6c4c * doc/c-mips.texi: Document -m4010 and -mno-4010. 1995-07-11 18:32:16 +00:00
Ian Lance Taylor e5fa3f23e8 * ecoff.c (struct efdr): Add new field fake.
(init_file): Initialize fake.
	(add_file): Add new parameter fake.  Change all callers.
	(ecoff_build_debug): Don't warn about a missing .end for a fake
	file.
PR 6509.
1995-07-11 17:26:08 +00:00
Ken Raeburn cc02a8a9c6 * read.c (po_hash): Now static. 1995-07-10 20:49:45 +00:00
Ian Lance Taylor fb33961bff Based on patches from H.J. Lu <hjl@nynexst.com>:
* config/tc-i386.c (md_apply_fix3): Rename from md_apply_fix1.
	Accept pointer to value and segment.  Fix OBJ_ELF PCREL case to
	handle global defined symbols correctly.
	(md_apply_fix): Remove both versions.
	* config/tc-i386.h (MD_APPLY_FIX3): Define.
1995-07-10 19:01:21 +00:00
Ian Lance Taylor 84144a8f56 * configure.in: When switching on ${cpu}, use ${cpu}, not
$[target_cpu}, in default case.
	* configure: Rebuild.
1995-07-10 17:48:48 +00:00
Ian Lance Taylor ed453d2ec4 * write.c (fixup_segment): Call resolve_symbol_value on
sub_symbolP, in case it isn't in the symbol table.
PR 7131.
1995-07-08 17:29:04 +00:00
Ian Lance Taylor c71a604ae1 * read.c (s_lcomm): For .lcomm 1, set align to 0, not 1.
PR 5167.
1995-07-07 22:42:13 +00:00
Ian Lance Taylor ae99a6721f * config/obj-coff.c (coff_frob_symbol): If SF_GET_FUNCTION, set
BSF_FUNCTION.
	(symbol_globalP, symbol_global_lastP): New global variables.
	(yank_symbols): Sort defined global symbols to the end, just
	before the undefined symbols.
	(glue_symbols): Add two arguments, and use them instead of
	referring directly to global variables.
	(crawl_symbols): Call glue_symbols twice, once for defined globals
	and once for undefined.  Add corresponding know calls.
PR 5491.
1995-07-07 21:29:54 +00:00
Ian Lance Taylor 6be977fb57 * app.c (do_scrub_next_char): Always accept \v. Don't make it
conditional on BACKSLASH_V.
	* read.c (next_char_of_string): Likewise.
	* config/obj-bout.h (BACKSLASH_V): Don't define.
	* config/tc-mips.h (BACKSLASH_V): Don't define.
PR 5604.
1995-07-07 20:10:27 +00:00
Ian Lance Taylor 5767cfb748 Add SPARC ELF PIC support.
* write.c (fixup_segment): Pass fixP to TC_RELOC_RTSYM_LOC_FIXUP,
	not fixP->fx_r_type.
	* config/tc-sparc.c (sparc_pic_code): New global variable.
	(md_apply_fix): If generating PIC, adjust fx_addnumber for any non
	PC relative reloc.
	(tc_gen_reloc): If generating PIC, adjust various reloc types.
	Remove fx_pcrel assert, since it is no longer true.
	(md_parse_option): Handle -K PIC.
	* config/tc-sparc.h (sparc_pic_code): Declare if OBJ_ELF.
	(TC_RELOC_RTSYM_LOC_FIXUP): Define if OBJ_ELF.
	(tc_fix_adjustable): Don't adjust PC relative relocs if PIC.
	* config/tc-i386.h (TC_RELOC_RTSYM_LOC_FIXUP): Take a fixp, not a
	reloc type.
PR 7131.
1995-07-07 17:03:21 +00:00
Ian Lance Taylor cebf05ad1c * Makefile.in (Makefile): Add dependency on conf.in, so that conf
is rebuilt when conf.in changes.
1995-07-07 15:18:31 +00:00
Ken Raeburn a2a5a4fa41 fsf address update 1995-07-06 21:18:08 +00:00
Ian Lance Taylor 85a961c6a1 Patches from Jerry Blakely <gerry_blakley@wellfleet.com>:
* as.c (listing_filename): New static variable.
	(show_usage): Mention -a=file.
	(parse_args): Support = option of -a to set name of listing file.
	(main): Pass listing_filename to listing_print.
	* listing.c (list_file): New static variable.
	(various): Replace printf with fprintf to list_file.
	(listing_print): If name argument is not NULL, open it as
	list_file.
	* doc/as.texinfo, doc/as.1: Document -a=file.
PR 6354.
1995-07-06 20:39:31 +00:00
Ian Lance Taylor a0eb1c2c56 * config/tc-sparc.c (s_reserve): Don't permit redefinition, even
if the symbol was already in bss_section.  Fix warning message.
PR 6797.
1995-07-06 18:36:55 +00:00
Ian Lance Taylor bcaa9b051c * listing.c (struct file_info_struct): Rename end_pending field to
at_end.
	(file_info): Initialize at_end, not end_pending.
	(buffer_line): If at_end set, just return immediately.  Don't
	worry about end_pending cases.  Set at_end when EOF is read.
	(print_source): Check at_end, not end_pending.
	(listing_listing): Likewise.
PR 6636.
1995-07-06 18:00:09 +00:00
Ian Lance Taylor 265d172efb * config/tc-alpha.h (alpha_do_align): Don't declare.
(md_do_align): Don't define.
	(tc_frob_label): Define.
	(alpha_define_label): Declare.
	(md_flush_pending_output): Define.
	(alpha_flush_pending_output): Declare.
	* config/tc-alpha.c (insn_label): New static variable.
	(auto_align): New static variable.
	(md_pseudo_table): Add cases for .text, .data, .align, .byte,
	.hword, .int, .long, .octa, .quad, .short, .word, .double, .float,
	and .single.  Change .t_floating, .s_floating, .f_floating,
	.g_floating, and .d_floating to use s_alpha_float_cons rather than
	float_cons.
	(s_alpha_text, s_alpha_data): New static functions.
	(s_rdata, s_sdata): Clear insn_label and set auto_align.
	(s_gprel32): If auto_align, align.  Clear insn_label.
	(emit_insn): Clear insn_label.
	(s_alpha_align): New static function.
	(alpha_align): Make static.  Take label argument.
	(alpha_flush_pending_output): New static function.
	(s_alpha_cons, s_alpha_float_cons): New static functions.
	(alpha_define_label): New function.
PR 7148.
1995-07-06 16:59:29 +00:00
Ken Raeburn ad0ab4eb41 regenerate conf.in with autoreconf 1995-07-06 02:58:40 +00:00
Ken Raeburn 4b18b7cd88 more vms fixes from Pat Rankin 1995-07-06 02:52:44 +00:00
Ian Lance Taylor a7aa7a2ba9 * config/tc-sparc.c (md_shortopts): Add "K:" if OBJ_ELF.
(md_parse_option): If OBJ_ELF, check for -K.  Die if -K PIC, since
	PIC code is not currently supported.

	* as.c (parse_args): Change std_shortopts to be an array rather
	than a constant string.  Only include 'K' if WORKING_DOT_WORD is
	not defined.  Only check for 'K' in that case as well.
	* as.h (flag_warn_displacement): Only declare if WORKING_DOT_WORD
	is not defined.
PR 7131.
1995-07-05 21:52:10 +00:00
Ian Lance Taylor 9814e22f03 * conf.in: Add undef of HAVE_SBRK. 1995-07-05 21:47:07 +00:00
Ian Lance Taylor 3f8416d5e1 * config/obj-coff.c (obj_coff_line): Call listing_source_line, in
both BFD_ASSEMBLER and non BFD_ASSEMBLER versions of the function.
PR 7006.
1995-07-05 20:31:31 +00:00
Ian Lance Taylor 56dc989a91 * symbols.c (S_SET_EXTERNAL): Warn if symbol is weak.
(S_CLEAR_EXTERNAL): Likewise.
	(S_SET_WEAK): Warn if symbol is global.
PR 6750.
1995-07-05 19:59:07 +00:00
Ian Lance Taylor f219dc655a * config/obj-aout.c (obj_aout_frob_symbol): Warn about an attempt
to put an undefined symbol into a set.
PR 6340.
1995-07-05 19:04:58 +00:00
Ian Lance Taylor 816a827b07 * Makefile.in: Remove @configure_input@; it's not needed in
files named Makefile.
1995-07-05 17:56:52 +00:00
Ian Lance Taylor ca046e3444 * config/tc-m88k.c (md_pseudo_table): Add ".set" so that the
explicit pseudo-op works, while continuing to treat "set" as an
	instruction.
PR 5199.
1995-07-05 17:13:16 +00:00
Ian Lance Taylor 22ba90ce85 * ecoff.c (ecoff_debugging_seen): New global variable.
(ecoff_directive_def): Set ecoff_debugging_seen.
	(ecoff_stab): Likewise.
	* ecoff.h: Make idempotent.
	(ecoff_debugging_seen): Declare.
	* config/tc-mips.c: Include ecoff.h.
	(mips_debug): New static variable.
	(s_stringer, s_mips_space): Remove unneeded declarations.
	(md_parse_option): In case 'g', set mips_debug to debugging level.
	(mips_local_label): New function.
	* tc-mips.h (LOCAL_LABEL): Call mips_local_label.
	(mips_local_label): Declare.
PR 6978.
1995-07-05 16:10:50 +00:00
Fred Fish e63c594dd0 * as.c (main): Only use sbrk when HAVE_SBRK defined.
* configure.in:  Add test for sbrk.
	* configure:  Regenerate using autoconf 2.4.
1995-07-05 08:04:28 +00:00
Jeff Law 249c7415a4 * config/tc-hppa.h (MAX_RELOC_EXPANSION): Bump to 6.
* config/tc-hppa.c (tc_gen_reloc, SOM version): Handle
	relocations for the difference of two (possibly external)
	symbols.
	(hppa_fix_adjustable): For SOM, reject reductions involving
	the difference of two symbols.
	(hppa_force_relocation): Force relocations for expressions
	involving the difference of two symbols.

gas/bfd part of mentor-7363
1995-07-03 23:33:21 +00:00
Steve Chamberlain 6c186c48dc * configure[.in] (i386-*-win32): New host and target. 1995-07-03 21:25:26 +00:00
Steve Chamberlain e5c5ce23fd Support for long filenames non-bfd coff. bfd/7288
* config/obj-coff.c (filename_list_head, filename_list_tail): New.
	(yank_symbols): Notice and record filenames which are too long.
	(w_strings): Write out filename strings.
	(c_dot_file_symbols): Put long filenames onto list.
1995-06-30 00:53:37 +00:00
Steve Chamberlain 30355216bd * config/obj-coff.c (fixup_segment): PE doens't use
the strange common symbol format that other 386s formats
	do.
	* config/tc-i386.c (md_begin): If LEX_AT defined then
	'@' is in the set of identifiers.
	(i386_operand): If LEX_AT, then don't look for @goto stuff.
	* config/te-pe.h: Define LEX_AT.
1995-06-29 00:41:02 +00:00
Ken Raeburn 1a9924d8b3 doc update 1995-06-28 23:39:54 +00:00
Ken Raeburn 4a9983089e doc updates 1995-06-28 21:50:42 +00:00
Michael Meissner 3f4ca87446 Fix warning 1995-06-22 18:44:36 +00:00
Ken Raeburn c151fd1e13 m68k fixes from Andreas Schwab, with minor changes 1995-06-21 22:43:13 +00:00
Ken Raeburn a183540991 * config/tc-sparc.c (sparc_ip, case 'A'): If ASI is not a "#" value, don't
shift it an extra time.
1995-06-21 22:09:45 +00:00
Steve Chamberlain 85b369b3a4 * gasp.c (do_print, do_form, buffer_and_nest): Use case insensitive
string compares. gas/7274.
1995-06-21 21:37:13 +00:00
Ken Raeburn 34308df7a3 *config/obj-coff.c (write_object_file): Cast time() argument to time_t *. 1995-06-20 19:01:18 +00:00
Jeff Law 420c479b5a * config/tc-hppa.c (pa_build_unwind_subspace): Fix typo in last
change.
1995-06-20 18:02:44 +00:00
Jeff Law 764771905a * config/tc-hppa.c (pa_build_unwind_subspace): Zero out memory
from frag_more calls.
1995-06-19 21:34:39 +00:00
Stan Shebs d21041b3e2 * config/obj-coff.c: Don't use "bfd/" when including libbfd.h
and libcoff.h.
	(fill_section): Call PROGRESS.
	* Makefile.in (INCLUDES): Add bfd srcdir.

	* mpw-config.in: Add bfd_gas flag and set for each config.
	(i386-unknown-go32, m68k-unknown-coff): Recognize.
	* mpw-make.in (HACK_O_RAMA, OBJ_COFF_OMIT_TIMESTAMP): Add to
	config.h.
1995-06-16 00:07:45 +00:00
David Edelsohn f6d6f1028e * config/tc-arm.h (LOCAL_LABEL): Prepend '.' if not OBJ_AOUT.
(FAKE_LABEL_NAME): Likewise.
1995-06-15 17:06:20 +00:00
Ken Raeburn 69cb5925c9 whitespace & date-format cleanup 1995-06-13 23:13:28 +00:00
Jeff Law 4ff6f92ae8 * config/tc-hppa.c (pa_ip): Check for invalid register in single
precision fmpyadd and fmpysub instructions.
1995-06-13 04:29:41 +00:00
Ken Raeburn 3c650d09e8 vms cleanup, fixes from Pat Rankin 1995-06-09 21:16:07 +00:00
David Edelsohn 0cd2755006 * config/tc-arc.h (MD_APPLY_FIX3): Define.
* config/tc-arc.c (md_apply_fix3): Renamed from md_apply_fix.
	Undo effects of md_pcrel_from if symbol is in another section.
1995-06-08 18:45:33 +00:00
Ken Raeburn d5263ab426 * config/obj-vms.c (vms_write_object_file, case N_DATA): Use strcmp against
FAKE_LABEL_NAME instead of checking third character.  (Suggested by Pat Rankin.)

Mon  5 Jun 20:10:46 1995  Pat Rankin  (rankin@eql.caltech.edu)

Add support for N_ABS and N_ABS|N_EXT type symbols.

* config/obj-vms.h (LSY_S_M_{DEF,REL}, ENV_S_M_{DEF,NESTED}): New macros for
local symbols (from <lsydef.h> and <envdef.h>).
* config/obj-vms.c (Current_Environment): New file-scope variable.
(VMS_Local_Environment_Setup): New routine.
(GBLSYM_LCL): New macro.
(VMS_Global_Symbol_Spec): Handle local symbols too.
(VMS_Psect_Spec): Set GLOBALVALUE_BIT for absolute symbols.
(VMS_Emit_Globalvalues): Handle local and global absolute symbols.
(VMS_Store_PIC_Symbol_Reference): Ditto.
(vms_write_object_file: GSD symbol loop): Ditto.
1995-06-06 17:59:06 +00:00
Ken Raeburn 1be0c30e50 change i386-gnu to elf 1995-06-05 06:36:11 +00:00
Ken Raeburn 1cb0d00d8f arm config fix from Richard Earnshaw 1995-06-01 22:28:54 +00:00
Ken Raeburn 58abad7d79 vms fixes from Pat Rankin 1995-06-01 22:12:20 +00:00
Ken Raeburn 0b14349249 (grump. thought i checked this in last week.)
Check explicitly for undefined local dollar and f/b labels, and print a useful
message if any are found, instead of generating obscure undefined symbol table
entries.
1995-05-30 16:39:06 +00:00
J.T. Conklin 6053ed629e * config/te-dpx2.h: Include obj-format.h.
(COFF_MAGIC): Renamed from FILE_HEADER_MAGIC.
1995-05-28 04:36:45 +00:00
David Edelsohn 2e715f06c3 * config/tc-sparc.c (tc_gen_reloc): Handle BFD_RELOC_SPARC_WDISP16
and BFD_RELOC_SPARC_WDISP19.
1995-05-24 00:04:19 +00:00
Ken Raeburn 6e43bf824c fix emulation code so configurations not supporting it still build 1995-05-23 23:20:52 +00:00
Ken Raeburn 70d6c39671 fix up stab handling 1995-05-23 01:45:12 +00:00
Ken Raeburn 4761bb029a more emulation fixes 1995-05-23 00:09:34 +00:00
David Edelsohn 1fc2205e09 * config/tc-arc.c (md_pcrel_from): Return 0 for undefined symbols. 1995-05-22 23:58:52 +00:00
Ken Raeburn 0509f0643c more vms updates from Pat Rankin 1995-05-20 20:11:38 +00:00
Ken Raeburn a088fb62b3 From Pat Rankin:
For VMS gas port, make libiberty build on its own instead of driving it all out
of the gas directory.  Also improve some of the libiberty support for VMS.
1995-05-20 19:59:47 +00:00
Ken Raeburn 078d1a5afa From Richard Earnshaw (rearnsha@armltd.co.uk):
* gasp.c (istrue): Correctly test for string inequality.
1995-05-19 18:43:49 +00:00
Ken Raeburn ff15324f63 Bunch of changes from Richard Earnshaw for generic bi-endian ARM aout targets.
Details in change logs.
1995-05-18 22:21:18 +00:00
Ken Raeburn ff17873d14 * config/obj-ecoff.c (ecoff_pop_insert): New function.
(ecoff_format_ops): Use it.
(obj_ecoff_frob_symbol): Now static.
1995-05-16 23:36:53 +00:00
Michael Meissner 9914665911 Little endian fix 1995-05-16 23:30:21 +00:00
Ken Raeburn b444036dd9 * config/tc-mips.c (mips_init_after_args): New function. Set byte_order here.
(md_parse_option): Not here.
(byte_order): Don't bother initializing.
* config/tc-mips.h (mips_init_after_args): Declare.
(tc_init_after_args): New macro.
1995-05-16 23:27:02 +00:00
Ken Raeburn 739708fa4a Make Irix 5 configuration work again:
* config/obj-multi.h (obj_frob_symbol, obj_frob_file, S_GET_SIZE, S_SET_SIZE,
S_GET_ALIGN, S_SET_ALIGN, obj_copy_symbol_attributes, OBJ_PROCESS_STAB): New
macros.
* config/tc-mips.c: Protect against redefining them also when including
obj-elf.h.  Test only OBJ_ELF for including elf/mips.h.
1995-05-16 22:28:26 +00:00
Ken Raeburn b0d419969e read.c (s_lcomm): Do ELF/ECOFF test at run time, not compile time. 1995-05-16 22:17:17 +00:00
David Edelsohn 58ca0030db * config/tc-arc.c (md_longopts): -EB/-EL renamed to
-mbig-endian/-mlittle-endian.
	(md_show_usage): Likewise.
1995-05-15 20:42:57 +00:00
Steve Chamberlain b04b02a544 Fri May 12 14:17:47 1995 Steve Chamberlain <sac@slash.cygnus.com>
Initial support for PE object files.
	* configure.in, configure (i386-*-pe, i386-*-*nt): Add.
	* config/obj-coff.c (fixup_segment): Cope with PE wierdness.
	* config/obj-coff.h (TE_PE): New target format.
1995-05-12 21:26:01 +00:00
Ken Raeburn bb2c928158 fix non-mips elf config 1995-05-11 19:03:53 +00:00
Ken Raeburn e7757ad0bc First cut at handling multiple emulation modes for some MIPS targets.
Mostly works, not entirely.
Details in ChangeLog.
1995-05-10 23:08:40 +00:00
Michael Meissner 8370e93e49 Add little endian PowerPC support. 1995-05-09 21:17:19 +00:00
Jeff Law 56187f656d * config/tc-hppa.c (md_apply_fix): Cast *valp to an integer when
comparing against signed values.
	(hppa_force_relocation): Make "distance" an integer.
1995-05-09 17:00:48 +00:00
Ken Raeburn 1e63de912e * obj.h (struct format_ops) [BFD_ASSEMBLER]: New type.
(this_format) [BFD_ASSEMBLER]: Declare new variable, if not already defined as
a macro.
1995-05-09 04:53:50 +00:00
Ken Raeburn fd1fdba258 * subsegs.h (seg_info): Provide dummy version for non-BFD_ASSEMBLER,
non-MANY_SEGMENTS configuration.  It should never get invoked, but this is
easier than conditionalizing some of the uses.
(struct seg_info_trash): Dummy type used by above to make code compile.
1995-05-09 01:50:04 +00:00
Ken Raeburn e51a3912ef SEPARATE_STAB_SECTIONS should be defined to 1, not empty. 1995-05-05 21:44:11 +00:00
Ken Raeburn 52f969e29e * read.h (get_stab_string_offset): Declare unconditionally. 1995-05-04 23:44:28 +00:00
Ken Raeburn 8c5e0f5e05 * stabs.c (get_stab_string_offset): Always define. If SEPARATE_STAB_SECTIONS
isn't set, abort.
(SEPARATE_STAB_SECTIONS): Default to zero.
(aout_process_stab): New function, split out from s_stab_generic.
(OBJ_PROCESS_STAB) [AOUT_STABS]: Define to call aout_process_stab, if not
already defined.
(s_stab_generic): Test SEPARATE_STAB_SECTIONS at run time.  If it's not set,
and OBJ_PROCESS_STAB isn't defined, abort.  Always pass six arguments to
OBJ_PROCESS_STAB.
* config/obj-aout.h (AOUT_STABS): Define.
* config/obj-bout.h (AOUT_STABS): Define.
1995-05-04 23:40:26 +00:00
Ken Raeburn 9777b772c8 * as.h (LOCAL_LABELS_DOLLAR, LOCAL_LABELS_FB): If not already defined, define
them to zero.
* config/tc-*.h, config/te-*.h: If defining them, define them to be 1 instead
of empty.
* expr.c (integer_constant, operand): Test them at run time instead of compile
time.
* read.c (read_a_source_file): Ditto.
* symbols.c (colon): Ditto.
(dollar_*, define_dollar_label, fb_*): Define unconditionally.
* symbols.h (dollar_*, define_dollar_label, fb_*): Declare unconditionally.
1995-05-04 01:56:40 +00:00
Jeff Law 4829cd65a7 * config/tc-hppa.c (md_apply_fix): Do nothing for an out of range
PC relative call since those only occur in cases where the linker
	can fix them up.
	(hppa_force_relocation): Force relocations for out of range PC
	relative calls.
1995-05-03 19:10:55 +00:00
Jeff Law 55ac59da2e Add hppa1.1-hp-lites support. 1995-05-02 22:39:41 +00:00
Ken Raeburn 2c4022afdd read.c, tc-mips changes 1995-05-02 19:33:44 +00:00
Ken Raeburn 833c46e1fb Move cpu-specific dependencies into Makefile.in, instead of having sometimes
multiple copies in config/*.mt.  Select between several make variables with
autoconf substitution of cpu_type into a variable name reference.
1995-05-02 06:46:21 +00:00
Ken Raeburn 78dace0a00 deleting more unused macros 1995-05-02 06:26:15 +00:00
Ken Raeburn 91a165d12e delete some unused TE_* macros 1995-05-02 04:47:35 +00:00
David Edelsohn 86a90ab902 ARC stuff. 1995-04-30 04:48:46 +00:00
David Edelsohn 85f667f79f * Makefile.in (RUNTEST): Use one in srcdir if present.
(RUNTESTFLAGS): Define.
1995-04-28 03:08:55 +00:00
Ken Raeburn 931a8fab1b Support for more portable alignment handling in assembly code, based on patches
from Bryan Ford <baford@schirf.cs.utah.edu>:
* read.c (potable): Added balign and p2align, for aligning by bytes or powers
of two independent of what ".align" does for a given target.
* doc/as.texinfo: Document them.
1995-04-26 20:02:18 +00:00
Rob Savoye 404f16f5b2 * configure, configure.in: Look for m68k-*-vxworks* rather than
just m68k-wrs-vxworks so gas can be configured for
	m68k-vxworks5.1.
1995-04-25 18:14:45 +00:00
Ken Raeburn 51ba1ae69b Fix for PR 6732.
* config/tc-sh.c (md_convert_frag): Instead of aborting on large displacements,
print an error message.  Don't invoke the code that followed the abort call
until it's been verified.
1995-04-13 23:36:33 +00:00
Ken Raeburn bcee935e6b * config/tc-m68k.c (md_show_usage): Add 68060 to list. Split cpu list into
three lines.
1995-04-13 22:21:11 +00:00
Stan Shebs b55496866d Merge MPW ChangeLog with generic ChangeLog 1995-04-12 19:27:42 +00:00
David Edelsohn 5d57a66b5a ARC stuff. 1995-04-12 14:40:14 +00:00
Ken Raeburn 98df091243 * configure.in: Require at least autoconf 2.3, because earlier versions lose on
some AIX versions.
* configure: Regenerated.

* configure.in: Add m68k-*-elf.
* config/tc-m68k.c (comment_chars) [OBJ_ELF]: Include '#'.
(md_pseudo_table) [OBJ_ELF]: Ignore "swbeg".
(md_begin): Set alt_notend_table['&'], so svr4-style immediate operands are
accepted.
(md_apply_fix): Argument VALP should point to valueT.
(md_convert_frag): Argument SEC should be type segT.
(md_shortopts) [OBJ_ELF]: Accept 'Q' with an argument.
(md_parse_option): Ignore it.
(md_convert_frag_1): Add in frag address for the symbol in the displacement
calculation.
* config/tc-m68k.h (TARGET_FORMAT) [OBJ_ELF]: Use "elf32-m68k".
(TARGET_ARCH): Define.
(REGISTER_PREFIX_OPTIONAL) [OBJ_ELF]: Default to 0.
(LOCAL_LABEL, FAKE_LABEL_NAME, REGISTER_PREFIX_OPTIONAL): Handle these the same
way for OBJ_ELF as for M68KCOFF.
1995-04-11 23:51:52 +00:00
Ken Raeburn 7b1f56d41c * as.h (struct relax_type): Add forward declaration for type. 1995-04-11 22:55:29 +00:00
Ken Raeburn faf2dc2714 note doc changes 1995-04-11 06:34:31 +00:00
Ken Raeburn 7beebeb652 bunch o changes 1995-04-11 06:19:06 +00:00
Ken Raeburn 7015284b09 doc changes 1995-04-10 20:11:48 +00:00
David Edelsohn 47ba63b2bb ARC stuff. 1995-04-07 03:14:12 +00:00
Torbjorn Granlund 6d7bcd2f26 Changes for hosting on 64 bit machines. 1995-03-30 01:18:40 +00:00
Ian Lance Taylor 350f083c5f * config/tc-mips.c (md_show_usage): Mention -mips4 and -m4650. 1995-03-21 21:54:25 +00:00
Jeff Law bff1e14da7 * config/tc-hppa.c (pa_comm): Make sure to always reset the frag
and section for common symbols.
1995-03-17 19:42:22 +00:00
Ian Lance Taylor e5926c4a4c * ecoff.c (ecoff_build_debug): The cur_scope field of a fil_ptr
may be NULL when given strange input.  Don't core dump.
PR 6509.
1995-03-15 19:47:15 +00:00
Ian Lance Taylor a7f668c02f * config/tc-mips.c (load_register): Don't use addiu for dli of an
unsigned seemingly negative number.  Don't bother shifting a zero
	value.
	(mips_ip): For case 'j', if there are more alternatives, and the
	ISA level is at least 3, don't accept an unsigned seemingly
	negative number.
1995-03-15 02:39:39 +00:00
Ken Raeburn f6bc42a3c0 * read.c (s_app_line): Fix last patch to deal with a line number of 1. 1995-03-15 00:44:25 +00:00
Michael Meissner ce9a280583 Warn rather than cause an error if the reloc is not compatible with -mrelocatable. 1995-03-14 22:05:48 +00:00
Ken Raeburn 85a30e5978 Mon Mar 13 17:03:46 1995 Pat Rankin (rankin@eql.caltech.edu)
* config/tc-vax.c (md_assemble):  issue a warning if a constant
	is used as an operand where an immediate value is not allowed.
1995-03-14 02:27:26 +00:00
Ken Raeburn 78fcad5848 * config/obj-coff.c: Redo my 10 Jan change, but get it right this time. :-)
(fixup_segment): If linkrelax is set, just return.
(write_object_file): Don't treat h8300 and z8k specially with regard to fixups.
* config/tc-h8300.c (md_begin): Set linkrelax.
* config/tc-z8k.c (md_begin): Ditto.
1995-03-11 00:30:30 +00:00
Ian Lance Taylor 5fc2a6ecd2 * config/obj-coff.c (coff_header_append): Check return value of
bfd_coff_swap_scnhdr_out.
1995-03-09 23:02:43 +00:00
David Edelsohn 9a6ec5ebd1 Delete this patch, it breaks the h8300 assembler.
Tue Jan 10 13:34:14 1995  Ken Raeburn  <raeburn@cujo.cygnus.com>
	* config/obj-coff.c (write_object_file): Don't treat h8300 and z8k
	specially with regard to fixups.
1995-03-09 21:54:14 +00:00
Ian Lance Taylor a79bf95d03 * config/tc-mips.c (md_begin): Check for a cpu string of r8000 or
r10000.  If mips_isa is 4, set the machine number to 8000.
	(append_insn): If mips_isa is at least 4, don't generate nops for
	coprocessor delays.  Check INSN_READ_FPR_R when setting
	mips_cprmask[1].
	(mips_emit_delays): If mips_isa is at least 4, don't generate nops
	for coprocessor delays.
	(mips_ip): Check for INSN_ISA4 instructions.  Handle new argument
	types 'h', 'R', 'N', and 'M'.
	(md_longopts): Accept "mips4".
	(md_parse_option): Handle -mips4, and -mcpu=10000 and -mcpu=8000.
	(s_mipsset): Permit .set mips4.
1995-03-08 20:46:47 +00:00
Michael Meissner 74e1b52ea3 Allow .stab section to contain non PC relative addresses if -mrelocatable. 1995-03-08 15:03:50 +00:00
Ken Raeburn 82a7c4572a * config/tc-m68k.c (opcode_ptr): Return pointer to const.
(md_begin): Make hash table errors fatal.  Process opcode aliases after main
opcode table.
(md_apply_fix_2, case 4): Recode setting of lower_limit to avoid gcc warning.
1995-03-08 08:10:49 +00:00
David Edelsohn 3f4487d078 Patches to ARC to make byte order runtime selectable. 1995-03-08 04:47:31 +00:00
Ian Lance Taylor 3e39a55624 * doc/as.texinfo: Add documentation for SPARC V9, from Doug Evans
<dje@cygnus.com>.
1995-03-07 21:08:53 +00:00
Jeff Law 5f24161709 * config/tc-hppa.c: Change all occurences of pa-89 with pa-11 to
be consistent with current naming conventions.
	(md_begin): Set a default architecture and machine type.
	(pa_ip): If the current instruction specifies a newer machine type
	than the current machine type, then update the current machine
	type.
	(need_pa11_opcode): Likewise.
1995-03-06 17:02:38 +00:00
Jeff Law 2c23d22bee * config/tc-hppa.c (pa_ip, case 'z'): Don't lose argument
relocation bits for absolute calls.
1995-03-06 02:42:14 +00:00
Ken Raeburn cb7973c33e * config/tc-h8300.* (md_operand): Change empty function to empty macro.
* config/tc-h8300.c (build_bytes): Make H8/300-H warning message clearer.
1995-03-03 22:55:46 +00:00
Ken Raeburn 46f1280981 m68k entry i forgot to check in 1995-03-03 22:49:11 +00:00
Ken Raeburn 0578ade3f2 * write.c (write_contents): If bfd_set_section_contents fails, print a message
and exit, instead of aborting.
1995-03-03 22:44:04 +00:00
Michael Meissner 3f81f3cfe4 If -mrelocatable, warn about relocs that are incompatible. 1995-03-03 21:34:36 +00:00
Ken Raeburn 33d8f4697c read.c, tc-* md_operand changes 1995-02-28 23:38:47 +00:00
Ian Lance Taylor 0877841d73 * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust PLT or
GOT relocs either.
1995-02-28 20:35:41 +00:00
Kung Hsu d2c0206038 * configure.in: add a29k-*-vxworks configuration. 1995-02-27 21:05:00 +00:00
Ian Lance Taylor 7811254cb0 * config/tc-mips.c (load_register): Correctly handle 32 bit values
with the high bit set in 64 bit mode.
PR 6381.
1995-02-24 19:42:43 +00:00
Jeff Law e386acc8d7 * config/tc-hppa.c (md_apply_fix): Don't subtract the value of the
add symbol if it's a common symbol (the value of a common symbol
	is its size, not a value in the traditional sense).
1995-02-23 06:16:35 +00:00
Ian Lance Taylor 546f553610 * config/tc-mips.c (append_insn): If listing_prev_line is called,
call frag_grow to make sure there is still room for a variant.
1995-02-23 02:20:57 +00:00
Ian Lance Taylor 61420a2049 * config/tc-mips.c (md_pseudo_table): Add 2byte, 4byte and 8byte
if OBJ_ELF.  From gary@Intrepid.COM (Gary Funck).
1995-02-17 20:13:41 +00:00
Ian Lance Taylor 7a3761e194 * config/obj-elf.c (elf_frob_symbol): Warn if a symbol is both
weak and common.
	* config/obj-aout.c (obj_aout_frob_symbol): Likewise.
1995-02-17 19:54:47 +00:00
Michael Meissner 5836732bf5 Add PC relative support to PowerPC ELF assembler. 1995-02-17 17:51:00 +00:00
David Edelsohn b8ed3de398 * expr.c (operand): Move md_operand handling to default case
(so it works).
1995-02-16 22:35:50 +00:00
Ian Lance Taylor efc538bab9 Wed Feb 15 16:08:47 1995 Jason Molenda <crash@cygnus.com>
* config/tc-h8500.c (tc_coff_symbol_emit_hook): Add ignored
	parameter, to match prototype.
1995-02-15 21:11:10 +00:00
Ian Lance Taylor 49ad0c4cf3 * config/tc-mips.c (md_apply_fix): Accept BFD_RELOC_16, for
DWARF.  From gary@Intrepid.COM (Gary Funck).
1995-02-15 21:08:05 +00:00
Ian Lance Taylor adcf2b9d57 * config/tc-mips.c (macro): Handle M_U{L,S}D[_A] (unaligned double
loads and stores).
1995-02-15 20:43:57 +00:00
Ian Lance Taylor 34419a7fe3 Gas reloc handling reeks.
PR 6343.
1995-02-15 20:34:32 +00:00
Michael Meissner 4a6b2f8bbd All ELF relocs. 1995-02-15 20:15:07 +00:00
Ian Lance Taylor b2b8c24e2f * config/tc-mips.c (macro): Don't use the target register as a
base register when building the address for M_L{W,D}{L,R}_AB.
1995-02-15 16:48:18 +00:00
Ian Lance Taylor 08b7351f06 * config/tc-sparc.h (tc_fix_adjustable): Define if OBJ_ELF.
* config/tc-sparc.c (md_apply_fix): If OBJ_ELF, subtract out the
	value of a defined symbol; the value was added in by
	fixup_segment.  This was previously corrected, if the reloc was
	changed to be against a section symbol, in tc_gen_reloc.
1995-02-13 21:18:22 +00:00
Ian Lance Taylor e13a80f72f * config/tc-i386.c (tc_i386_fix_adjustable): Use S_IS_EXTERN
rather than !S_IS_LOCAL.
You might think they would be equivalent, but....
1995-02-10 19:05:43 +00:00
David Edelsohn 2ec8f45e6a Lotsa arc stuff. 1995-02-10 02:00:13 +00:00
Ian Lance Taylor 79c4bb347e * config/tc-i386.c (md_assemble): Adjust conditions for changing
BFD_RELOC_32 to BFD_RELOC_386_GOTPC to handle a switch in frags.
	Patch originally from Rob Ryan <robr@cmu.edu>.

	* config/tc-i386.c: Include subsegs.h.
	(tc_i386_fix_adjustable): Declare return value.
	(i386_operand): Don't use an assignment directly as a condition.
1995-02-09 23:19:27 +00:00
Jeff Law e6d311352a * config/tc-hppa.c (md_apply_fix): In some cases subtract the
value of the add symbol from valp.  Offsets braindamage in the
        "machine independent" fixup_segment.
1995-02-09 17:44:30 +00:00
Ken Raeburn e10c7dfcf4 * messages.c (as_abort): New function.
* as.h (as_abort): Declare it.
(abort): New macro.
1995-02-08 23:57:26 +00:00
Ken Raeburn 15f146bec4 Thu Jan 19 18:10:05 1995 Pat Rankin (rankin@eql.caltech.edu)
* config/vms-conf.h (HAVE_UNISTD_H):  define it unconditionally.
* config-gas.com:  test for availability of <unistd.h>; create a rudimentary
one if necessary.
1995-02-08 23:52:51 +00:00
Michael Meissner 06c08e9a1f Add support for powerpc-*-eabi in configure.in, rebuild configure. 1995-02-07 18:42:04 +00:00
Jeff Law b4682e519f Apparently I forgot to commit this change:
* config/tc-hppa.c (md_apply_fix): Go ahead and call
        hppa_field_adjust to get a new value for R_DATA_ONE_SYMBOL
        relocations in SOM.
        (hppa_fix_adjustable): Refine somewhat.
1995-02-07 18:20:57 +00:00
Ken Raeburn c54c7aaca3 Bryan Ford's changes for 16-bit i386 support, and i386-msdos support. 1995-02-06 08:53:05 +00:00
Ken Raeburn b003a2d9ee vms fixes from pat rankin 1995-02-02 21:33:40 +00:00
Ken Raeburn e2bf68803d * config/tc-m68k.c (cpu32_control_regs): New macro.
(m68k_init_after_args): Use it, for cpu32 processors.
1995-02-02 20:23:15 +00:00
Ken Raeburn a18a0f225d * config/tc-h8300.c (get_specific): Add parens around | inside &.
(skip_colonthing): Set L_8 if ":8" is specified.
1995-01-27 00:05:09 +00:00
Ian Lance Taylor 76e30835ad * config/tc-ppc.c (md_begin): Permit mfdec to be duplicated on the
601.  Check that the error return from hash_insert is "exists".
1995-01-26 23:41:12 +00:00
Michael Meissner da8fa3ba29 Allow configuration of PowerPC embedded ABI. 1995-01-26 16:39:26 +00:00
Jim Wilson 8d9a1cce3f * tc-sh.c (little): Add argument IGNORE to avoid compiler warnings.
(md_pseudo_table): Add space for consistent formatting.
	(COND8_RANGE, COND12_RANGE): Delete unused macros.
	(COND8_F, COND8_M, COND12_F, COND12_M, UNCOND12_F, UNCOND12_M):
	Correct minimum and maximum branch offsets.  Add comments explaining
	why these numbers are correct.
1995-01-26 00:26:11 +00:00