mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-04 01:53:57 +08:00
S/390: Fix warnings in "*setmem_long..." patterns.
gcc/ChangeLog * config/s390/s390.md ("movstr", "*movstr"): Fix warning. ("movstr<P:mode>"): New indirect expanders used by "movstr". gcc/testsuite/ChangeLog * gcc.target/s390/md/movstr-1.c: New test. * gcc.target/s390/s390.exp: Add subdir md. Do not run hotpatch tests twice. From-SVN: r231557
This commit is contained in:
parent
11b9b5a445
commit
4a7dec25ac
@ -1,5 +1,9 @@
|
||||
2015-12-11 Martin Liska <mliska@suse.cz>
|
||||
2015-12-11 Dominik Vogt <vogt@linux.vnet.ibm.com>
|
||||
|
||||
* config/s390/s390.md ("movstr", "*movstr"): Fix warning.
|
||||
("movstr<P:mode>"): New indirect expanders used by "movstr".
|
||||
|
||||
2015-12-11 Martin Liska <mliska@suse.cz>
|
||||
Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR target/67484
|
||||
|
@ -2910,13 +2910,26 @@
|
||||
;
|
||||
|
||||
(define_expand "movstr"
|
||||
[(match_operand 0 "register_operand" "")
|
||||
(match_operand 1 "memory_operand" "")
|
||||
(match_operand 2 "memory_operand" "")]
|
||||
""
|
||||
{
|
||||
if (TARGET_64BIT)
|
||||
emit_insn (gen_movstrdi (operands[0], operands[1], operands[2]));
|
||||
else
|
||||
emit_insn (gen_movstrsi (operands[0], operands[1], operands[2]));
|
||||
DONE;
|
||||
})
|
||||
|
||||
(define_expand "movstr<P:mode>"
|
||||
[(set (reg:SI 0) (const_int 0))
|
||||
(parallel
|
||||
[(clobber (match_dup 3))
|
||||
(set (match_operand:BLK 1 "memory_operand" "")
|
||||
(match_operand:BLK 2 "memory_operand" ""))
|
||||
(set (match_operand 0 "register_operand" "")
|
||||
(unspec [(match_dup 1)
|
||||
(set (match_operand:P 0 "register_operand" "")
|
||||
(unspec:P [(match_dup 1)
|
||||
(match_dup 2)
|
||||
(reg:SI 0)] UNSPEC_MVST))
|
||||
(clobber (reg:CC CC_REGNUM))])]
|
||||
@ -2937,7 +2950,7 @@
|
||||
(set (mem:BLK (match_operand:P 1 "register_operand" "0"))
|
||||
(mem:BLK (match_operand:P 3 "register_operand" "2")))
|
||||
(set (match_operand:P 0 "register_operand" "=d")
|
||||
(unspec [(mem:BLK (match_dup 1))
|
||||
(unspec:P [(mem:BLK (match_dup 1))
|
||||
(mem:BLK (match_dup 3))
|
||||
(reg:SI 0)] UNSPEC_MVST))
|
||||
(clobber (reg:CC CC_REGNUM))]
|
||||
|
@ -1,3 +1,9 @@
|
||||
2015-12-11 Dominik Vogt <vogt@linux.vnet.ibm.com>
|
||||
|
||||
* gcc.target/s390/md/movstr-1.c: New test.
|
||||
* gcc.target/s390/s390.exp: Add subdir md.
|
||||
Do not run hotpatch tests twice.
|
||||
|
||||
2015-12-11 Ilya Enkovich <enkovich.gnu@gmail.com>
|
||||
|
||||
* gcc.dg/vect/vect-32-chars.c: New test.
|
||||
|
24
gcc/testsuite/gcc.target/s390/md/movstr-1.c
Normal file
24
gcc/testsuite/gcc.target/s390/md/movstr-1.c
Normal file
@ -0,0 +1,24 @@
|
||||
/* Machine description pattern tests. */
|
||||
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-dP -save-temps" } */
|
||||
|
||||
__attribute__ ((noinline))
|
||||
void test(char *dest, const char *src)
|
||||
{
|
||||
__builtin_stpcpy (dest, src);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times {{[*]movstr}} 1 } } */
|
||||
|
||||
#define LEN 200
|
||||
char buf[LEN];
|
||||
|
||||
int main(void)
|
||||
{
|
||||
__builtin_memset(buf, 0, LEN);
|
||||
test(buf, "hello world!");
|
||||
if (__builtin_strcmp(buf, "hello world!") != 0)
|
||||
__builtin_abort();
|
||||
return 0;
|
||||
}
|
@ -76,11 +76,11 @@ if ![info exists DEFAULT_CFLAGS] then {
|
||||
# Initialize `dg'.
|
||||
dg-init
|
||||
|
||||
set hotpatch_tests $srcdir/$subdir/hotpatch-\[0-9\]*.c
|
||||
set md_tests $srcdir/$subdir/md/*.c
|
||||
|
||||
# Main loop.
|
||||
dg-runtest [lsort [prune [glob -nocomplain $srcdir/$subdir/*.\[cS\]] \
|
||||
$hotpatch_tests]] "" $DEFAULT_CFLAGS
|
||||
$md_tests]] "" $DEFAULT_CFLAGS
|
||||
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*vector*/*.\[cS\]]] \
|
||||
"" $DEFAULT_CFLAGS
|
||||
@ -88,11 +88,26 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*vector*/*.\[cS\]]] \
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/target-attribute/*.\[cS\]]] \
|
||||
"" $DEFAULT_CFLAGS
|
||||
|
||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/md/*.\[cS\]]] \
|
||||
"" $DEFAULT_CFLAGS
|
||||
|
||||
# Additional hotpatch torture tests.
|
||||
torture-init
|
||||
set HOTPATCH_TEST_OPTS [list -Os -O0 -O1 -O2 -O3]
|
||||
set-torture-options $HOTPATCH_TEST_OPTS
|
||||
gcc-dg-runtest [lsort [glob -nocomplain $hotpatch_tests]] "" $DEFAULT_CFLAGS
|
||||
set-torture-options [list -Os -O0 -O1 -O2 -O3]
|
||||
gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/hotpatch-\[0-9\]*.c]] \
|
||||
"" $DEFAULT_CFLAGS
|
||||
torture-finish
|
||||
|
||||
# Additional md torture tests.
|
||||
torture-init
|
||||
set MD_TEST_OPTS [list \
|
||||
{-Os -march=z900} {-Os -march=z13} \
|
||||
{-O0 -march=z900} {-O0 -march=z13} \
|
||||
{-O1 -march=z900} {-O1 -march=z13} \
|
||||
{-O2 -march=z900} {-O2 -march=z13} \
|
||||
{-O3 -march=z900} {-O3 -march=z13}]
|
||||
set-torture-options $MD_TEST_OPTS
|
||||
gcc-dg-runtest [lsort [glob -nocomplain $md_tests]] "" $DEFAULT_CFLAGS
|
||||
torture-finish
|
||||
|
||||
# All done.
|
||||
|
Loading…
Reference in New Issue
Block a user