diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-13 12:49:56 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-13 12:49:56 +0000 |
commit | e392cde316bbbe5967d1572def874ce354fd06e0 (patch) | |
tree | 352708c243910ab5689818261dd1bb249311d023 /gcc/rtlhooks.c | |
parent | f174caced9ccd2b56069720120f6fa1732b99394 (diff) | |
download | gcc-e392cde316bbbe5967d1572def874ce354fd06e0.tar.gz |
* rtlhooks.c (gen_lowpart_general): Handle SUBREGs of floating point
values.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108479 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtlhooks.c')
-rw-r--r-- | gcc/rtlhooks.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/rtlhooks.c b/gcc/rtlhooks.c index bc413987865..0034da783fa 100644 --- a/gcc/rtlhooks.c +++ b/gcc/rtlhooks.c @@ -44,9 +44,12 @@ gen_lowpart_general (enum machine_mode mode, rtx x) if (result) return result; - else if (REG_P (x)) + /* If it's a REG, it must be a hard reg that's not valid in MODE. */ + else if (REG_P (x) + /* Or we could have a subreg of a floating point value. */ + || (GET_CODE (x) == SUBREG + && FLOAT_MODE_P (GET_MODE (SUBREG_REG (x))))) { - /* Must be a hard reg that's not valid in MODE. */ result = gen_lowpart_common (mode, copy_to_reg (x)); gcc_assert (result != 0); return result; |