-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[llvm-exegesis][AArch64] Disable pauth and ldgm as unsupported instructions #132346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
f1e1d7a
5039c2b
6b81e65
bef8e21
dade502
b6ce448
783f86d
70eb3bf
a1fedb4
06fbe30
3af87a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| REQUIRES: aarch64-registered-target | ||
|
|
||
| ## Check for skipping of illegal instruction errors (AUT and LDGM) | ||
| RUN: llvm-exegesis -mcpu=neoverse-v2 -mode=latency --dump-object-to-disk=%d --min-instructions=1 --opcode-name=AUTIA --benchmark-phase=assemble-measured-code 2>&1 | ||
|
||
| CHECK: AUTIA: Unsupported opcode: isPointerAuth/isUncheckedAccess | ||
|
|
||
| RUN: llvm-exegesis -mcpu=neoverse-v2 -mode=latency --dump-object-to-disk=%d --min-instructions=1 --opcode-name=LDGM --benchmark-phase=assemble-measured-code 2>&1 | ||
| CHECK: LDGM: Unsupported opcode: isPointerAuth/isUncheckedAccess | ||
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,14 @@ const ExegesisTarget *ExegesisTarget::lookup(Triple TT) { | |
| return nullptr; | ||
| } | ||
|
|
||
| static bool isPointerAuthOpcode(unsigned Opcode) { | ||
|
||
| return (Opcode >= 1648 && Opcode <= 1667); // AUT instruction class range | ||
|
||
| } | ||
|
|
||
| static bool isUncheckedAccessOpcode(unsigned Opcode) { | ||
| return Opcode == 4694; // LDGM instruction | ||
|
||
| } | ||
|
|
||
| const char * | ||
| ExegesisTarget::getIgnoredOpcodeReasonOrNull(const LLVMState &State, | ||
| unsigned Opcode) const { | ||
|
|
@@ -45,6 +53,8 @@ ExegesisTarget::getIgnoredOpcodeReasonOrNull(const LLVMState &State, | |
| return "Unsupported opcode: isBranch/isIndirectBranch"; | ||
| if (InstrDesc.isCall() || InstrDesc.isReturn()) | ||
| return "Unsupported opcode: isCall/isReturn"; | ||
| if (isPointerAuthOpcode(Opcode) || isUncheckedAccessOpcode(Opcode)) | ||
| return "Unsupported opcode: isPointerAuth/isUncheckedAccess"; | ||
| return nullptr; | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
REQUIRES/RUN/CHECK lines should still be in comments even if this file isn't loaded anywhere (or at least I prefer it that way to be consistent with other tests).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, Thanks!