gcc/testsuite/gcc.target/riscv/crc-builtin-zbc32.c
raw| 1 | /* { dg-do compile { target { rv32 && { ! riscv_abi_e } } } } */ |
| 2 | /* { dg-options "-march=rv32gc_zbc" } */ |
| 3 | |
| 4 | #include <stdint-gcc.h> |
| 5 | |
| 6 | int8_t crc8_data8 () |
| 7 | { |
| 8 | return __builtin_crc8_data8 (0x34, 'a', 0x12); |
| 9 | } |
| 10 | |
| 11 | int16_t crc16_data8 () |
| 12 | { |
| 13 | return __builtin_crc16_data8 (0x1234, 'a', 0x1021); |
| 14 | } |
| 15 | |
| 16 | int16_t crc16_data16 () |
| 17 | { |
| 18 | return __builtin_crc16_data16 (0x1234, 0x3214, 0x1021); |
| 19 | } |
| 20 | |
| 21 | /* { dg-final { scan-assembler-times "clmul\t" 6 } } */ |