aarch64: Add CRC built-ins test for the target AES.
gcc/testsuite/ * gcc.target/aarch64/crc-builtin-pmul64.c: New test. Signed-off-by: Mariam Arutunian <mariamarutunian@gmail.com>
This commit is contained in:
parent
a193f53332
commit
5b63ae06a7
1 changed files with 61 additions and 0 deletions
61
gcc/testsuite/gcc.target/aarch64/crc-builtin-pmul64.c
Normal file
61
gcc/testsuite/gcc.target/aarch64/crc-builtin-pmul64.c
Normal file
|
@ -0,0 +1,61 @@
|
|||
/* { dg-options "-march=armv8-a+crypto" } */
|
||||
|
||||
#include <stdint-gcc.h>
|
||||
int8_t crc8_data8 ()
|
||||
{
|
||||
return __builtin_crc8_data8 ('a', 0xff, 0x12);
|
||||
}
|
||||
int16_t crc16_data8 ()
|
||||
{
|
||||
return __builtin_crc16_data8 (0x1234, 'a', 0x1021);
|
||||
}
|
||||
|
||||
int16_t crc16_data16 ()
|
||||
{
|
||||
return __builtin_crc16_data16 (0x1234, 0x3214, 0x1021);
|
||||
}
|
||||
|
||||
int32_t crc32_data8 ()
|
||||
{
|
||||
return __builtin_crc32_data8 (0xffffffff, 0x32, 0x4002123);
|
||||
}
|
||||
int32_t crc32_data16 ()
|
||||
{
|
||||
return __builtin_crc32_data16 (0xffffffff, 0x3232, 0x4002123);
|
||||
}
|
||||
|
||||
int32_t crc32_data32 ()
|
||||
{
|
||||
return __builtin_crc32_data32 (0xffffffff, 0x123546ff, 0x4002123);
|
||||
}
|
||||
|
||||
int8_t rev_crc8_data8 ()
|
||||
{
|
||||
return __builtin_rev_crc8_data8 (0x34, 'a', 0x12);
|
||||
}
|
||||
|
||||
int16_t rev_crc16_data8 ()
|
||||
{
|
||||
return __builtin_rev_crc16_data8 (0x1234, 'a', 0x1021);
|
||||
}
|
||||
|
||||
int16_t rev_crc16_data16 ()
|
||||
{
|
||||
return __builtin_rev_crc16_data16 (0x1234, 0x3214, 0x1021);
|
||||
}
|
||||
|
||||
int32_t rev_crc32_data8 ()
|
||||
{
|
||||
return __builtin_rev_crc32_data8 (0xffffffff, 0x32, 0x4002123);
|
||||
}
|
||||
|
||||
int32_t rev_crc32_data16 ()
|
||||
{
|
||||
return __builtin_rev_crc32_data16 (0xffffffff, 0x3232, 0x4002123);
|
||||
}
|
||||
|
||||
int32_t rev_crc32_data32 ()
|
||||
{
|
||||
return __builtin_rev_crc32_data32 (0xffffffff, 0x123546ff, 0x4002123);
|
||||
}
|
||||
/* { dg-final { scan-assembler-times "pmull" 24 } } */
|
Loading…
Add table
Reference in a new issue