+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.
+
2002-02-18 Daniel Jacobowitz <drow@mvista.com>
* config/obj-coff.h: Check !target_big_endian, not shl, for coff-sh.
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);
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;
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"));
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);
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