From e14994d9805ce899cdaeb010be7a7bc5887dbdaf Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 10 Aug 1995 16:19:34 +0000 Subject: * 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. --- gas/config/tc-m68k.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) (limited to 'gas/config/tc-m68k.c') diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c index 3832755..55137c5 100644 --- a/gas/config/tc-m68k.c +++ b/gas/config/tc-m68k.c @@ -295,6 +295,8 @@ static void s_chip PARAMS ((int)); static void s_fopt PARAMS ((int)); static void s_opt PARAMS ((int)); static void s_reg PARAMS ((int)); +static void s_restore PARAMS ((int)); +static void s_save PARAMS ((int)); static int current_architecture; @@ -427,6 +429,8 @@ CONST pseudo_typeS md_pseudo_table[] = {"mask2", s_ignore, 0}, {"opt", s_opt, 0}, {"reg", s_reg, 0}, + {"restore", s_restore, 0}, + {"save", s_save, 0}, {0, 0, 0} }; @@ -4432,6 +4436,85 @@ s_reg (ignore) demand_empty_rest_of_line (); } + +/* This structure is used for the MRI SAVE and RESTORE pseudo-ops. */ + +struct save_opts +{ + struct save_opts *next; + int abspcadd; + int symbols_case_sensitive; + int keep_locals; + int short_refs; + int architecture; + int quick; + int rel32; + int listing; + int no_warnings; + /* FIXME: We don't save OPT S. */ +}; + +/* This variable holds the stack of saved options. */ + +static struct save_opts *save_stack; + +/* The MRI SAVE pseudo-op. */ + +static void +s_save (ignore) + int ignore; +{ + struct save_opts *s; + + s = (struct save_opts *) xmalloc (sizeof (struct save_opts)); + s->abspcadd = m68k_abspcadd; + s->symbols_case_sensitive = symbols_case_sensitive; + s->keep_locals = flag_keep_locals; + s->short_refs = flag_short_refs; + s->architecture = current_architecture; + s->quick = m68k_quick; + s->rel32 = m68k_rel32; + s->listing = listing; + s->no_warnings = flag_no_warnings; + + s->next = save_stack; + save_stack = s; + + demand_empty_rest_of_line (); +} + +/* The MRI RESTORE pseudo-op. */ + +static void +s_restore (ignore) + int ignore; +{ + struct save_opts *s; + + if (save_stack == NULL) + { + as_bad ("restore without save"); + ignore_rest_of_line (); + return; + } + + s = save_stack; + save_stack = s->next; + + m68k_abspcadd = s->abspcadd; + symbols_case_sensitive = s->symbols_case_sensitive; + flag_keep_locals = s->keep_locals; + flag_short_refs = s->short_refs; + current_architecture = s->architecture; + m68k_quick = s->quick; + m68k_rel32 = s->rel32; + listing = s->listing; + flag_no_warnings = s->no_warnings; + + free (s); + + demand_empty_rest_of_line (); +} /* * md_parse_option -- cgit v1.1