aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i960/i960.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-09-21 09:10:36 -0700
committerRichard Henderson <rth@gcc.gnu.org>2002-09-21 09:10:36 -0700
commit3dc85dfb4af5543dc2b997d19e4c33260e58983b (patch)
treecf255ab7cc385de8be819f436b5513ec3c5357c2 /gcc/config/i960/i960.c
parent838dfd8a4ef2572d4831643b01d70f78ba6e7747 (diff)
downloadgcc-3dc85dfb4af5543dc2b997d19e4c33260e58983b.zip
gcc-3dc85dfb4af5543dc2b997d19e4c33260e58983b.tar.gz
gcc-3dc85dfb4af5543dc2b997d19e4c33260e58983b.tar.bz2
real.c (struct real_format): Move to real.h.
* real.c (struct real_format): Move to real.h. (real_format_for_mode): Rename from fmt_for_mode; update all users; initialize with ieee defaults. (real_to_target_fmt, real_from_target_fmt): New. (ieee_single_format, ieee_double_format, ieee_extended_motorola_format, ieee_extended_intel_96_format, ieee_extended_intel_128_format, ieee_quad_format, i370_single_format, i370_double_format, c4x_single_format, c4x_extended_format): Rename from s/_format//. (ieee_quad_format): Fix emin. (format_for_size, init_real_once): Remove. * real.h (struct real_format): Move from real.c. (real_format_for_mode): Declare. (real_to_target_fmt, real_from_target_fmt): Declare. (ieee_single_format, ieee_double_format, ieee_extended_motorola_format, ieee_extended_intel_96_format, ieee_extended_intel_128_format, ieee_quad_format, vax_f_format, vax_d_format, vax_g_format, i370_single_format, i370_double_format, c4x_single_format, c4x_extended_format): Declare. * toplev.c (do_compile): Don't call init_real_once. * defaults.h (INTEL_EXTENDED_IEEE_FORMAT): Remove. * doc/tm.texi (INTEL_EXTENDED_IEEE_FORMAT): Remove. * config/alpha/alpha.h (TARGET_FLOAT_FORMAT): Define. * config/alpha/osf5.h (LONG_DOUBLE_TYPE_SIZE): 64, if vax mode. * config/alpha/alpha.c (override_options): Set real_format_for_mode for VAX, if enabled. * config/c4x/c4x.c (c4x_override_options): Set real_format_for_mode for C4X. * config/i370/i370.h (OVERRIDE_OPTIONS): New. * config/i370/i370.c (override_options): New. * config/i370/i370-protos.h: Update. * config/i386/i386.c (override_options): Set real_format_for_mode for Intel 80-bit extended. * config/i386/i386.h (INTEL_EXTENDED_IEEE_FORMAT): Remove. * config/i960/i960.h (LONG_DOUBLE_TYPE_SIZE): Mind -mlong-double-64. (OVERRIDE_OPTIONS): Move code... * config/i960/i960.c (i960_initialize): ... here. Set real_format_for_mode for Intel 80-bit extended. * config/ia64/ia64.c (ia64_override_options): Set real_format_for_mode for Intel 80-bit extended, if enabled. * config/m68k/m68k.c (override_options): Set real_format_for_mode for Motorola 96-bit extended. * config/vax/vax.h (OVERRIDE_OPTIONS): New. * config/vax/vax.c (override_options): New. * config/vax/vax-protos.h: Update. From-SVN: r57388
Diffstat (limited to 'gcc/config/i960/i960.c')
-rw-r--r--gcc/config/i960/i960.c41
1 files changed, 40 insertions, 1 deletions
diff --git a/gcc/config/i960/i960.c b/gcc/config/i960/i960.c
index 7ebbb9e..7dbe852 100644
--- a/gcc/config/i960/i960.c
+++ b/gcc/config/i960/i960.c
@@ -100,11 +100,47 @@ static int ret_label = 0;
struct gcc_target targetm = TARGET_INITIALIZER;
-/* Initialize variables before compiling any files. */
+/* Override conflicting target switch options.
+ Doesn't actually detect if more than one -mARCH option is given, but
+ does handle the case of two blatantly conflicting -mARCH options.
+
+ Also initialize variables before compiling any files. */
void
i960_initialize ()
{
+ if (TARGET_K_SERIES && TARGET_C_SERIES)
+ {
+ warning ("conflicting architectures defined - using C series");
+ target_flags &= ~TARGET_FLAG_K_SERIES;
+ }
+ if (TARGET_K_SERIES && TARGET_MC)
+ {
+ warning ("conflicting architectures defined - using K series");
+ target_flags &= ~TARGET_FLAG_MC;
+ }
+ if (TARGET_C_SERIES && TARGET_MC)
+ {
+ warning ("conflicting architectures defined - using C series");
+ target_flags &= ~TARGET_FLAG_MC;
+ }
+ if (TARGET_IC_COMPAT3_0)
+ {
+ flag_short_enums = 1;
+ flag_signed_char = 1;
+ target_flags |= TARGET_FLAG_CLEAN_LINKAGE;
+ if (TARGET_IC_COMPAT2_0)
+ {
+ warning ("iC2.0 and iC3.0 are incompatible - using iC3.0");
+ target_flags &= ~TARGET_FLAG_IC_COMPAT2_0;
+ }
+ }
+ if (TARGET_IC_COMPAT2_0)
+ {
+ flag_signed_char = 1;
+ target_flags |= TARGET_FLAG_CLEAN_LINKAGE;
+ }
+
if (TARGET_IC_COMPAT2_0)
{
i960_maxbitalignment = 8;
@@ -115,6 +151,9 @@ i960_initialize ()
i960_maxbitalignment = 128;
i960_last_maxbitalignment = 8;
}
+
+ /* Tell the compiler which flavor of XFmode we're using. */
+ real_format_for_mode[XFmode - QFmode] = &ieee_extended_intel_96_format;
}
/* Return true if OP can be used as the source of an fp move insn. */