aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Christopher <echristo@redhat.com>2004-12-07 22:17:21 +0000
committerEric Christopher <echristo@gcc.gnu.org>2004-12-07 22:17:21 +0000
commita122d1f1d3907a98c078369042864d04634974d2 (patch)
tree858f294d4eea90b4a99e88bd9861922b65d53e0b /gcc
parent54e4aedb7edbbb9daac9a5e3ece26183393550e2 (diff)
downloadgcc-a122d1f1d3907a98c078369042864d04634974d2.zip
gcc-a122d1f1d3907a98c078369042864d04634974d2.tar.gz
gcc-a122d1f1d3907a98c078369042864d04634974d2.tar.bz2
re PR target/18442 (Rejects attribute((mode(SI))) when using -mint64)
2004-12-07 Eric Christopher <echristo@redhat.com> PR target/18442 * config/mips/mips.c (mips_vector_mode_supported_p): New function. (TARGET_SCALAR_MODE_SUPPORTED_P): Define to above. From-SVN: r91820
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/mips/mips.c26
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 338cc63..05d9736 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2004-12-07 Eric Christopher <echristo@redhat.com>
+
+ PR target/18442
+ * config/mips/mips.c (mips_vector_mode_supported_p): New function.
+ (TARGET_SCALAR_MODE_SUPPORTED_P): Define to above.
+
2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
* c-common.c, expr.c, fold-const.c, print-tree.c,
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 1b98eca..990671c 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -352,6 +352,7 @@ static bool mips_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode mode,
tree, bool);
static bool mips_callee_copies (CUMULATIVE_ARGS *, enum machine_mode mode,
tree, bool);
+static bool mips_scalar_mode_supported_p (enum machine_mode);
static bool mips_vector_mode_supported_p (enum machine_mode);
static rtx mips_prepare_builtin_arg (enum insn_code, unsigned int, tree *);
static rtx mips_prepare_builtin_target (enum insn_code, unsigned int, rtx);
@@ -800,6 +801,9 @@ const struct mips_cpu_info mips_cpu_info_table[] = {
#undef TARGET_VECTOR_MODE_SUPPORTED_P
#define TARGET_VECTOR_MODE_SUPPORTED_P mips_vector_mode_supported_p
+#undef TARGET_SCALAR_MODE_SUPPORTED_P
+#define TARGET_SCALAR_MODE_SUPPORTED_P mips_scalar_mode_supported_p
+
#undef TARGET_INIT_BUILTINS
#define TARGET_INIT_BUILTINS mips_init_builtins
#undef TARGET_EXPAND_BUILTIN
@@ -7076,6 +7080,28 @@ mips_valid_pointer_mode (enum machine_mode mode)
return (mode == SImode || (TARGET_64BIT && mode == DImode));
}
+/* Define this so that we can deal with a testcase like:
+
+ char foo __attribute__ ((mode (SI)));
+
+ then compiled with -mabi=64 and -mint64. We have no
+ 32-bit type at that point and so the default case
+ always fails. Instead of special casing everything
+ it's easier to accept SImode in this function and
+ then punt to the default which will work for all
+ of the cases where we deal with TARGET_64BIT, etc. */
+static bool
+mips_scalar_mode_supported_p (enum machine_mode mode)
+{
+ /* We can always handle SImode. */
+ if (mode == SImode)
+ return true;
+ else
+ return default_scalar_mode_supported_p (mode);
+
+}
+
+
/* Target hook for vector_mode_supported_p. */
static bool
mips_vector_mode_supported_p (enum machine_mode mode)