|
| 1 | +// RUN: llvm-mc -triple=aarch64 -show-encoding --print-imm-hex=false < %s \ |
| 2 | +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST |
| 3 | +// RUN: llvm-mc -triple=aarch64 -filetype=obj < %s \ |
| 4 | +// RUN: | llvm-objdump -d --print-imm-hex=false - | FileCheck %s --check-prefix=CHECK-INST |
| 5 | +// Disassemble encoding and check the re-encoding (-show-encoding) matches. |
| 6 | +// RUN: llvm-mc -triple=aarch64 -show-encoding < %s \ |
| 7 | +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ |
| 8 | +// RUN: | llvm-mc -triple=aarch64 -disassemble -show-encoding --print-imm-hex=false \ |
| 9 | +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST |
| 10 | + |
| 11 | +// PRFM falls back to PRFUM for negative or unaligned offsets (not a multiple |
| 12 | +// of 8). |
| 13 | + |
| 14 | +prfm pldl1keep, [x0, #-256] |
| 15 | +// CHECK-INST: prfum pldl1keep, [x0, #-256] |
| 16 | +// CHECK-ENCODING: [0x00,0x00,0x90,0xf8] |
| 17 | + |
| 18 | +prfm pldl1keep, [x0, #-8] |
| 19 | +// CHECK-INST: prfum pldl1keep, [x0, #-8] |
| 20 | +// CHECK-ENCODING: [0x00,0x80,0x9f,0xf8] |
| 21 | + |
| 22 | +prfm pldl1keep, [x0, #-1] |
| 23 | +// CHECK-INST: prfum pldl1keep, [x0, #-1] |
| 24 | +// CHECK-ENCODING: [0x00,0xf0,0x9f,0xf8] |
| 25 | + |
| 26 | +prfm pldl1keep, [x0, #0] |
| 27 | +// CHECK-INST: prfm pldl1keep, [x0] |
| 28 | +// CHECK-ENCODING: [0x00,0x00,0x80,0xf9] |
| 29 | + |
| 30 | +prfm pldl1keep, [x0, #1] |
| 31 | +// CHECK-INST: prfum pldl1keep, [x0, #1] |
| 32 | +// CHECK-ENCODING: [0x00,0x10,0x80,0xf8] |
| 33 | + |
| 34 | +prfm pldl1keep, [x0, #8] |
| 35 | +// CHECK-INST: prfm pldl1keep, [x0, #8] |
| 36 | +// CHECK-ENCODING: [0x00,0x04,0x80,0xf9] |
| 37 | + |
| 38 | +prfm pldl1keep, [x0, #255] |
| 39 | +// CHECK-INST: prfum pldl1keep, [x0, #255] |
| 40 | +// CHECK-ENCODING: [0x00,0xf0,0x8f,0xf8] |
| 41 | + |
| 42 | +prfm pldl1keep, [x0, #256] |
| 43 | +// CHECK-INST: prfm pldl1keep, [x0, #256] |
| 44 | +// CHECK-ENCODING: [0x00,0x80,0x80,0xf9] |
0 commit comments