blob: c089c8d623bae58e3165e21dd8175c8f600a90ed [file] [log] [blame]
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2p2 < %s \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2p2 < %s \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2p2 < %s \
// RUN: | llvm-objdump -d --mattr=+sve2p2 - | FileCheck %s --check-prefix=CHECK-INST
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2p2 < %s \
// RUN: | llvm-objdump -d --mattr=-sme2 - | FileCheck %s --check-prefix=CHECK-UNKNOWN
// Disassemble encoding and check the re-encoding (-show-encoding) matches.
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2p2 < %s \
// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \
// RUN: | llvm-mc -triple=aarch64 -mattr=+sve2p2 -disassemble -show-encoding \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
frecpx z0.h, p0/z, z0.h // 01100100-01011011-10000000-00000000
// CHECK-INST: frecpx z0.h, p0/z, z0.h
// CHECK-ENCODING: [0x00,0x80,0x5b,0x64]
// CHECK-ERROR: instruction requires: sme2p2 or sve2p2
// CHECK-UNKNOWN: 645b8000 <unknown>
frecpx z23.s, p3/z, z13.s // 01100100-10011011-10001101-10110111
// CHECK-INST: frecpx z23.s, p3/z, z13.s
// CHECK-ENCODING: [0xb7,0x8d,0x9b,0x64]
// CHECK-ERROR: instruction requires: sme2p2 or sve2p2
// CHECK-UNKNOWN: 649b8db7 <unknown>
frecpx z31.d, p7/z, z31.d // 01100100-11011011-10011111-11111111
// CHECK-INST: frecpx z31.d, p7/z, z31.d
// CHECK-ENCODING: [0xff,0x9f,0xdb,0x64]
// CHECK-ERROR: instruction requires: sme2p2 or sve2p2
// CHECK-UNKNOWN: 64db9fff <unknown>