summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-09-14 20:20:28 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-09-14 20:20:28 +0000
commit365c90638c9fa3672f4211d3c5ddd7b6635d82b4 (patch)
tree03c55f9b8adead292f668b709145ccc617282630 /gcc/emit-rtl.c
parent0285edb478a124a853e4ec5e3308acb673f5cb00 (diff)
downloadgcc-365c90638c9fa3672f4211d3c5ddd7b6635d82b4.tar.gz
(gen_lowpart): If gen_lowpart_common fails for a REG, load it into a
pseudo and try again. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10349 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 14047702674..9600f2f63aa 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -857,6 +857,13 @@ gen_lowpart (mode, x)
if (result)
return result;
+ else if (GET_CODE (x) == REG)
+ {
+ /* Must be a hard reg that's not valid in MODE. */
+ result = gen_lowpart_common (mode, copy_to_reg (x));
+ if (result == 0)
+ abort ();
+ }
else if (GET_CODE (x) == MEM)
{
/* The only additional case we can do is MEM. */