diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2002-02-19 18:50:35 +0000 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2002-02-19 18:50:35 +0000 |
commit | ff0fb56520125c736ba381e62fe2b51dc571b203 (patch) | |
tree | cb33fb27b220b8ea3d3aab9750c08f096b6cacdf /gas/config/tc-s390.c | |
parent | 65d6d66a1d8bf3f39f2624c64736103aff32df20 (diff) | |
download | gdb-ff0fb56520125c736ba381e62fe2b51dc571b203.zip gdb-ff0fb56520125c736ba381e62fe2b51dc571b203.tar.gz gdb-ff0fb56520125c736ba381e62fe2b51dc571b203.tar.bz2 |
2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
* 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.
Diffstat (limited to 'gas/config/tc-s390.c')
-rw-r--r-- | gas/config/tc-s390.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c index 2fb2c6c..966db56 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 |