Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is used by disassemblers: `llvm-mc -disassemble -mattr=` and `llvm-objdump --mattr=`. The main use case is for llvm-objdump to disassemble all known instructions (D128030). In user-facing tools, "all" is intentionally not supported in producers: integrated assembler (`.arch_extension all`), clang -march (`-march=armv9.3a+all`). Due to the code structure, `llvm-mc -mattr=+all` `llc -mattr=+all` are not rejected (they are internal tool). Add `llvm/test/CodeGen/AArch64/mattr-all.ll` to catch behavior changes. AArch64SysReg::SysReg::haveFeatures: check `FeatureAll` to print `AArch64SysReg::SysReg::AltName` for some system registers (e.g. `ERRIDR_EL1, RNDR`). AArch64.td: add `AssemblerPredicateWithAll` to additionally test `FeatureAll`. Change all `AssemblerPredicate` (except `UseNegativeImmediates`) to `AssemblerPredicateWithAll`. utils/TableGen/{DecoderEmitter,SubtargetFeatureInfo}.cpp: support arbitrarily nested all_of, any_of, and not. Note: A predicate supports all_of, any_of, and not. For a target (though currently not for AArch64) an encoding may be disassembled differently with different target features. Note: AArch64MCCodeEmitter::computeAvailableFeatures is not available to the disassembler. Reviewed By: peter.smith, lenary Differential Revision: https://reviews.llvm.org/D128029
- Loading branch information
Showing
12 changed files
with
251 additions
and
152 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,24 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
;; -mattr=+all is not intended to be used for code emitters. Nevertheless, | ||
;; llc does not reject it. This test intends to catch behavior changes. | ||
; RUN: llc -mtriple=aarch64 -mattr=+all < %s | FileCheck %s | ||
|
||
define half @bf16() nounwind { | ||
; CHECK-LABEL: bf16: | ||
; CHECK: // %bb.0: | ||
; CHECK-NEXT: adrp x8, .LCPI0_0 | ||
; CHECK-NEXT: ldr h0, [x8, :lo12:.LCPI0_0] | ||
; CHECK-NEXT: ret | ||
ret half 0xH0000 | ||
} | ||
|
||
define i64 @perfmon() nounwind { | ||
; CHECK-LABEL: perfmon: | ||
; CHECK: // %bb.0: | ||
; CHECK-NEXT: mov x0, xzr | ||
; CHECK-NEXT: ret | ||
%tmp0 = call i64 @llvm.readcyclecounter() | ||
ret i64 %tmp0 | ||
} | ||
|
||
declare i64 @llvm.readcyclecounter() |
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,37 @@ | ||
# RUN: llvm-mc -triple=aarch64 -mattr=+all -disassemble %s 2>&1 | FileCheck %s | ||
|
||
## aes | ||
# CHECK: aese v0.16b, v1.16b | ||
[0x20,0x48,0x28,0x4e] | ||
|
||
## ete | ||
# CHECK: mrs x0, TRCRSR | ||
[0x00,0x0a,0x31,0xd5] | ||
|
||
## fp16fml | ||
# CHECK: fmlal v0.2s, v1.2h, v2.2h | ||
[0x20,0xec,0x22,0x0e] | ||
|
||
## armv8.2a ras | ||
# CHECK: mrs x0, ERRIDR_EL1 | ||
[0x00,0x53,0x38,0xd5] | ||
|
||
## armv8.5a mte | ||
# CHECK: irg x0, x1 | ||
[0x20,0x10,0xdf,0x9a] | ||
|
||
## armv8.5a rand | ||
# CHECK: mrs x0, RNDR | ||
[0x00,0x24,0x3b,0xd5] | ||
|
||
## armv8.6a matmul | ||
# CHECK: smmla v1.4s, v16.16b, v31.16b | ||
[0x01,0xa6,0x9f,0x4e] | ||
|
||
## armv8.8a-hbc | ||
# CHECK: bc.eq #4 | ||
[0x30,0x00,0x00,0x54] | ||
|
||
## armv9a rme | ||
# CHECK: mrs x0, MFAR_EL3 | ||
[0xa0,0x60,0x3e,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
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