aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2003-07-13 17:12:28 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2003-07-13 13:12:28 -0400
commit0acf4f8857224501ab8bd97bf0146f7cb766441e (patch)
treeab64df6753f797969f539df8f1f5ffaeb9644feb
parentae26c8e25f9bad8b4d26f10d091d6342330f3cfb (diff)
downloadgcc-0acf4f8857224501ab8bd97bf0146f7cb766441e.zip
gcc-0acf4f8857224501ab8bd97bf0146f7cb766441e.tar.gz
gcc-0acf4f8857224501ab8bd97bf0146f7cb766441e.tar.bz2
stor-layout.c (compute_record_mode): Remove very obsolete test that forces BLKmode for records with fields crossing...
* stor-layout.c (compute_record_mode): Remove very obsolete test that forces BLKmode for records with fields crossing word boundary. From-SVN: r69297
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/stor-layout.c15
2 files changed, 5 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5a76780..c9cda02 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-13 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * stor-layout.c (compute_record_mode): Remove very obsolete test
+ that forces BLKmode for records with fields crossing word boundary.
+
2003-07-13 Zack Weinberg <zack@codesourcery.com>
* Makefile.in: Remove orphan reference to acconfig.h.
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 403f8ab..061eec4 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1310,8 +1310,6 @@ compute_record_mode (tree type)
BLKmode only because it isn't aligned. */
for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field))
{
- unsigned HOST_WIDE_INT bitpos;
-
if (TREE_CODE (field) != FIELD_DECL)
continue;
@@ -1323,19 +1321,6 @@ compute_record_mode (tree type)
|| ! host_integerp (DECL_SIZE (field), 1))
return;
- bitpos = int_bit_position (field);
-
- /* Must be BLKmode if any field crosses a word boundary,
- since extract_bit_field can't handle that in registers. */
- if (bitpos / BITS_PER_WORD
- != ((tree_low_cst (DECL_SIZE (field), 1) + bitpos - 1)
- / BITS_PER_WORD)
- /* But there is no problem if the field is entire words
- or bigger than a word. */
- && ! (tree_low_cst (DECL_SIZE (field), 1) % BITS_PER_WORD == 0
- || compare_tree_int (DECL_SIZE (field), BITS_PER_WORD) > 0))
- return;
-
/* 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. */