xref: /llvm-project/llvm/test/MC/RISCV/rvv/zvksed.s (revision b27f86b40b20942c0e809128214b43d6edde365a)
1# RUN: llvm-mc -triple=riscv32 -show-encoding --mattr=+zve32x --mattr=+zvksed %s \
2# RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3# RUN: not llvm-mc -triple=riscv32 -show-encoding %s 2>&1 \
4# RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
5# RUN: llvm-mc -triple=riscv32 -filetype=obj --mattr=+zve32x --mattr=+zvksed %s \
6# RUN:        | llvm-objdump -d --mattr=+zve32x --mattr=+zvksed --no-print-imm-hex - \
7# RUN:        | FileCheck %s --check-prefix=CHECK-INST
8# RUN: llvm-mc -triple=riscv32 -filetype=obj --mattr=+zve32x --mattr=+zvksed %s \
9# RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
10
11vsm4k.vi v10, v9, 7
12# CHECK-INST: vsm4k.vi v10, v9, 7
13# CHECK-ENCODING: [0x77,0xa5,0x93,0x86]
14# CHECK-ERROR: instruction requires the following: 'Zvksed' (SM4 Block Cipher Instructions){{$}}
15# CHECK-UNKNOWN: 8693a577 <unknown>
16
17vsm4k.vi v10, v9, 31
18# CHECK-INST: vsm4k.vi v10, v9, 31
19# CHECK-ENCODING: [0x77,0xa5,0x9f,0x86]
20# CHECK-ERROR: instruction requires the following: 'Zvksed' (SM4 Block Cipher Instructions){{$}}
21# CHECK-UNKNOWN: 869fa577 <unknown>
22
23vsm4r.vv v10, v9
24# CHECK-INST: vsm4r.vv v10, v9
25# CHECK-ENCODING: [0x77,0x25,0x98,0xa2]
26# CHECK-ERROR: instruction requires the following: 'Zvksed' (SM4 Block Cipher Instructions){{$}}
27# CHECK-UNKNOWN: a2982577 <unknown>
28
29vsm4r.vs v10, v9
30# CHECK-INST: vsm4r.vs v10, v9
31# CHECK-ENCODING: [0x77,0x25,0x98,0xa6]
32# CHECK-ERROR: instruction requires the following: 'Zvksed' (SM4 Block Cipher Instructions){{$}}
33# CHECK-UNKNOWN: a6982577 <unknown>
34