From d48ce2c34f7a583c161f06f8a1df38d2e3922fd1 Mon Sep 17 00:00:00 2001 From: Javed Absar Date: Mon, 8 Jun 2015 15:01:11 +0000 Subject: [PATCH] ARM]: Add support for MMFR4_EL1 in assembler This patch adds support for system register MMFR4_EL1 (memory model feature register) in the assembler. This register provides information about the implemented memory model and memory management support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239302 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AArch64/Utils/AArch64BaseInfo.cpp | 1 + lib/Target/AArch64/Utils/AArch64BaseInfo.h | 1 + test/MC/AArch64/basic-a64-diagnostics.s | 4 ++++ test/MC/AArch64/basic-a64-instructions.s | 2 ++ test/MC/Disassembler/AArch64/basic-a64-instructions.txt | 2 ++ 5 files changed, 10 insertions(+) diff --git a/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp b/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp index 28b8e7e29fe..ee85b65bf39 100644 --- a/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp +++ b/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp @@ -175,6 +175,7 @@ const AArch64NamedImmMapper::Mapping AArch64SysReg::MRSMapper::MRSMappings[] = { {"id_mmfr1_el1", ID_MMFR1_EL1, {}}, {"id_mmfr2_el1", ID_MMFR2_EL1, {}}, {"id_mmfr3_el1", ID_MMFR3_EL1, {}}, + {"id_mmfr4_el1", ID_MMFR4_EL1, {}}, {"id_isar0_el1", ID_ISAR0_EL1, {}}, {"id_isar1_el1", ID_ISAR1_EL1, {}}, {"id_isar2_el1", ID_ISAR2_EL1, {}}, diff --git a/lib/Target/AArch64/Utils/AArch64BaseInfo.h b/lib/Target/AArch64/Utils/AArch64BaseInfo.h index 7125f14f1a2..7e42f8e3601 100644 --- a/lib/Target/AArch64/Utils/AArch64BaseInfo.h +++ b/lib/Target/AArch64/Utils/AArch64BaseInfo.h @@ -603,6 +603,7 @@ namespace AArch64SysReg { ISR_EL1 = 0xc608, // 11 000 1100 0001 000 CNTPCT_EL0 = 0xdf01, // 11 011 1110 0000 001 CNTVCT_EL0 = 0xdf02, // 11 011 1110 0000 010 + ID_MMFR4_EL1 = 0xc016, // 11 000 0000 0010 110 // Trace registers TRCSTATR = 0x8818, // 10 001 0000 0011 000 diff --git a/test/MC/AArch64/basic-a64-diagnostics.s b/test/MC/AArch64/basic-a64-diagnostics.s index 1d7ba710a9a..bf7db132b44 100644 --- a/test/MC/AArch64/basic-a64-diagnostics.s +++ b/test/MC/AArch64/basic-a64-diagnostics.s @@ -3494,6 +3494,7 @@ msr ID_MMFR1_EL1, x12 msr ID_MMFR2_EL1, x12 msr ID_MMFR3_EL1, x12 + msr ID_MMFR4_EL1, x12 msr ID_ISAR0_EL1, x12 msr ID_ISAR1_EL1, x12 msr ID_ISAR2_EL1, x12 @@ -3587,6 +3588,9 @@ // CHECK-ERROR-NEXT: msr ID_MMFR3_EL1, x12 // CHECK-ERROR-NEXT: ^ // CHECK-ERROR-NEXT: error: expected writable system register or pstate +// CHECK-ERROR-NEXT: msr ID_MMFR4_EL1, x12 +// CHECK-ERROR-NEXT: ^ +// CHECK-ERROR-NEXT: error: expected writable system register or pstate // CHECK-ERROR-NEXT: msr ID_ISAR0_EL1, x12 // CHECK-ERROR-NEXT: ^ // CHECK-ERROR-NEXT: error: expected writable system register or pstate diff --git a/test/MC/AArch64/basic-a64-instructions.s b/test/MC/AArch64/basic-a64-instructions.s index 75c86efd207..5d33a4f933b 100644 --- a/test/MC/AArch64/basic-a64-instructions.s +++ b/test/MC/AArch64/basic-a64-instructions.s @@ -4306,6 +4306,7 @@ _func: mrs x9, ID_MMFR1_EL1 mrs x9, ID_MMFR2_EL1 mrs x9, ID_MMFR3_EL1 + mrs x9, ID_MMFR4_EL1 mrs x9, ID_ISAR0_EL1 mrs x9, ID_ISAR1_EL1 mrs x9, ID_ISAR2_EL1 @@ -4606,6 +4607,7 @@ _func: // CHECK: mrs x9, {{id_mmfr1_el1|ID_MMFR1_EL1}} // encoding: [0xa9,0x01,0x38,0xd5] // CHECK: mrs x9, {{id_mmfr2_el1|ID_MMFR2_EL1}} // encoding: [0xc9,0x01,0x38,0xd5] // CHECK: mrs x9, {{id_mmfr3_el1|ID_MMFR3_EL1}} // encoding: [0xe9,0x01,0x38,0xd5] +// CHECK: mrs x9, {{id_mmfr4_el1|ID_MMFR4_EL1}} // encoding: [0xc9,0x02,0x38,0xd5] // CHECK: mrs x9, {{id_isar0_el1|ID_ISAR0_EL1}} // encoding: [0x09,0x02,0x38,0xd5] // CHECK: mrs x9, {{id_isar1_el1|ID_ISAR1_EL1}} // encoding: [0x29,0x02,0x38,0xd5] // CHECK: mrs x9, {{id_isar2_el1|ID_ISAR2_EL1}} // encoding: [0x49,0x02,0x38,0xd5] diff --git a/test/MC/Disassembler/AArch64/basic-a64-instructions.txt b/test/MC/Disassembler/AArch64/basic-a64-instructions.txt index c777f7aa649..615d9ba19ca 100644 --- a/test/MC/Disassembler/AArch64/basic-a64-instructions.txt +++ b/test/MC/Disassembler/AArch64/basic-a64-instructions.txt @@ -3414,6 +3414,7 @@ # CHECK: mrs x9, {{id_mmfr1_el1|ID_MMFR1_EL1}} # CHECK: mrs x9, {{id_mmfr2_el1|ID_MMFR2_EL1}} # CHECK: mrs x9, {{id_mmfr3_el1|ID_MMFR3_EL1}} +# CHECK: mrs x9, {{id_mmfr4_el1|ID_MMFR4_EL1}} # CHECK: mrs x9, {{id_isar0_el1|ID_ISAR0_EL1}} # CHECK: mrs x9, {{id_isar1_el1|ID_ISAR1_EL1}} # CHECK: mrs x9, {{id_isar2_el1|ID_ISAR2_EL1}} @@ -3968,6 +3969,7 @@ 0xa9 0x1 0x38 0xd5 0xc9 0x1 0x38 0xd5 0xe9 0x1 0x38 0xd5 +0xc9 0x2 0x38 0xd5 0x9 0x2 0x38 0xd5 0x29 0x2 0x38 0xd5 0x49 0x2 0x38 0xd5 -- 2.34.1