From df9a398fe6867c16f436754965dc0986870ad286 Mon Sep 17 00:00:00 2001 From: Martin Schwidefsky Date: Wed, 18 Jun 2003 11:18:46 +0000 Subject: [PATCH] * config/tc-s390.c (init_default_arch): Make current_mode_mask dependent on s390_arch_size and current_cpu dependent on current_mode_mask. --- gas/ChangeLog | 6 ++++++ gas/config/tc-s390.c | 23 +++++++++++++++-------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index c715e69d687..ac7ca20625c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2003-06-18 Martin Schwidefsky + + * config/tc-s390.c (init_default_arch): Make current_mode_mask + dependent on s390_arch_size and current_cpu dependent on + current_mode_mask. + 2003-06-18 Svein E. Seldal * configure.in: Add c4x as an architecture variant to tic4x. diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c index 97edcc3b69b..b0340b13e27 100644 --- a/gas/config/tc-s390.c +++ b/gas/config/tc-s390.c @@ -327,22 +327,29 @@ init_default_arch () { if (s390_arch_size == 0) s390_arch_size = 32; - if (current_mode_mask == 0) - current_mode_mask = 1 << S390_OPCODE_ESA; - if (current_cpu == -1U) - current_cpu = S390_OPCODE_G5; } else if (strcmp (default_arch, "s390x") == 0) { if (s390_arch_size == 0) s390_arch_size = 64; - if (current_mode_mask == 0) - current_mode_mask = 1 << S390_OPCODE_ZARCH; - if (current_cpu == -1U) - current_cpu = S390_OPCODE_Z900; } else as_fatal ("Invalid default architecture, broken assembler."); + + if (current_mode_mask == 0) + { + if (s390_arch_size == 32) + current_mode_mask = 1 << S390_OPCODE_ESA; + else + current_mode_mask = 1 << S390_OPCODE_ZARCH; + } + if (current_cpu == -1U) + { + if (current_mode_mask == (1 << S390_OPCODE_ESA)) + current_cpu = S390_OPCODE_G5; + else + current_cpu = S390_OPCODE_Z900; + } } /* Called by TARGET_FORMAT. */ -- 2.30.2