Commit graph

2202 commits

Author SHA1 Message Date
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
e840039ffc * gas/mri/comment.s, gas/mri/comment.d: New test.
* gas/mri/mri.exp: Run it.
	* gas/mri/expr.s: Remove whitespace in operand field.
	* gas/mri/for.s: Add comments for further testing.
	* gas/macros/test2.s: Put in an upper case ELSE to test case
	insensitivity.
1995-09-07 01:45:07 +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
5a75fe70c3 (synth64.[ds]): New testcase. 1995-08-30 23:11:09 +00:00
David Edelsohn
d4bc80760e (prefetch.[sd]): New testcase. 1995-08-30 20:58:35 +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
375b983be2 Keep the sparc subdir. 1995-08-30 06:03:39 +00:00
David Edelsohn
66449f5b5e (membar): New testcase. 1995-08-30 01:34:34 +00:00
David Edelsohn
593d18d36c * config/tc-sparc.c (sparc_ip): Clean up ASI support. 1995-08-29 22:48:54 +00:00
David Edelsohn
dfcb88ec92 Start of sparc generic testsuite.
asi.[ds]: new test.
1995-08-29 22:30:13 +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
4026c1222f * read.c (read_a_source_file): In MRI mode, don't end the
statement inside a quotation.
	(s_space): Don't warn about a zero repeat count in MRI mode.
	* config/tc-m68k.c (crack_operand): In MRI mode, don't count
	parentheses inside quotes.
	(md_assemble): In MRI mode, anything after the operands field is a
	comment.
	(parse_mri_control_operand): Adjust start and stop to remove
	spaces.
	(s_mri_for): Likewise.
