aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-08-14 00:41:21 -0700
committerRichard Henderson <rth@gcc.gnu.org>2004-08-14 00:41:21 -0700
commit06d69cd3f36436b61e85a71caf2ab4cf75316b42 (patch)
treef65ee46abc8fdcc78833bb133081242356b6efb8 /gcc
parent1c5192e40c0aa1c8e4f48d0ee0e5d303c72012b4 (diff)
downloadgcc-06d69cd3f36436b61e85a71caf2ab4cf75316b42.zip
gcc-06d69cd3f36436b61e85a71caf2ab4cf75316b42.tar.gz
gcc-06d69cd3f36436b61e85a71caf2ab4cf75316b42.tar.bz2
alpha.h (PROMOTE_MODE): Don't promote vector types.
* config/alpha/alpha.h (PROMOTE_MODE): Don't promote vector types. * config/alpha/alpha.c (function_value): Use PROMOTE_MODE. From-SVN: r85989
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/alpha/alpha.c5
-rw-r--r--gcc/config/alpha/alpha.h26
3 files changed, 23 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 415c0fc..21ae7f9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-14 Richard Henderson <rth@redhat.com>
+
+ * config/alpha/alpha.h (PROMOTE_MODE): Don't promote vector types.
+ * config/alpha/alpha.c (function_value): Use PROMOTE_MODE.
+
2004-08-13 Richard Henderson <rth@redhat.com>
* config/i386/i386.md (call_1, sibcall_1, call_1_rex64): Use Pmode
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index d9dc759..9238ab6 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -5160,7 +5160,7 @@ rtx
function_value (tree valtype, tree func ATTRIBUTE_UNUSED,
enum machine_mode mode)
{
- unsigned int regnum;
+ unsigned int regnum, dummy;
enum mode_class class;
#ifdef ENABLE_CHECKING
@@ -5175,8 +5175,7 @@ function_value (tree valtype, tree func ATTRIBUTE_UNUSED,
switch (class)
{
case MODE_INT:
- /* Do the same thing as PROMOTE_MODE. */
- mode = DImode;
+ PROMOTE_MODE (mode, dummy, valtype);
/* FALLTHRU */
case MODE_COMPLEX_INT:
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index 43cdfff..d2ab933 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -471,16 +471,22 @@ extern const char *alpha_tls_size_string; /* For -mtls-size= */
type, but kept valid in the wider mode. The signedness of the
extension may differ from that of the type.
- For Alpha, we always store objects in a full register. 32-bit objects
- are always sign-extended, but smaller objects retain their signedness. */
-
-#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \
- if (GET_MODE_CLASS (MODE) == MODE_INT \
- && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
- { \
- if ((MODE) == SImode) \
- (UNSIGNEDP) = 0; \
- (MODE) = DImode; \
+ For Alpha, we always store objects in a full register. 32-bit integers
+ are always sign-extended, but smaller objects retain their signedness.
+
+ Note that small vector types can get mapped onto integer modes at the
+ whim of not appearing in alpha-modes.def. We never promoted these
+ values before; don't do so now that we've trimed the set of modes to
+ those actually implemented in the backend. */
+
+#define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \
+ if (GET_MODE_CLASS (MODE) == MODE_INT \
+ && (TYPE == NULL || TREE_CODE (TYPE) != VECTOR_TYPE) \
+ && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \
+ { \
+ if ((MODE) == SImode) \
+ (UNSIGNEDP) = 0; \
+ (MODE) = DImode; \
}
/* Define this if most significant bit is lowest numbered