[PATCH] D37068: [AArch64] IDSAR6 register assembler support

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 30 01:58:24 PDT 2017


samparker updated this revision to Diff 113210.
samparker retitled this revision from "[AArch64] Armv8.3-a IDSAR6 register support" to "[AArch64] IDSAR6 register assembler support".
samparker edited the summary of this revision.
samparker added a comment.

Moved the register inline with the other ISAR regs and now predicate on v8.2.


https://reviews.llvm.org/D37068

Files:
  lib/Target/AArch64/AArch64SystemOperands.td
  test/MC/AArch64/armv8.3a-ID_ISAR6_EL1.s
  test/MC/Disassembler/AArch64/armv8.3a-ID_ISAR6_EL1.txt


Index: test/MC/Disassembler/AArch64/armv8.3a-ID_ISAR6_EL1.txt
===================================================================
--- /dev/null
+++ test/MC/Disassembler/AArch64/armv8.3a-ID_ISAR6_EL1.txt
@@ -0,0 +1,4 @@
+# RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+v8.3a --disassemble < %s | FileCheck %s
+
+# CHECK: mrs x0, ID_ISAR6_EL1
+0xe0,0x02,0x38,0xd5
Index: test/MC/AArch64/armv8.3a-ID_ISAR6_EL1.s
===================================================================
--- /dev/null
+++ test/MC/AArch64/armv8.3a-ID_ISAR6_EL1.s
@@ -0,0 +1,9 @@
+// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.3a < %s 2>&1 | FileCheck %s
+// RUN: not llvm-mc -triple aarch64-none-linux-gnu < %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-REQ %s < %t
+
+  mrs x0, ID_ISAR6_EL1
+// CHECK: mrs x0, ID_ISAR6_EL1        // encoding: [0xe0,0x02,0x38,0xd5]
+// CHECK-REQ: error: expected readable system register
+// CHECK-REQ-NEXT: mrs x0, ID_ISAR6_EL1
+// CHECK-REQ-NEXT:         ^
Index: lib/Target/AArch64/AArch64SystemOperands.td
===================================================================
--- lib/Target/AArch64/AArch64SystemOperands.td
+++ lib/Target/AArch64/AArch64SystemOperands.td
@@ -342,6 +342,9 @@
 def : ROSysReg<"ID_ISAR3_EL1",       0b11, 0b000, 0b0000, 0b0010, 0b011>;
 def : ROSysReg<"ID_ISAR4_EL1",       0b11, 0b000, 0b0000, 0b0010, 0b100>;
 def : ROSysReg<"ID_ISAR5_EL1",       0b11, 0b000, 0b0000, 0b0010, 0b101>;
+def : ROSysReg<"ID_ISAR6_EL1",       0b11, 0b000, 0b0000, 0b0010, 0b111> {
+  let Requires = [{ {AArch64::HasV8_2aOps} }];
+}
 def : ROSysReg<"ID_AA64PFR0_EL1",     0b11, 0b000, 0b0000, 0b0100, 0b000>;
 def : ROSysReg<"ID_AA64PFR1_EL1",     0b11, 0b000, 0b0000, 0b0100, 0b001>;
 def : ROSysReg<"ID_AA64DFR0_EL1",     0b11, 0b000, 0b0000, 0b0101, 0b000>;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37068.113210.patch
Type: text/x-patch
Size: 1816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170830/cc7e1560/attachment.bin>


More information about the llvm-commits mailing list