aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2018-04-06 13:16:39 +0000
committerTamar Christina <tnfchris@gcc.gnu.org>2018-04-06 13:16:39 +0000
commitd8ab9ce00a09f3daeea4ad8eea24a385cd7f28f3 (patch)
tree3d79f7c9853eb55d8a31b31e27cd78f473a08bba /gcc
parentef2e5ec2d4dbcd865bd62fd887b89e7a42f66222 (diff)
downloadgcc-d8ab9ce00a09f3daeea4ad8eea24a385cd7f28f3.zip
gcc-d8ab9ce00a09f3daeea4ad8eea24a385cd7f28f3.tar.gz
gcc-d8ab9ce00a09f3daeea4ad8eea24a385cd7f28f3.tar.bz2
Reverted commit r254862
From-SVN: r259169
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/doc/sourcebuild.texi7
-rw-r--r--gcc/expr.c4
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/struct-simple.c52
-rw-r--r--gcc/testsuite/lib/target-supports.exp25
6 files changed, 12 insertions, 87 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f953652..36e775d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2018-04-06 Tamar Christina <tamar.christina@arm.com>
+
+ * expr.c (copy_blkmode_to_reg): Revert 254862.
+ * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
+
2018-04-06 Richard Biener <rguenther@suse.de>
PR middle-end/85244
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index b9672ca..a1a6c9d 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -2297,15 +2297,8 @@ Target supports @code{wchar_t} that is compatible with @code{char32_t}.
@item comdat_group
Target uses comdat groups.
-
-@item weak_undefined
-Target supports weak undefined symbols.
-
-@item word_mode_no_slow_unalign
-Target does not have slow unaligned access when doing word size accesses.
@end table
-
@subsubsection Local to tests in @code{gcc.target/i386}
@table @code
diff --git a/gcc/expr.c b/gcc/expr.c
index 0066029..5e3d9a5 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -2782,9 +2782,7 @@ copy_blkmode_to_reg (machine_mode mode_in, tree src)
n_regs = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
dst_words = XALLOCAVEC (rtx, n_regs);
- bitsize = BITS_PER_WORD;
- if (targetm.slow_unaligned_access (word_mode, TYPE_ALIGN (TREE_TYPE (src))))
- bitsize = MIN (TYPE_ALIGN (TREE_TYPE (src)), BITS_PER_WORD);
+ bitsize = MIN (TYPE_ALIGN (TREE_TYPE (src)), BITS_PER_WORD);
/* Copy the structure BITSIZE bits at a time. */
for (bitpos = 0, xbitpos = padding_correction;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e52b67c..0ea9f64 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2018-04-06 Tamar Christina <tamar.christina@arm.com>
+
+ * gcc.dg/struct-simple.c: Revert r254862.
+ * lib/target-supports.exp
+ (check_effective_target_word_mode_no_slow_unalign): Likewise.
+
2018-04-06 Richard Biener <rguenther@suse.de>
PR middle-end/85244
diff --git a/gcc/testsuite/gcc.dg/struct-simple.c b/gcc/testsuite/gcc.dg/struct-simple.c
deleted file mode 100644
index 17b9560..0000000
--- a/gcc/testsuite/gcc.dg/struct-simple.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* { dg-do-run } */
-/* { dg-require-effective-target word_mode_no_slow_unalign } */
-/* { dg-additional-options "-fdump-rtl-final" } */
-
-/* Copyright 1996, 1999, 2007 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GCC; see the file COPYING3. If not see
- <http://www.gnu.org/licenses/>.
-
- Please email any bugs, comments, and/or additions to this file to:
- bug-gdb@prep.ai.mit.edu */
-
-#include <stdio.h>
-
-struct struct3 { char a, b, c; };
-struct struct3 foo3 = { 'A', 'B', 'C'}, L3;
-
-struct struct3 fun3()
-{
- return foo3;
-}
-
-#ifdef PROTOTYPES
-void Fun3(struct struct3 foo3)
-#else
-void Fun3(foo3)
- struct struct3 foo3;
-#endif
-{
- L3 = foo3;
-}
-
-int main()
-{
- struct struct3 x = fun3();
-
- printf("a:%c, b:%c, c:%c\n", x.a, x.b, x.c);
-}
-
-/* { dg-final { scan-rtl-dump-not {zero_extract:.+\[\s*foo3\s*\]} "final" } } */
-
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index cde3f1d..50665df 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -6364,31 +6364,6 @@ proc check_effective_target_unaligned_stack { } {
return $et_unaligned_stack_saved
}
-# Return 1 if the target plus current options does not have
-# slow unaligned access when using word size accesses.
-#
-# This won't change for different subtargets so cache the result.
-
-proc check_effective_target_word_mode_no_slow_unalign { } {
- global et_word_mode_no_slow_unalign_saved
- global et_index
-
- if [info exists et_word_mode_no_slow_unalign_saved($et_index)] {
- verbose "check_effective_target_word_mode_no_slow_unalign: \
- using cached result" 2
- } else {
- set et_word_mode_no_slow_unalign_saved($et_index) 0
- if { [is-effective-target non_strict_align]
- && !([istarget arm*-*-*])
- } {
- set et_word_mode_no_slow_unalign_saved($et_index) 1
- }
- }
- verbose "check_effective_target_word_mode_no_slow_unalign:\
- returning $et_word_mode_no_slow_unalign_saved($et_index)" 2
- return $et_word_mode_no_slow_unalign_saved($et_index)
-}
-
# Return 1 if the target plus current options does not support a vector
# alignment mechanism, 0 otherwise.
#