diff options
author | Michael Hayes <m.hayes@elec.canterbury.ac.nz> | 2000-01-13 10:43:35 +0000 |
---|---|---|
committer | Michael Hayes <m.hayes@gcc.gnu.org> | 2000-01-13 10:43:35 +0000 |
commit | 7f7680a9a44a63da78f064d41660db2b57460187 (patch) | |
tree | 174b996c97c3d482dba85461cbd36b0c82d92621 /gcc/stor-layout.c | |
parent | 8f496bc2d55cbb3725c964b79af0f86eb1876a63 (diff) | |
download | gcc-7f7680a9a44a63da78f064d41660db2b57460187.zip gcc-7f7680a9a44a63da78f064d41660db2b57460187.tar.gz gcc-7f7680a9a44a63da78f064d41660db2b57460187.tar.bz2 |
stor-layout.c (layout_type): Use FORCE_STRUCT_BLK.
* stor-layout.c (layout_type): Use FORCE_STRUCT_BLK.
* tm.texi (FORCE_STRUCT_BLK): Document.
* config/c4x/c4x.h (FORCE_STRUCT_BLK): New macro.
From-SVN: r31385
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index e9c3740..455152f 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1057,6 +1057,13 @@ layout_type (type) register instead of forcing it to live in the stack. */ if (simple_cst_equal (TYPE_SIZE (type), DECL_SIZE (field))) mode = DECL_MODE (field); + +#ifdef STRUCT_FORCE_BLK + /* With some targets, eg. c4x, it is sub-optimal + to access an aligned BLKmode structure as a scalar. */ + if (mode == VOIDmode && STRUCT_FORCE_BLK (field)) + goto record_lose; +#endif /* STRUCT_FORCE_BLK */ } if (mode != VOIDmode) |