summaryrefslogtreecommitdiff
path: root/gcc/calls.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-10-24 19:30:02 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-10-24 19:30:02 +0000
commit13f7a1e9c531d595baf0b23be106bc83df2b3ce5 (patch)
tree13107a80894fe1eb891cb755d41ed05e929e0fea /gcc/calls.c
parent5eb54a7aae4ce9b4f0489c4d759d7711b9f848bd (diff)
downloadgcc-13f7a1e9c531d595baf0b23be106bc83df2b3ce5.tar.gz
(expand_call): Make sure valreg is at least a full word.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10509 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r--gcc/calls.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/calls.c b/gcc/calls.c
index 4abd2c0e6ed..536f9282bc3 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -2058,6 +2058,13 @@ expand_call (exp, target, ignore)
preserve_temp_slots (target);
}
+ /* This code assumes valreg is at least a full word. If it isn't,
+ copy it into a new pseudo which is a full word. */
+ if (GET_MODE (valreg) != BLKmode
+ && GET_MODE_SIZE (GET_MODE (valreg)) < UNITS_PER_WORD)
+ valreg = convert_to_mode (SImode, valreg,
+ TREE_UNSIGNED (TREE_TYPE (exp)));
+
/* Structures whose size is not a multiple of a word are aligned
to the least significant byte (to the right). On a BYTES_BIG_ENDIAN
machine, this means we must skip the empty high order bytes when