summaryrefslogtreecommitdiff
path: root/gcc/config/alpha/alpha.h
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-14 07:41:21 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-14 07:41:21 +0000
commit79db42ad80f974a3ab3e26cc9f27dd80f758ac71 (patch)
treef65ee46abc8fdcc78833bb133081242356b6efb8 /gcc/config/alpha/alpha.h
parenta9b30977034616e7f67a271758594dd545778945 (diff)
downloadgcc-79db42ad80f974a3ab3e26cc9f27dd80f758ac71.tar.gz
* config/alpha/alpha.h (PROMOTE_MODE): Don't promote vector types.
* config/alpha/alpha.c (function_value): Use PROMOTE_MODE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85989 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/alpha/alpha.h')
-rw-r--r--gcc/config/alpha/alpha.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index 43cdfff7f2a..d2ab9332289 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