1995-08-21 21:05:06 +00:00
Ian Lance Taylor
9821fda925 * app.c (do_scrub_next_char): If LEX_IS_STRINGQUOTE or
LEX_IS_ONECHAR_QUOTE is seen in	state 10, preserve one space.
1995-08-21 21:03:50 +00:00
Ian Lance Taylor
96dbd10de8 * gas/macros/*: New tests for macros. 1995-08-21 18:45:08 +00:00
Ian Lance Taylor
d2f661bd18 * gasp/pl3.out: Update for changes in commented source output when
LOCAL is used.
1995-08-21 18:42:09 +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
Ian Lance Taylor
7172e2266f * app.c (do_scrub_begin): In MRI mode, set lex of ' to
LEX_IS_STRINGQUOTE.
1995-08-21 18:19:21 +00:00
Ian Lance Taylor
075e616c28 * cond.c (get_mri_string): New static function.
(s_ifc): New function.
1995-08-21 18:18:56 +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
d0af548446 * gasp/gasp.exp (gasp_test): Call prune_system_crud on the output
of diff.
	* lib/gas-defs.exp: Define prune_system_crud if it is not already
	defined.
1995-08-19 21:37:43 +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
65d860fc28 * gasp/mri/*.out: Use ;, not !, for the comment character. 1995-08-18 15:10:35 +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
3a3a17b415 * gas/mri/mri.exp: Change hppa*-*-* expected failures to only
expect failure for targets which use SOM.
1995-08-16 21:57:37 +00:00
Ian Lance Taylor
a46c0ed860 * lib/gas-defs.exp (run_dump_test): If the program to run does not
exist, mark the test as untested.
1995-08-16 21:13:52 +00:00
Ian Lance Taylor
7863267c43 * gas/mri/mri.exp: Add setup_xfail for i960 b.out targets for
common test.
1995-08-16 20:43:22 +00:00
Ian Lance Taylor
a0cc993c12 * lib/gas-defs.exp (run_dump_test): Name the output file dump.o,
rather than using an implicit a.out.
1995-08-16 20:42:15 +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
51c7f8f3c2 * gas/mri/for.s: Add nop to round out to four byte boundary.
* gas/mri/repeat.s: Likewise.
	* gas/mri/while.s: Likewise.
	* gas/mri/for.d: Expected added nop.
	* gas/mri/repeat.d: Likewise.
	* gas/mri/while.d: Likewise.
1995-08-16 20:17:29 +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
Ian Lance Taylor
983be6687c * gas/mips/*.d: Change all test names to say MIPS. 1995-08-16 16:28:00 +00:00
Ian Lance Taylor
f5cf5e17bf * gas/mri/for.d, gas/mri/for.s: New test.
* gas/mri/if.d, gas/mri/if.s: New test.
	* gas/mri/repeat.d, gas/mri/repeat.s: New test.
	* gas/mri/while.d, gas/mri/while.s: New test.
	* gas/mri/mri.exp: Run the new tests.
1995-08-15 19:44:20 +00:00
Ian Lance Taylor
c842dd375d * config/tc-m68k.c (md_pseudo_table): Add MRI structured control
directives: if, if.b, if.w, if.l, else, else.s, else.l, endi,
	break, break.s, break.l, next, next.s, next.l, for, for.b, for.w,
	for.l, endf, repeat, until, until.b, until.w, until.l, while,
	while.b, while.w, while.l, endw.
	(enum mri_control_type): Define.
	(struct mri_control_info): Define.
	(mri_control_stack): New static variable.
	(mri_control_index): New static variable.
	(mri_control_label): New static function.
	(push_mri_control, pop_mri_control): New static functions.
	(parse_mri_condition): New static function.
	(parse_mri_control_operand): New static function.
	(swap_mri_condition, reverse_mri_condition): New static functions.
	(build_mri_control_operand): New static function.
	(parse_mri_control_expression): New static function.
	(s_mri_if, s_mri_else, s_mri_endi): New static functions.
	(s_mri_break, s_mri_next): New static functions.
	(s_mri_for, s_mri_endf): New static functions.
	(s_mri_repeat, s_mri_until): New static functions.
	(s_mri_while, s_mri_endw): New static functions.
	* gasp.c (mrikinfo): Remove IF.
	* expr.c (get_symbol_end): Accept \001 as part of a name.
1995-08-15 19:42:47 +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
Ian Lance Taylor
f2cc4ccdc3 * gas/mri/expr.d: Permit leading zeroes, in case we're using a
64-bit BFD.
1995-08-14 20:59:36 +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
b2e0bd6315 * gasp/mri/*: New tests.
* gasp/gasp.exp: Run them.  Also, clean up the test names used in
	pass and fail.
1995-08-14 20:06:03 +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
9bef2324a2 * config/tc-m68k.c (s_opt): Reset *input_line_pointer even if we
don't do anything with the option.
1995-08-14 19:50:12 +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
e62fb52590 * gas/sh/basic.exp: Update now that we know the right
bit patters for the new sts instructions.
1995-08-13 06:41:18 +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
bd59fa7505 * gas/mri/char.d: Fix for little endian machines.
* gas/mri/float.d: Likewise.
1995-08-10 04:47:20 +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
69e077f3c7 * read.c (mri_line_label): Make non-static.
(potable): Add nopage, page, plen.
	(s_org): Error if in MRI mode.
	* read.h (mri_line_label): Declare.
	* listing.c (listing_nopage): New function.
	* listing.h (listing_nopage): Declare.
1995-08-09 23:16:06 +00:00
Ian Lance Taylor
db317fe7a7 * symbols.c (symbol_begin): Set sy_frag of abs_symbol to
&zero_address_frag.
1995-08-09 23:13:30 +00:00
Ian Lance Taylor
60e36671ef * gas/all/struct.s, gas/all/struct.d: New test.
* gas/all/gas.exp: Run it.
1995-08-09 19:38:01 +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
e120d9fbcd * write.c (adjust_reloc_syms): Check that symbol is not NULL
before checking sy_mri_common.
	(fixup_segment): Likewise.
	* config/obj-coff.c (fixup_segment): Likewise.
1995-08-09 19:34:00 +00:00
Ian Lance Taylor
a2acbf8d12 * frags.c (frag_more): Warn if in absolute_section.
(frag_now_fix): In absolute_section, return abs_section_offset.
	* subsegs.c (subseg_change): If switching to absolute_section,
	just set now_seg and now_subseg.
	(subseg_set_rest): Special handling when switching to or from
	absolute_section.
1995-08-09 19:33:17 +00:00
Ian Lance Taylor
27a53b88d7 * config/tc-m68k.c (m68k_float_copnum): New static variable.
(md_pseudo_table): Add fopt and mask2.
	(m68k_ip): Use m68k_float_copnum, not COPNUM, when setting
	coprocessor register to use.  In case 'I' when checking operands,
	correct coprocessor register numbers.  In case 'I' when setting
	operands, don't add 1.
	(s_fopt): New static function.
	* config/m68k-parse.h (COPNUM): Don't define.
1995-08-09 19:32:49 +00:00
Ian Lance Taylor
51a3bc1501 * listing.c (listing_psize): Treat argument as indicating whether
a height is expected.
1995-08-09 19:32:03 +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
b57bd74908 * gas/mri/common.s, gas/mri/common.d: New test.
* gas/mri/mri.exp: Run it.
1995-08-08 21:41:52 +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