Commit 58126368 by Thomas Preud'homme Committed by Thomas Preud'homme

ChangeLog (2014-05-23): Fix ChangeLog entry to refer to target endianness…

ChangeLog (2014-05-23): Fix ChangeLog entry to refer to target endianness instead of host endianness.

2014-06-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * ChangeLog (2014-05-23): Fix ChangeLog entry to refer to target
      endianness instead of host endianness.
    * tree-ssa-math-opts.c (find_bswap_or_nop_1): Likewise in dumps and
      comments.

    gcc/testsuite/
    * gcc.dg/optimize-bswaphi-1.c: Adapt test to change of dump output.
      Specify -march=z900 as an additional option.
    * gcc.dg/optimize-bswapsi-1.c: Likewise for s390 options.
    * gcc.dg/optimize-bswapsi-2.c: Likewise.
    * gcc.dg/optimize-bswapdi-3.c: Likewise for adaptation to dump change.

From-SVN: r211309
parent 3fd48b12
2014-06-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
* ChangeLog (2014-05-23): Fix ChangeLog entry to refer to target
endianness instead of host endianness.
* tree-ssa-math-opts.c (find_bswap_or_nop_1): Likewise in dumps and
comments.
2014-06-06 Eric Botcazou <ebotcazou@adacore.com> 2014-06-06 Eric Botcazou <ebotcazou@adacore.com>
PR debug/53927 PR debug/53927
...@@ -2011,7 +2018,8 @@ ...@@ -2011,7 +2018,8 @@
(find_bswap_or_nop_1): This. Also add support for memory source. (find_bswap_or_nop_1): This. Also add support for memory source.
(find_bswap): Renamed to ... (find_bswap): Renamed to ...
(find_bswap_or_nop): This. Also add support for memory source and (find_bswap_or_nop): This. Also add support for memory source and
detection of bitwise operations equivalent to load in host endianness. detection of bitwise operations equivalent to load in target
endianness.
(execute_optimize_bswap): Likewise. Also move its leading comment back (execute_optimize_bswap): Likewise. Also move its leading comment back
in place and split statement transformation into ... in place and split statement transformation into ...
(bswap_replace): This. (bswap_replace): This.
......
2014-06-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
* gcc.dg/optimize-bswaphi-1.c: Adapt test to change of dump output.
Specify -march=z900 as an additional option.
* gcc.dg/optimize-bswapsi-1.c: Likewise for s390 options.
* gcc.dg/optimize-bswapsi-2.c: Likewise.
* gcc.dg/optimize-bswapdi-3.c: Likewise for adaptation to dump change.
2014-06-06 Jakub Jelinek <jakub@redhat.com> 2014-06-06 Jakub Jelinek <jakub@redhat.com>
* gfortran.dg/gomp/allocatable_components_1.f90: Adjust for * gfortran.dg/gomp/allocatable_components_1.f90: Adjust for
......
...@@ -59,6 +59,6 @@ uint64_t read_be64_3 (unsigned char *data) ...@@ -59,6 +59,6 @@ uint64_t read_be64_3 (unsigned char *data)
| ((uint64_t) *(data + 1) << 48) | ((uint64_t) *data << 56); | ((uint64_t) *(data + 1) << 48) | ((uint64_t) *data << 56);
} }
/* { dg-final { scan-tree-dump-times "64 bit load in host endianness found at" 3 "bswap" } } */ /* { dg-final { scan-tree-dump-times "64 bit load in target endianness found at" 3 "bswap" } } */
/* { dg-final { scan-tree-dump-times "64 bit bswap implementation found at" 3 "bswap" { xfail alpha*-*-* arm*-*-* } } } */ /* { dg-final { scan-tree-dump-times "64 bit bswap implementation found at" 3 "bswap" { xfail alpha*-*-* arm*-*-* } } } */
/* { dg-final { cleanup-tree-dump "bswap" } } */ /* { dg-final { cleanup-tree-dump "bswap" } } */
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* { dg-require-effective-target bswap16 } */ /* { dg-require-effective-target bswap16 } */
/* { dg-require-effective-target stdint_types } */ /* { dg-require-effective-target stdint_types } */
/* { dg-options "-O2 -fdump-tree-bswap" } */ /* { dg-options "-O2 -fdump-tree-bswap" } */
/* { dg-options "-O2 -fdump-tree-bswap -march=z900" { target s390-*-* } } */ /* { dg-additional-options "-march=z900" { target s390-*-* } } */
#include <stdint.h> #include <stdint.h>
...@@ -42,6 +42,6 @@ uint32_t read_be16_3 (unsigned char *data) ...@@ -42,6 +42,6 @@ uint32_t read_be16_3 (unsigned char *data)
return *(data + 1) | (*data << 8); return *(data + 1) | (*data << 8);
} }
/* { dg-final { scan-tree-dump-times "16 bit load in host endianness found at" 3 "bswap" } } */ /* { dg-final { scan-tree-dump-times "16 bit load in target endianness found at" 3 "bswap" } } */
/* { dg-final { scan-tree-dump-times "16 bit bswap implementation found at" 3 "bswap" { xfail alpha*-*-* arm*-*-* } } } */ /* { dg-final { scan-tree-dump-times "16 bit bswap implementation found at" 3 "bswap" { xfail alpha*-*-* arm*-*-* } } } */
/* { dg-final { cleanup-tree-dump "bswap" } } */ /* { dg-final { cleanup-tree-dump "bswap" } } */
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* { dg-require-effective-target bswap32 } */ /* { dg-require-effective-target bswap32 } */
/* { dg-require-effective-target stdint_types } */ /* { dg-require-effective-target stdint_types } */
/* { dg-options "-O2 -fdump-tree-bswap" } */ /* { dg-options "-O2 -fdump-tree-bswap" } */
/* { dg-options "-O2 -fdump-tree-bswap -march=z900" { target s390-*-* } } */ /* { dg-additional-options "-march=z900" { target s390-*-* } } */
#include <stdint.h> #include <stdint.h>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* { dg-require-effective-target bswap32 } */ /* { dg-require-effective-target bswap32 } */
/* { dg-require-effective-target stdint_types } */ /* { dg-require-effective-target stdint_types } */
/* { dg-options "-O2 -fdump-tree-bswap" } */ /* { dg-options "-O2 -fdump-tree-bswap" } */
/* { dg-options "-O2 -fdump-tree-bswap -march=z900" { target s390-*-* } } */ /* { dg-additional-options "-march=z900" { target s390-*-* } } */
#include <stdint.h> #include <stdint.h>
...@@ -44,6 +44,6 @@ uint32_t read_be32_3 (unsigned char *data) ...@@ -44,6 +44,6 @@ uint32_t read_be32_3 (unsigned char *data)
| (*data << 24); | (*data << 24);
} }
/* { dg-final { scan-tree-dump-times "32 bit load in host endianness found at" 3 "bswap" } } */ /* { dg-final { scan-tree-dump-times "32 bit load in target endianness found at" 3 "bswap" } } */
/* { dg-final { scan-tree-dump-times "32 bit bswap implementation found at" 3 "bswap" { xfail alpha*-*-* arm*-*-* } } } */ /* { dg-final { scan-tree-dump-times "32 bit bswap implementation found at" 3 "bswap" { xfail alpha*-*-* arm*-*-* } } } */
/* { dg-final { cleanup-tree-dump "bswap" } } */ /* { dg-final { cleanup-tree-dump "bswap" } } */
...@@ -1971,7 +1971,7 @@ find_bswap_or_nop_1 (gimple stmt, struct symbolic_number *n, int limit) ...@@ -1971,7 +1971,7 @@ find_bswap_or_nop_1 (gimple stmt, struct symbolic_number *n, int limit)
n->range = n2.range + off_sub; n->range = n2.range + off_sub;
/* Reinterpret byte marks in symbolic number holding the value of /* Reinterpret byte marks in symbolic number holding the value of
bigger weight according to host endianness. */ bigger weight according to target endianness. */
inc = BYTES_BIG_ENDIAN ? off_sub + n2.range - n1.range : off_sub; inc = BYTES_BIG_ENDIAN ? off_sub + n2.range - n1.range : off_sub;
mask = 0xFF; mask = 0xFF;
if (BYTES_BIG_ENDIAN) if (BYTES_BIG_ENDIAN)
...@@ -2074,7 +2074,7 @@ find_bswap_or_nop (gimple stmt, struct symbolic_number *n, bool *bswap) ...@@ -2074,7 +2074,7 @@ find_bswap_or_nop (gimple stmt, struct symbolic_number *n, bool *bswap)
/* A complete byte swap should make the symbolic number to start with /* A complete byte swap should make the symbolic number to start with
the largest digit in the highest order byte. Unchanged symbolic the largest digit in the highest order byte. Unchanged symbolic
number indicates a read with same endianness as host architecture. */ number indicates a read with same endianness as target architecture. */
if (n->n == cmpnop) if (n->n == cmpnop)
*bswap = false; *bswap = false;
else if (n->n == cmpxchg) else if (n->n == cmpxchg)
...@@ -2204,7 +2204,7 @@ bswap_replace (gimple stmt, gimple_stmt_iterator *gsi, tree src, tree fndecl, ...@@ -2204,7 +2204,7 @@ bswap_replace (gimple stmt, gimple_stmt_iterator *gsi, tree src, tree fndecl,
if (dump_file) if (dump_file)
{ {
fprintf (dump_file, fprintf (dump_file,
"%d bit load in host endianness found at: ", "%d bit load in target endianness found at: ",
(int)n->range); (int)n->range);
print_gimple_stmt (dump_file, stmt, 0, 0); print_gimple_stmt (dump_file, stmt, 0, 0);
} }
...@@ -2271,7 +2271,7 @@ bswap_replace (gimple stmt, gimple_stmt_iterator *gsi, tree src, tree fndecl, ...@@ -2271,7 +2271,7 @@ bswap_replace (gimple stmt, gimple_stmt_iterator *gsi, tree src, tree fndecl,
/* Find manual byte swap implementations as well as load in a given /* Find manual byte swap implementations as well as load in a given
endianness. Byte swaps are turned into a bswap builtin invokation endianness. Byte swaps are turned into a bswap builtin invokation
while endian loads are converted to bswap builtin invokation or while endian loads are converted to bswap builtin invokation or
simple load according to the host endianness. */ simple load according to the target endianness. */
unsigned int unsigned int
pass_optimize_bswap::execute (function *fun) pass_optimize_bswap::execute (function *fun)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment