diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-02-13 00:20:13 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-02-13 00:20:13 +0000 |
commit | 20710f1c0ccbba776cfb966cbb41fd7b7cf6cbb1 (patch) | |
tree | 432a076ab1435f1d148a46b8d23413281db62cb8 /gas/read.c | |
parent | 229b2c8788d8faf894c99fbf346a2613c760b1c3 (diff) | |
download | gdb-20710f1c0ccbba776cfb966cbb41fd7b7cf6cbb1.zip gdb-20710f1c0ccbba776cfb966cbb41fd7b7cf6cbb1.tar.gz gdb-20710f1c0ccbba776cfb966cbb41fd7b7cf6cbb1.tar.bz2 |
* 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.
Diffstat (limited to 'gas/read.c')
-rw-r--r-- | gas/read.c | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -333,6 +333,8 @@ static const pseudo_typeS potable[] = {"lsym", s_lsym, 0}, {"macro", s_macro, 0}, {"mexit", s_mexit, 0}, + {"mri", s_mri, 0}, + {".mri", s_mri, 0}, /* Special case so .mri works in MRI mode. */ {"name", s_ignore, 0}, {"noformat", s_ignore, 0}, {"nolist", listing_list, 0}, /* Turn listing off */ @@ -1994,6 +1996,37 @@ s_mexit (ignore) buffer_limit = input_scrub_next_buffer (&input_line_pointer); } +/* Switch in and out of MRI mode. */ + +void +s_mri (ignore) + int ignore; +{ + int on, old_flag; + + on = get_absolute_expression (); + old_flag = flag_mri; + if (on != 0) + { + flag_mri = 1; +#ifdef TC_M68K + flag_m68k_mri = 1; +#endif + } + else + { + flag_mri = 0; + flag_m68k_mri = 0; + } + +#ifdef MRI_MODE_CHANGE + if (on != old_flag) + MRI_MODE_CHANGE (on); +#endif + + demand_empty_rest_of_line (); +} + /* Handle changing the location counter. */ static void |