This repository has been archived by the owner on Apr 23, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64][v8.5A] Add prediction invalidation instructions to AArch64
This adds new system instructions which act as barriers to speculative execution based on earlier execution within a particular execution context. Patch by Pablo Barrio! Differential revision: https://reviews.llvm.org/D52479 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343214 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
11 changed files
with
142 additions
and
4 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
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,20 @@ | ||
// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+predctrl < %s 2>&1| FileCheck %s | ||
|
||
cfp rctx | ||
dvp rctx | ||
cpp rctx | ||
|
||
// CHECK: specified cfp op requires a register | ||
// CHECK: specified dvp op requires a register | ||
// CHECK: specified cpp op requires a register | ||
|
||
cfp x0, x1 | ||
dvp x1, x2 | ||
cpp x2, x3 | ||
|
||
// CHECK: invalid operand for prediction restriction instruction | ||
// CHECK-NEXT: cfp | ||
// CHECK: invalid operand for prediction restriction instruction | ||
// CHECK-NEXT: dvp | ||
// CHECK: invalid operand for prediction restriction instruction | ||
// CHECK-NEXT: cpp |
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,18 @@ | ||
// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+predctrl < %s | FileCheck %s | ||
// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.5a < %s | FileCheck %s | ||
// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=-predctrl < %s 2>&1 | FileCheck %s --check-prefix=NOPREDCTRL | ||
|
||
cfp rctx, x0 | ||
dvp rctx, x1 | ||
cpp rctx, x2 | ||
|
||
// CHECK: cfp rctx, x0 // encoding: [0x80,0x73,0x0b,0xd5] | ||
// CHECK: dvp rctx, x1 // encoding: [0xa1,0x73,0x0b,0xd5] | ||
// CHECK: cpp rctx, x2 // encoding: [0xe2,0x73,0x0b,0xd5] | ||
|
||
// NOPREDCTRL: CFPRCTX requires predctrl | ||
// NOPREDCTRL-NEXT: cfp | ||
// NOPREDCTRL: DVPRCTX requires predctrl | ||
// NOPREDCTRL-NEXT: dvp | ||
// NOPREDCTRL: CPPRCTX requires predctrl | ||
// NOPREDCTRL-NEXT: cpp |
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,15 @@ | ||
# RUN: llvm-mc -triple=aarch64 -mattr=+predctrl -disassemble < %s | FileCheck %s | ||
# RUN: llvm-mc -triple=aarch64 -mattr=+v8.5a -disassemble < %s | FileCheck %s | ||
# RUN: llvm-mc -triple=aarch64 -mattr=-predctrl -disassemble < %s 2>&1 | FileCheck %s --check-prefix=NOSB | ||
|
||
[0x80 0x73 0x0b 0xd5] | ||
[0xa1 0x73 0x0b 0xd5] | ||
[0xe2 0x73 0x0b 0xd5] | ||
|
||
# CHECK: cfp rctx, x0 | ||
# CHECK: dvp rctx, x1 | ||
# CHECK: cpp rctx, x2 | ||
|
||
# NOSB: sys #3, c7, c3, #4, x0 | ||
# NOSB: sys #3, c7, c3, #5, x1 | ||
# NOSB: sys #3, c7, c3, #7, x2 |