[AArch64] Add CRC32 ACLE intrinsics testsuite.

* gcc.target/aarch64/acle/acle.exp: New.
	* gcc.target/aarch64/acle/crc32b.c: New test.
	* gcc.target/aarch64/acle/crc32cb.c: Likewise.
	* gcc.target/aarch64/acle/crc32cd.c: Likewise.
	* gcc.target/aarch64/acle/crc32ch.c: Likewise.
	* gcc.target/aarch64/acle/crc32cw.c: Likewise.
	* gcc.target/aarch64/acle/crc32d.c: Likewise.
	* gcc.target/aarch64/acle/crc32h.c: Likewise.
	* gcc.target/aarch64/acle/crc32w.c: Likewise.
--This line,gand those below, will be ignored--

A    gcc/testsuite/gcc.target/aarch64/acle
A    gcc/testsuite/gcc.target/aarch64/acle/acle.exp
A    gcc/testsuite/gcc.target/aarch64/acle/crc32b.c
A    gcc/testsuite/gcc.target/aarch64/acle/crc32d.c
A    gcc/testsuite/gcc.target/aarch64/acle/crc32cb.c
A    gcc/testsuite/gcc.target/aarch64/acle/crc32cd.c
A    gcc/testsuite/gcc.target/aarch64/acle/crc32w.c
A    gcc/testsuite/gcc.target/aarch64/acle/crc32h.c
A    gcc/testsuite/gcc.target/aarch64/acle/crc32cw.c
A    gcc/testsuite/gcc.target/aarch64/acle/crc32ch.c
M    gcc/testsuite/ChangeLog

From-SVN: r211441
This commit is contained in:
Kyrylo Tkachov 2014-06-11 09:19:14 +00:00 committed by Kyrylo Tkachov
parent 5d357f260c
commit 338329a085
10 changed files with 167 additions and 0 deletions

View File

@ -1,3 +1,15 @@
2014-06-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gcc.target/aarch64/acle/acle.exp: New.
* gcc.target/aarch64/acle/crc32b.c: New test.
* gcc.target/aarch64/acle/crc32cb.c: Likewise.
* gcc.target/aarch64/acle/crc32cd.c: Likewise.
* gcc.target/aarch64/acle/crc32ch.c: Likewise.
* gcc.target/aarch64/acle/crc32cw.c: Likewise.
* gcc.target/aarch64/acle/crc32d.c: Likewise.
* gcc.target/aarch64/acle/crc32h.c: Likewise.
* gcc.target/aarch64/acle/crc32w.c: Likewise.
2014-06-11 Evgeny Stupachenko <evstupac@gmail.com>
PR tree-optimization/52252

View File

@ -0,0 +1,35 @@
# Copyright (C) 2014 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/>.
# GCC testsuite that uses the `dg.exp' driver.
# Exit immediately if this isn't an AArch64 target.
if ![istarget aarch64*-*-*] then {
return
}
# Load support procs.
load_lib gcc-dg.exp
# Initialize `dg'.
dg-init
# Main loop.
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
"" ""
# All done.
dg-finish

View File

@ -0,0 +1,15 @@
/* Test the crc32b ACLE intrinsic. */
/* { dg-do assemble } */
/* { dg-options "-save-temps -O2 -march=armv8-a+crc" } */
#include "arm_acle.h"
uint32_t
test_crc32b (uint32_t arg0, uint8_t arg1)
{
return __crc32b (arg0, arg1);
}
/* { dg-final { scan-assembler "crc32b\tw..?, w..?, w..?\n" } } */
/* { dg-final { cleanup-saved-temps } } */

View File

@ -0,0 +1,15 @@
/* Test the crc32cb ACLE intrinsic. */
/* { dg-do assemble } */
/* { dg-options "-save-temps -O2 -march=armv8-a+crc" } */
#include "arm_acle.h"
uint32_t
test_crc32cb (uint32_t arg0, uint8_t arg1)
{
return __crc32cb (arg0, arg1);
}
/* { dg-final { scan-assembler "crc32cb\tw..?, w..?, w..?\n" } } */
/* { dg-final { cleanup-saved-temps } } */

View File

@ -0,0 +1,15 @@
/* Test the crc32cd ACLE intrinsic. */
/* { dg-do assemble } */
/* { dg-options "-save-temps -O2 -march=armv8-a+crc" } */
#include "arm_acle.h"
uint32_t
test_crc32cd (uint32_t arg0, uint64_t arg1)
{
return __crc32cd (arg0, arg1);
}
/* { dg-final { scan-assembler "crc32cx\tw..?, w..?, x..?\n" } } */
/* { dg-final { cleanup-saved-temps } } */

View File

@ -0,0 +1,15 @@
/* Test the crc32ch ACLE intrinsic. */
/* { dg-do assemble } */
/* { dg-options "-save-temps -O2 -march=armv8-a+crc" } */
#include "arm_acle.h"
uint32_t
test_crc32ch (uint32_t arg0, uint16_t arg1)
{
return __crc32ch (arg0, arg1);
}
/* { dg-final { scan-assembler "crc32ch\tw..?, w..?, w..?\n" } } */
/* { dg-final { cleanup-saved-temps } } */

View File

@ -0,0 +1,15 @@
/* Test the crc32cw ACLE intrinsic. */
/* { dg-do assemble } */
/* { dg-options "-save-temps -O2 -march=armv8-a+crc" } */
#include "arm_acle.h"
uint32_t
test_crc32cw (uint32_t arg0, uint32_t arg1)
{
return __crc32cw (arg0, arg1);
}
/* { dg-final { scan-assembler "crc32cw\tw..?, w..?, w..?\n" } } */
/* { dg-final { cleanup-saved-temps } } */

View File

@ -0,0 +1,15 @@
/* Test the crc32d ACLE intrinsic. */
/* { dg-do assemble } */
/* { dg-options "-save-temps -O2 -march=armv8-a+crc" } */
#include "arm_acle.h"
uint32_t
test_crc32d (uint32_t arg0, uint64_t arg1)
{
return __crc32d (arg0, arg1);
}
/* { dg-final { scan-assembler "crc32x\tw..?, w..?, x..?\n" } } */
/* { dg-final { cleanup-saved-temps } } */

View File

@ -0,0 +1,15 @@
/* Test the crc32h ACLE intrinsic. */
/* { dg-do assemble } */
/* { dg-options "-save-temps -O2 -march=armv8-a+crc" } */
#include "arm_acle.h"
uint32_t
test_crc32h (uint32_t arg0, uint16_t arg1)
{
return __crc32h (arg0, arg1);
}
/* { dg-final { scan-assembler "crc32h\tw..?, w..?, w..?\n" } } */
/* { dg-final { cleanup-saved-temps } } */

View File

@ -0,0 +1,15 @@
/* Test the crc32w ACLE intrinsic. */
/* { dg-do assemble } */
/* { dg-options "-save-temps -O2 -march=armv8-a+crc" } */
#include "arm_acle.h"
uint32_t
test_crc32w (uint32_t arg0, uint32_t arg1)
{
return __crc32w (arg0, arg1);
}
/* { dg-final { scan-assembler "crc32w\tw..?, w..?, w..?\n" } } */
/* { dg-final { cleanup-saved-temps } } */