summaryrefslogtreecommitdiffstats
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1993-05-19 17:13:32 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1993-05-19 17:13:32 +0000
commit870288ea9c5890ee50aa4a9056f90f5973710721 (patch)
tree684a91d809cfe316bcde2f35152227d2272cf975 /gcc/emit-rtl.c
parent9d8314a9f1332346cd1e350410491e37e6112d3a (diff)
downloadppe42-gcc-870288ea9c5890ee50aa4a9056f90f5973710721.tar.gz
ppe42-gcc-870288ea9c5890ee50aa4a9056f90f5973710721.zip
(operand_subword): Reject cases when BITS_PER_WORD is greater than
HOST_BITS_PER_INT unless OP is const0_rtx. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@4502 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index f73a61c89ba..cec8f0ff8bf 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1,5 +1,5 @@
/* Emit RTL for the GNU C-Compiler expander.
- Copyright (C) 1987, 1988, 1992 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1988, 1992, 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -995,15 +995,16 @@ operand_subword (op, i, validate_address, mode)
Convert to proper endianness now since these cases need it.
At this point, i == 0 means the low-order word.
- Note that it must be that BITS_PER_WORD <= HOST_BITS_PER_INT.
- This is because if it were greater, it could only have been two
- times greater since we do not support making wider constants. In
- that case, it MODE would have already been the proper size and
- it would have been handled above. This means we do not have to
- worry about the case where we would be returning a CONST_DOUBLE. */
+ We do not want to handle the case when BITS_PER_WORD <= HOST_BITS_PER_INT
+ in general. However, if OP is (const_int 0), we can just return
+ it for any word. */
+
+ if (op == const0_rtx)
+ return op;
if (GET_MODE_CLASS (mode) != MODE_INT
- || (GET_CODE (op) != CONST_INT && GET_CODE (op) != CONST_DOUBLE))
+ || (GET_CODE (op) != CONST_INT && GET_CODE (op) != CONST_DOUBLE)
+ || BITS_PER_WORD > HOST_BITS_PER_INT)
return 0;
if (WORDS_BIG_ENDIAN)
OpenPOWER on IntegriCloud