summaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authordavem <davem@138bc75d-0d04-0410-961f-82ee72b054a4>1998-10-04 01:29:21 +0000
committerdavem <davem@138bc75d-0d04-0410-961f-82ee72b054a4>1998-10-04 01:29:21 +0000
commit7ac5577a623dd191c4885a63bceb5faa8af8a7d9 (patch)
tree3f76ee96771621d9a87913e2091b0df0a156e184 /gcc/function.c
parent2bfa9fdb4e2daf7a8fe78b4e21667907abfbe35e (diff)
downloadgcc-7ac5577a623dd191c4885a63bceb5faa8af8a7d9.tar.gz
* function.c (purge_addressof_1): If trying to take a sub-word
integral piece of a floating point mode, put it on the stack. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22804 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 41f400e1c52..5e607597f4f 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -2881,6 +2881,17 @@ purge_addressof_1 (loc, insn, force, store)
rtx val, seq;
+ /* We cannot do this if we are trying to pick out
+ an integral piece, smaller than a word, of a
+ floating point value. */
+ if (INTEGRAL_MODE_P (GET_MODE (x))
+ && GET_MODE_SIZE (GET_MODE (x)) < UNITS_PER_WORD
+ && FLOAT_MODE_P (GET_MODE (sub)))
+ {
+ put_addressof_into_stack (XEXP (x, 0));
+ return;
+ }
+
if (store)
{
/* If we can't replace with a register, be afraid. */