diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/stor-layout.c | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 48bed93a6bd..2b97062c8dd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -6,13 +6,14 @@ Fri Aug 18 16:22:20 2000 Alexandre Oliva <aoliva@redhat.com> * configure.in: Get them included with `tm_file's. * configure: Rebuilt. -Fri Aug 18 16:01:18 2000 Alexandre Oliva <aoliva@redhat.com> - * config/sh/sh.md (fpu_switch0, fpu_switch1): Simplify. * config/sh/sh.c (fpscr_set_from_mem): Use them. Fri Aug 18 14:23:18 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + * stor-layout.c (compute_record_type): Don't use mode of single + field as mode of record if not integer mode of same type. + * regmove.c (perhaps_ends_bb_p): New function. (optimize_reg_copy_1, optimize_reg_copy_2): Call it. (optimize_reg_copy_3, fixup_match_2, regmove_optimize): Likewise. diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 159e2a8551f..294f2d400ed 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1062,8 +1062,11 @@ compute_record_mode (type) /* If this field is the whole struct, remember its mode so that, say, we can put a double in a class into a DF - register instead of forcing it to live in the stack. */ - if (field == TYPE_FIELDS (type) && TREE_CHAIN (field) == 0) + register instead of forcing it to live in the stack. However, + we don't support using such a mode if there is no integer mode + of the same size, so don't set it here. */ + if (field == TYPE_FIELDS (type) && TREE_CHAIN (field) == 0 + && int_mode_for_mode (DECL_MODE (field)) != BLKmode) mode = DECL_MODE (field); #ifdef STRUCT_FORCE_BLK |