xref: /llvm-project/llvm/test/MC/RISCV/rvv/and.s (revision b27f86b40b20942c0e809128214b43d6edde365a)
1# RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+v %s \
2# RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3# RUN: not llvm-mc -triple=riscv64 -show-encoding %s 2>&1 \
4# RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
5# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v %s \
6# RUN:        | llvm-objdump -d --mattr=+v --no-print-imm-hex - \
7# RUN:        | FileCheck %s --check-prefix=CHECK-INST
8# RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+v %s \
9# RUN:        | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
10
11vand.vv v8, v4, v20, v0.t
12# CHECK-INST: vand.vv v8, v4, v20, v0.t
13# CHECK-ENCODING: [0x57,0x04,0x4a,0x24]
14# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
15# CHECK-UNKNOWN: 244a0457 <unknown>
16
17vand.vv v8, v4, v20
18# CHECK-INST: vand.vv v8, v4, v20
19# CHECK-ENCODING: [0x57,0x04,0x4a,0x26]
20# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
21# CHECK-UNKNOWN: 264a0457 <unknown>
22
23vand.vx v8, v4, a0, v0.t
24# CHECK-INST: vand.vx v8, v4, a0, v0.t
25# CHECK-ENCODING: [0x57,0x44,0x45,0x24]
26# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
27# CHECK-UNKNOWN: 24454457 <unknown>
28
29vand.vx v8, v4, a0
30# CHECK-INST: vand.vx v8, v4, a0
31# CHECK-ENCODING: [0x57,0x44,0x45,0x26]
32# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
33# CHECK-UNKNOWN: 26454457 <unknown>
34
35vand.vi v8, v4, 15, v0.t
36# CHECK-INST: vand.vi v8, v4, 15, v0.t
37# CHECK-ENCODING: [0x57,0xb4,0x47,0x24]
38# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
39# CHECK-UNKNOWN: 2447b457 <unknown>
40
41vand.vi v8, v4, 15
42# CHECK-INST: vand.vi v8, v4, 15
43# CHECK-ENCODING: [0x57,0xb4,0x47,0x26]
44# CHECK-ERROR: instruction requires the following: 'V' (Vector Extension for Application Processors), 'Zve32x' (Vector Extensions for Embedded Processors){{$}}
45# CHECK-UNKNOWN: 2647b457 <unknown>
46