diff options
| author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-03 14:30:07 +0000 |
|---|---|---|
| committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-03 14:30:07 +0000 |
| commit | 794d6bca180626affab6b2a335fdfa861def7454 (patch) | |
| tree | 5b300418ab27240f850e8f114184f7fdfd40ea6c | |
| parent | d5f9786fae594d6d9f449e98620f3009d9a6710d (diff) | |
| download | ppe42-gcc-794d6bca180626affab6b2a335fdfa861def7454.tar.gz ppe42-gcc-794d6bca180626affab6b2a335fdfa861def7454.zip | |
* expr.c (expand_expr, case VIEW_CONVERT_EXPR): Don't use
gen_lowpart on non-integer modes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66430 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 3 | ||||
| -rw-r--r-- | gcc/expr.c | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 58469126a53..f307619a02c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -19,6 +19,9 @@ 2003-05-03 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + * expr.c (expand_expr, case VIEW_CONVERT_EXPR): Don't use + gen_lowpart on non-integer modes. + * stor-layout.c (place_field): When adjusting offset_align, use desired_align, not DECL_ALIGN. diff --git a/gcc/expr.c b/gcc/expr.c index b64319a08a7..7fd347be3b1 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -7959,12 +7959,14 @@ expand_expr (exp, target, tmode, modifier) op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, mode, modifier); /* If the input and output modes are both the same, we are done. - Otherwise, if neither mode is BLKmode and both are within a word, we - can use gen_lowpart. If neither is true, make sure the operand is - in memory and convert the MEM to the new mode. */ + Otherwise, if neither mode is BLKmode and both are integral and within + a word, we can use gen_lowpart. If neither is true, make sure the + operand is in memory and convert the MEM to the new mode. */ if (TYPE_MODE (type) == GET_MODE (op0)) ; else if (TYPE_MODE (type) != BLKmode && GET_MODE (op0) != BLKmode + && GET_MODE_CLASS (GET_MODE (op0)) == MODE_INT + && GET_MODE_CLASS (TYPE_MODE (type)) == MODE_INT && GET_MODE_SIZE (TYPE_MODE (type)) <= UNITS_PER_WORD && GET_MODE_SIZE (GET_MODE (op0)) <= UNITS_PER_WORD) op0 = gen_lowpart (TYPE_MODE (type), op0); |

