forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64] Assembly support for the Armv9.5-A Memory System Extensions (…
…llvm#76237) This implements assembly support for the Memory Systems Extensions introduced as part of the Armv9.5-A architecture version. The changes include: * New subtarget feature for FEAT_TLBIW. * New system registers for FEAT_HDBSS: * HDBSSBR_EL2 and HDBSSPROD_EL2. * New system registers for FEAT_HACDBS: * HACDBSBR_EL2 and HACDBSCONS_EL2. * New TLBI instructions for FEAT_TLBIW: * VMALLWS2E1(nXS), VMALLWS2E1IS(nXS) and VMALLWS2E1OS(nXS). * New system register for FEAT_FGWTE3: * FGWTE3_EL3.
- Loading branch information
Showing
14 changed files
with
153 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s | ||
|
||
mrs x0, FGWTE3_EL3 | ||
// CHECK: mrs x0, FGWTE3_EL3 // encoding: [0xa0,0x11,0x3e,0xd5] | ||
msr FGWTE3_EL3, x0 | ||
// CHECK: msr FGWTE3_EL3, x0 // encoding: [0xa0,0x11,0x1e,0xd5] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s | ||
|
||
mrs x0, HACDBSBR_EL2 | ||
// CHECK: mrs x0, HACDBSBR_EL2 // encoding: [0x80,0x23,0x3c,0xd5] | ||
msr HACDBSBR_EL2, x0 | ||
// CHECK: msr HACDBSBR_EL2, x0 // encoding: [0x80,0x23,0x1c,0xd5] | ||
|
||
mrs x0, HACDBSCONS_EL2 | ||
// CHECK: mrs x0, HACDBSCONS_EL2 // encoding: [0xa0,0x23,0x3c,0xd5] | ||
msr HACDBSCONS_EL2, x0 | ||
// CHECK: msr HACDBSCONS_EL2, x0 // encoding: [0xa0,0x23,0x1c,0xd5] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// RUN: llvm-mc -triple aarch64 -show-encoding < %s | FileCheck %s | ||
|
||
mrs x0, HDBSSBR_EL2 | ||
// CHECK: mrs x0, HDBSSBR_EL2 // encoding: [0x40,0x23,0x3c,0xd5] | ||
msr HDBSSBR_EL2, x0 | ||
// CHECK: msr HDBSSBR_EL2, x0 // encoding: [0x40,0x23,0x1c,0xd5] | ||
|
||
mrs x0, HDBSSPROD_EL2 | ||
// CHECK: mrs x0, HDBSSPROD_EL2 // encoding: [0x60,0x23,0x3c,0xd5] | ||
msr HDBSSPROD_EL2, x0 | ||
// CHECK: msr HDBSSPROD_EL2, x0 // encoding: [0x60,0x23,0x1c,0xd5] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// RUN: llvm-mc -triple aarch64 -show-encoding -mattr=+tlbiw -mattr=+xs < %s | FileCheck --check-prefix=CHECK-TLBIW --check-prefix=CHECK-XS %s | ||
// RUN: not llvm-mc -triple aarch64 -show-encoding -mattr=+tlbiw < %s 2> %t | FileCheck --check-prefix=CHECK-TLBIW %s && FileCheck --check-prefix=ERROR-NO-XS-TLBIW %s < %t | ||
// RUN: not llvm-mc -triple aarch64 < %s 2>&1 | FileCheck --check-prefix=ERROR-NO-TLBIW --check-prefix=ERROR-NO-XS-TLBIW %s | ||
|
||
tlbi VMALLWS2E1 | ||
// CHECK-TLBIW: tlbi vmallws2e1 // encoding: [0x5f,0x86,0x0c,0xd5] | ||
// ERROR-NO-TLBIW: [[@LINE-2]]:6: error: TLBI VMALLWS2E1 requires: tlbiw | ||
|
||
tlbi VMALLWS2E1IS | ||
// CHECK-TLBIW: tlbi vmallws2e1is // encoding: [0x5f,0x82,0x0c,0xd5] | ||
// ERROR-NO-TLBIW: [[@LINE-2]]:6: error: TLBI VMALLWS2E1IS requires: tlbiw | ||
|
||
tlbi VMALLWS2E1OS | ||
// CHECK-TLBIW: tlbi vmallws2e1os // encoding: [0x5f,0x85,0x0c,0xd5] | ||
// ERROR-NO-TLBIW: [[@LINE-2]]:6: error: TLBI VMALLWS2E1OS requires: tlbiw | ||
|
||
tlbi VMALLWS2E1nXS | ||
// CHECK-XS: tlbi vmallws2e1nxs // encoding: [0x5f,0x96,0x0c,0xd5] | ||
// ERROR-NO-XS-TLBIW: [[@LINE-2]]:6: error: TLBI VMALLWS2E1nXS requires: xs, tlbiw | ||
|
||
tlbi VMALLWS2E1ISnXS | ||
// CHECK-XS: tlbi vmallws2e1isnxs // encoding: [0x5f,0x92,0x0c,0xd5] | ||
// ERROR-NO-XS-TLBIW: [[@LINE-2]]:6: error: TLBI VMALLWS2E1ISnXS requires: xs, tlbiw | ||
|
||
tlbi VMALLWS2E1OSnXS | ||
// CHECK-XS: tlbi vmallws2e1osnxs // encoding: [0x5f,0x95,0x0c,0xd5] | ||
// ERROR-NO-XS-TLBIW: [[@LINE-2]]:6: error: TLBI VMALLWS2E1OSnXS requires: xs, tlbiw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# RUN: llvm-mc -triple aarch64 -disassemble < %s | FileCheck %s | ||
|
||
[0xa0,0x11,0x3e,0xd5] | ||
# CHECK: mrs x0, FGWTE3_EL3 | ||
|
||
[0xa0,0x11,0x1e,0xd5] | ||
# CHECK: msr FGWTE3_EL3, x0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# RUN: llvm-mc -triple aarch64 -disassemble < %s | FileCheck %s | ||
|
||
[0x80,0x23,0x3c,0xd5] | ||
# CHECK: mrs x0, HACDBSBR_EL2 | ||
|
||
[0x80,0x23,0x1c,0xd5] | ||
# CHECK: msr HACDBSBR_EL2, x0 | ||
|
||
[0xa0,0x23,0x3c,0xd5] | ||
# CHECK: mrs x0, HACDBSCONS_EL2 | ||
|
||
[0xa0,0x23,0x1c,0xd5] | ||
# CHECK: msr HACDBSCONS_EL2, x0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# RUN: llvm-mc -triple aarch64 -disassemble < %s | FileCheck %s | ||
|
||
[0x40,0x23,0x3c,0xd5] | ||
# CHECK: mrs x0, HDBSSBR_EL2 | ||
|
||
[0x40,0x23,0x1c,0xd5] | ||
# CHECK: msr HDBSSBR_EL2, x0 | ||
|
||
[0x60,0x23,0x3c,0xd5] | ||
# CHECK: mrs x0, HDBSSPROD_EL2 | ||
|
||
[0x60,0x23,0x1c,0xd5] | ||
# CHECK: msr HDBSSPROD_EL2, x0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# RUN: llvm-mc -triple aarch64 -disassemble -mattr=+tlbiw -mattr=+xs < %s | FileCheck --check-prefix=CHECK-TLBIW --check-prefix=CHECK-XS %s | ||
# RUN: llvm-mc -triple aarch64 -disassemble -mattr=+tlbiw < %s | FileCheck --check-prefix=CHECK-TLBIW --check-prefix=CHECK-NO-XS-TLBIW %s | ||
# RUN: llvm-mc -triple aarch64 -disassemble < %s | FileCheck --check-prefix=CHECK-NO-TLBIW --check-prefix=CHECK-NO-XS-TLBIW %s | ||
|
||
[0x5f,0x86,0x0c,0xd5] | ||
# CHECK-TLBIW: tlbi vmallws2e1 | ||
# CHECK-NO-TLBIW: sys #4, c8, c6, #2 | ||
|
||
[0x5f,0x82,0x0c,0xd5] | ||
# CHECK-TLBIW: tlbi vmallws2e1is | ||
# CHECK-NO-TLBIW: sys #4, c8, c2, #2 | ||
|
||
[0x5f,0x85,0x0c,0xd5] | ||
# CHECK-TLBIW: tlbi vmallws2e1os | ||
# CHECK-NO-TLBIW: sys #4, c8, c5, #2 | ||
|
||
[0x5f,0x96,0x0c,0xd5] | ||
# CHECK-XS: tlbi vmallws2e1nxs | ||
# CHECK-NO-XS-TLBIW: sys #4, c9, c6, #2 | ||
|
||
[0x5f,0x92,0x0c,0xd5] | ||
# CHECK-XS: tlbi vmallws2e1isnxs | ||
# CHECK-NO-XS-TLBIW: sys #4, c9, c2, #2 | ||
|
||
[0x5f,0x95,0x0c,0xd5] | ||
# CHECK-XS: tlbi vmallws2e1osnxs | ||
# CHECK-NO-XS-TLBIW: sys #4, c9, c5, #2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters