130 lines · plain
1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+mec < %s \2// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST3// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \4// RUN: | FileCheck %s --check-prefixes=CHECK-ERROR5// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+mec < %s \6// RUN: | llvm-objdump -d --mattr=+mec --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-INST7// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+mec < %s \8// RUN: | llvm-objdump -d --mattr=-mec --no-print-imm-hex - | FileCheck %s --check-prefix=CHECK-UNKNOWN9// Disassemble encoding and check the re-encoding (-show-encoding) matches.10// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+mec < %s \11// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \12// RUN: | llvm-mc -triple=aarch64 -mattr=+mec -disassemble -show-encoding \13// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST14// RUN: llvm-mc -triple aarch64 -disassemble < %s 2>&1 | FileCheck --check-prefix=CHECK-NO-MEC %s15 16 17mrs x0, MECIDR_EL218// CHECK-INST: mrs x0, MECIDR_EL219// CHECK-ENCODING: encoding: [0xe0,0xa8,0x3c,0xd5]20// CHECK-ERROR: error: expected readable system register21// CHECK-UNKNOWN: d53ca8e0 mrs x0, S3_4_C10_C8_722 23mrs x0, MECID_P0_EL224// CHECK-INST: mrs x0, MECID_P0_EL225// CHECK-ENCODING: encoding: [0x00,0xa8,0x3c,0xd5]26// CHECK-ERROR: error: expected readable system register27// CHECK-UNKNOWN: d53ca800 mrs x0, S3_4_C10_C8_028 29mrs x0, MECID_A0_EL230// CHECK-INST: mrs x0, MECID_A0_EL231// CHECK-ENCODING: encoding: [0x20,0xa8,0x3c,0xd5]32// CHECK-ERROR: error: expected readable system register33// CHECK-UNKNOWN: d53ca820 mrs x0, S3_4_C10_C8_134 35mrs x0, MECID_P1_EL236// CHECK-INST: mrs x0, MECID_P1_EL237// CHECK-ENCODING: encoding: [0x40,0xa8,0x3c,0xd5]38// CHECK-ERROR: error: expected readable system register39// CHECK-UNKNOWN: d53ca840 mrs x0, S3_4_C10_C8_240 41mrs x0, MECID_A1_EL242// CHECK-INST: mrs x0, MECID_A1_EL243// CHECK-ENCODING: encoding: [0x60,0xa8,0x3c,0xd5]44// CHECK-ERROR: error: expected readable system register45// CHECK-UNKNOWN: d53ca860 mrs x0, S3_4_C10_C8_346 47mrs x0, VMECID_P_EL248// CHECK-INST: mrs x0, VMECID_P_EL249// CHECK-ENCODING: encoding: [0x00,0xa9,0x3c,0xd5]50// CHECK-ERROR: error: expected readable system register51// CHECK-UNKNOWN: d53ca900 mrs x0, S3_4_C10_C9_052 53mrs x0, VMECID_A_EL254// CHECK-INST: mrs x0, VMECID_A_EL255// CHECK-ENCODING: encoding: [0x20,0xa9,0x3c,0xd5]56// CHECK-ERROR: error: expected readable system register57// CHECK-UNKNOWN: d53ca920 mrs x0, S3_4_C10_C9_158 59mrs x0, MECID_RL_A_EL360// CHECK-INST: mrs x0, MECID_RL_A_EL361// CHECK-ENCODING: encoding: [0x20,0xaa,0x3e,0xd5]62// CHECK-ERROR: error: expected readable system register63// CHECK-UNKNOWN: d53eaa20 mrs x0, S3_6_C10_C10_164 65msr MECID_P0_EL2, x066// CHECK-INST: msr MECID_P0_EL2, x067// CHECK-ENCODING: encoding: [0x00,0xa8,0x1c,0xd5]68// CHECK-ERROR: error: expected writable system register or pstate69// CHECK-UNKNOWN: d51ca800 msr S3_4_C10_C8_0, x070 71msr MECID_A0_EL2, x072// CHECK-INST: msr MECID_A0_EL2, x073// CHECK-ENCODING: encoding: [0x20,0xa8,0x1c,0xd5]74// CHECK-ERROR: error: expected writable system register or pstate75// CHECK-UNKNOWN: d51ca820 msr S3_4_C10_C8_1, x076 77msr MECID_P1_EL2, x078// CHECK-INST: msr MECID_P1_EL2, x079// CHECK-ENCODING: encoding: [0x40,0xa8,0x1c,0xd5]80// CHECK-ERROR: error: expected writable system register or pstate81// CHECK-UNKNOWN: d51ca840 msr S3_4_C10_C8_2, x082 83msr MECID_A1_EL2, x084// CHECK-INST: msr MECID_A1_EL2, x085// CHECK-ENCODING: encoding: [0x60,0xa8,0x1c,0xd5]86// CHECK-ERROR: error: expected writable system register or pstate87// CHECK-UNKNOWN: d51ca860 msr S3_4_C10_C8_3, x088 89msr VMECID_P_EL2, x090// CHECK-INST: msr VMECID_P_EL2, x091// CHECK-ENCODING: encoding: [0x00,0xa9,0x1c,0xd5]92// CHECK-ERROR: error: expected writable system register or pstate93// CHECK-UNKNOWN: d51ca900 msr S3_4_C10_C9_0, x094 95msr VMECID_A_EL2, x096// CHECK-INST: msr VMECID_A_EL2, x097// CHECK-ENCODING: encoding: [0x20,0xa9,0x1c,0xd5]98// CHECK-ERROR: error: expected writable system register or pstate99// CHECK-UNKNOWN: d51ca920 msr S3_4_C10_C9_1, x0100 101msr MECID_RL_A_EL3, x0102// CHECK-INST: msr MECID_RL_A_EL3, x0103// CHECK-ENCODING: encoding: [0x20,0xaa,0x1e,0xd5]104// CHECK-ERROR: error: expected writable system register or pstate105// CHECK-UNKNOWN: d51eaa20 msr S3_6_C10_C10_1, x0106 107dc cigdpae, x0108// CHECK-INST: dc cigdpae, x0109// CHECK-ENCODING: encoding: [0xe0,0x7e,0x0c,0xd5]110// CHECK-ERROR: :[[@LINE-3]]:4: error: DC CIGDPAE requires: mec111// CHECK-UNKNOWN: d50c7ee0 sys #4, c7, c14, #7, x0112// CHECK-NO-MEC: sys #4, c7, c14, #7, x0113 114dc cipae, x0115// CHECK-INST: dc cipae, x0116// CHECK-ENCODING: encoding: [0x00,0x7e,0x0c,0xd5]117// CHECK-ERROR: :[[@LINE-3]]:4: error: DC CIPAE requires: mec118// CHECK-UNKNOWN: d50c7e00 sys #4, c7, c14, #0, x0119// CHECK-NO-MEC: sys #4, c7, c14, #0, x0120 121sys #4, c7, c14, #7, x0122// CHECK-INST: dc cigdpae, x0123// CHECK-ENCODING: encoding: [0xe0,0x7e,0x0c,0xd5]124// CHECK-UNKNOWN: d50c7ee0 sys #4, c7, c14, #7, x0125 126sys #4, c7, c14, #0, x0127// CHECK-INST: dc cipae, x0128// CHECK-ENCODING: encoding: [0x00,0x7e,0x0c,0xd5]129// CHECK-UNKNOWN: d50c7e00 sys #4, c7, c14, #0, x0130