Ties Stuij | 94beaaa | 2022-11-22 12:38:47 +0000 | [diff] [blame] | 1 | // RUN: llvm-mc -triple=aarch64 -show-encoding --print-imm-hex=false -mattr=+v9.4a < %s \ |
| 2 | // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST |
| 3 | // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ |
| 4 | // RUN: | FileCheck %s --check-prefix=CHECK-ERROR |
| 5 | // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+v9.4a < %s \ |
| 6 | // RUN: | llvm-objdump -d --print-imm-hex=false --mattr=+v9.4a - \ |
| 7 | // RUN: | FileCheck %s --check-prefix=CHECK-INST |
| 8 | // Disassemble encoding and check the re-encoding (-show-encoding) matches. |
| 9 | // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+v9.4a < %s \ |
| 10 | // RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ |
| 11 | // RUN: | llvm-mc -triple=aarch64 -mattr=+v9.4a -disassemble -show-encoding \ |
| 12 | // RUN: --print-imm-hex=false \ |
| 13 | // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST |
| 14 | |
| 15 | smin w0, w0, #0 |
| 16 | // CHECK-INST: smin w0, w0, #0 |
| 17 | // CHECK-ENCODING: [0x00,0x00,0xc8,0x11] |
| 18 | // CHECK-ERROR: instruction requires: cssc |
| 19 | |
| 20 | smin w21, w10, #85 |
| 21 | // CHECK-INST: smin w21, w10, #85 |
| 22 | // CHECK-ENCODING: [0x55,0x55,0xc9,0x11] |
| 23 | // CHECK-ERROR: instruction requires: cssc |
| 24 | |
| 25 | smin w23, w13, #59 |
| 26 | // CHECK-INST: smin w23, w13, #59 |
| 27 | // CHECK-ENCODING: [0xb7,0xed,0xc8,0x11] |
| 28 | // CHECK-ERROR: instruction requires: cssc |
| 29 | |
| 30 | smin wzr, wzr, #-1 |
| 31 | // CHECK-INST: smin wzr, wzr, #-1 |
| 32 | // CHECK-ENCODING: [0xff,0xff,0xcb,0x11] |
| 33 | // CHECK-ERROR: instruction requires: cssc |