Commit Graph

8 Commits

Author SHA1 Message Date
Ian Lance Taylor
20710f1c0c * read.c (potable): Add "mri" and ".mri".
(s_mri): New function.
	* read.h (s_mri): Declare.
	* app.c (scrub_m68k_mri): New static variable.
	(mri_pseudo): New static variable.
	(do_scrub_begin): Add m68k_mri parameter.  Use it rather than
	flag_m68k_mri.  Initialize scrub_m68k_mri.
	(mri_state, mri_last_ch): New static variables.
	(struct app_save): Add scrub_m68k_mri, mri_state, and mri_last_ch
	fields.
	(app_push): Save new fields.
	(app_pop): Restore new fields.
	(do_scrub_chars): Check scrub_m68k_mri rather than flag_mri_mri.
	If TC_M68K, use a trivial state machine to look for occurrences of
	the .mri pseudo-op, and change the mode appropriately.
	* as.h (do_scrub_begin): Update prototype.
	* input-scrub.c (input_scrub_begin): Pass flag_m68k_mri to
	do_scrub_begin.
	* config/tc-m68k.c (reg_prefix_optional_seen): New static
	variable.
	(m68k_mri_mode_change): New function.
	(md_parse_option): Set reg_prefix_optional_seen.
	* config/tc-m68k.h (m68k_mri_mode_change): Declare.
	(MRI_MODE_CHANGE): Define.
	* doc/as.texinfo: Document .mri pseudo-op.
1996-02-13 00:20:13 +00:00
Ian Lance Taylor
a043f579df Mon Feb 12 15:16:29 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Support for OBJ_ELF on m68k, mostly inside #ifdef OBJ_ELF:
	* config/m68k-parse.h (enum pic_relocation): Define.
	(struct m68k_exp): Add pic_reloc field.
	* config/tc-m68k.h (TC_RELOC_RTSYM_LOC_FIXUP): Define.
	(tc_fix_adjustable): Define to call tc_m68k_fix_adjustable.
	(NO_RELOC): Define to BFD_RELOC_NONE if BFD_ASSEMBLER, to zero
	otherwise.
	* config/tc-m68k.c: Delete definition of NO_RELOC.
 	(struct m68k_it): Add pic_reloc field.
	(add_fix): Copy over pic_reloc field.
	(md_pseudo_table): Interpret .align parameter as byte count.
	(mote_pseudo_table): Likewise.
	(tc_m68k_fix_adjustable): New function.
	(get_reloc_code): New function.
	(md_assemble): Use it as last argument to fix_new_exp.
	(md_apply_fix_2): For a relocation against a symbol don't put the
	addend into the data.
	(tc_gen_reloc): Different addend computation for OBJ_ELF.
	(m68k_ip): Don't relax an operand that requires pic relocation.
	(md_begin): Align .text, .data and .bss on 4 byte boundary by
	default.
	* write.c (fixup_segment): Don't add symbol value to addend if
 	TC_M68K and OBJ_ELF.
	* config/m68k-parse.y (yylex): Handle @PLTPC, etc.
	(motorola_operand): Add rule for `(zapc, EXPR)'.
1996-02-12 20:33:06 +00:00
Ken Raeburn
326aa685fe * tc-m68k.c (flag_reg_prefix_optional): New variable. Initialized to value of
REGISTER_PREFIX_OPTIONAL, if defined, or zero.
(m68k_reg_parse): If flag_reg_prefix_optional is set, permit register prefix to
be absent.
(m68k_ip_op): Accept `&' also for immediate constants.
(insert_reg): Don't bother with (two!?) sanity checks of the symbol table when
inserting each register.
(m68k_parse_long_option): New function.  Set flag_reg_prefix_optional if
"register-prefix-optional" is passed.
* tc-m68k.h (REGISTER_PREFIX): Always define if not already defined.
(OPTIONAL_REGISTER_PREFIX): Don't define.
(REGISTER_PREFIX_OPTIONAL): If not already defined, define as zero
or one depending on M68KCOFF.

Some changes to help Apollo support, from troy@cbme.unsw.edu.au:
* tc-m68k.c (DATA, ADDR, SP, FPREG, COPNUM, BAD, BAC): Define as macros instead
of enumerators, since the Apollo compiler can't handle "enumVal1, enumVal2 =
enumVal1" when defining an enum type.
(make_pcrel_absolute) [NO_PCREL_RELOCS]: New function.
(tc_coff_fix2rtype) [NO_PCREL_RELOCS]: Generate only R_RELBYTE, R_DIR16, and
R_DIR32 relocs.
* tc-m68k.h [TE_APOLLO] (COFF_MAGIC, COFF_AOUTHDR_MAGIC): Use Apollo versions.
[TE_APOLLO] (OBJ_COFF_OMIT_OPTIONAL_HEADER): Undefine.  That is, do include the
optional header for Apollo target.
(COFF_MAGIC): Don't define as MC68MAGIC if it's already defined.

* tc-m68k.h [TE_DELTA] (LEX_PCT): Define as 1, so that `%' can be used within a
label name.

* tc-m68k.h (m68k_init_after_args): Declare.
(tc_init_after_args): Define as m68k_init_after_args.
* tc-m68k.c (m68k_init_after_args): New function, containing one-shot code from
md_assemble.  Added warning for combination of 68040 and 68851.
(md_assemble): Startup-time code deleted.
1994-04-26 22:21:15 +00:00
Ian Lance Taylor
dff60b7d48 * config/tc-m68k.h (AOUT_MACHTYPE): Define to be external variable
m68k_aout_machtype.
	* config/tc-m68k.c (omagic): Remove obsolete and unused variable.
	(m68k_aout_machtype): New variable, if OBJ_AOUT.
	(md_assemble): Initialize m68k_aout_machtype based on
	current_architecture, if OBJ_AOUT.
	(md_parse_option): Remove obsolete reference to omagic.
1993-10-19 22:18:15 +00:00
Ken Raeburn
e3fce8d283 define DIFF_EXPR_OK 1993-09-27 03:56:04 +00:00
Ian Lance Taylor
3ad9ec6a7b Wed Sep 9 11:10:24 1992 Ian Lance Taylor (ian@cygnus.com)
* tc-m68k.c (m68k_ip, m68k_ip_op, get_num, try_moto_index): merge
	 Motorola and MIT syntax; gas can now assemble either type of
	 file.
	tc-m68kmote.c, tc-m68kmote.h: removed now superfluous files.
	From Steve Chamberlain:
	m68kcoff.mt: for m68k COFF.
	obj-coffbfd.c: (fixup_mdeps) added
	 (size_section) removed bad sanity check
	 (fill_section) added rs_machine_dependent case
	 (write_object_file) call fixup_mdeps
	 (fixup_segment) set fx_subsy to 0.
	obj-coffbfd.h: define WORKING_DOT_WORD (too hard to support) and
	 handle m68k.
	tc-m68k.c, config/tc-m68k.h: added m68k COFF support and Motorala
	 pseudo ops.
1992-09-09 18:38:16 +00:00
K. Richard Pixley
a39116f1c9 White space and comments only. The devo tree prior to this delta is
tagged as "vanilla" for your convenience.

There are also some comment changes.
1992-02-13 08:33:54 +00:00
K. Richard Pixley
fecd2382e7 Initial revision 1991-04-04 18:19:53 +00:00