diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-09-14 20:20:28 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1995-09-14 20:20:28 +0000 |
commit | 365c90638c9fa3672f4211d3c5ddd7b6635d82b4 (patch) | |
tree | 03c55f9b8adead292f668b709145ccc617282630 /gcc/emit-rtl.c | |
parent | 0285edb478a124a853e4ec5e3308acb673f5cb00 (diff) | |
download | gcc-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.c | 7 |
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. */ |