From ff0fb56520125c736ba381e62fe2b51dc571b203 Mon Sep 17 00:00:00 2001 From: Martin Schwidefsky Date: Tue, 19 Feb 2002 18:50:35 +0000 Subject: [PATCH] 2002-02-19 Martin Schwidefsky * config/tc-s390.c (md_parse_option): Add switches -m31 and -m64. Make bit size independent of architecture switch. (md_begin): Add warning for -m64 with -Aesa. (s390_md_end): Use renamed architecture defines. --- gas/ChangeLog | 7 +++++++ gas/config/tc-s390.c | 24 +++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index ada45b23847..6b45eb487e8 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2002-02-19 Martin Schwidefsky + + * config/tc-s390.c (md_parse_option): Add switches -m31 and -m64. + Make bit size independent of architecture switch. + (md_begin): Add warning for -m64 with -Aesa. + (s390_md_end): Use renamed architecture defines. + 2002-02-18 Daniel Jacobowitz * config/obj-coff.h: Check !target_big_endian, not shl, for coff-sh. diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c index 2fb2c6c3a25..966db56b1f2 100644 --- a/gas/config/tc-s390.c +++ b/gas/config/tc-s390.c @@ -373,6 +373,12 @@ md_parse_option (c, arg) else if (arg != NULL && strcmp (arg, "warn-areg-zero") == 0) warn_areg_zero = TRUE; + else if (arg != NULL && strcmp (arg, "31") == 0) + s390_arch_size = 31; + + else if (arg != NULL && strcmp (arg, "64") == 0) + s390_arch_size = 64; + else { as_bad (_("invalid switch -m%s"), arg); @@ -382,15 +388,9 @@ md_parse_option (c, arg) case 'A': if (arg != NULL && strcmp (arg, "esa") == 0) - { current_architecture = S390_OPCODE_ESA; - s390_arch_size = 32; - } else if (arg != NULL && strcmp (arg, "esame") == 0) - { current_architecture = S390_OPCODE_ESAME; - s390_arch_size = 64; - } else as_bad ("invalid architecture -A%s", arg); current_arch_mask = 1 << current_architecture; @@ -422,7 +422,9 @@ md_show_usage (stream) S390 options:\n\ -mregnames Allow symbolic names for registers\n\ -mwarn-areg-zero Warn about zero base/index registers\n\ - -mno-regnames Do not allow symbolic names for registers\n")); + -mno-regnames Do not allow symbolic names for registers\n\ + -m31 Set file format to 31 bit format\n\ + -m64 Set file format to 64 bit format\n")); fprintf (stream, _("\ -V print assembler version number\n\ -Qy, -Qn ignored\n")); @@ -440,6 +442,10 @@ md_begin () boolean dup_insn = false; const char *retval; + /* Give a warning if the combination -m64-bit and -Aesa is used. */ + if (s390_arch_size == 64 && current_arch_mask == (1 << S390_OPCODE_ESA)) + as_warn ("The 64 bit file format is used without esame instructions."); + /* Set the ELF flags if desired. */ if (s390_flags) bfd_set_private_flags (stdoutput, s390_flags); @@ -487,9 +493,9 @@ void s390_md_end () { if (s390_arch_size == 64) - bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_esame); + bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_64); else - bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_esa); + bfd_set_arch_mach (stdoutput, bfd_arch_s390, bfd_mach_s390_31); } void -- 2.30.2