diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64InstrFormats.td | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstrFormats.td b/llvm/lib/Target/AArch64/AArch64InstrFormats.td index 5007172f153..0c9687eca56 100644 --- a/llvm/lib/Target/AArch64/AArch64InstrFormats.td +++ b/llvm/lib/Target/AArch64/AArch64InstrFormats.td @@ -776,15 +776,17 @@ def simdimmtype10 : Operand<i32>, // Base encoding for system instruction operands. let mayLoad = 0, mayStore = 0, hasSideEffects = 1 in -class BaseSystemI<bit L, dag oops, dag iops, string asm, string operands> - : I<oops, iops, asm, operands, "", []> { +class BaseSystemI<bit L, dag oops, dag iops, string asm, string operands, + list<dag> pattern = []> + : I<oops, iops, asm, operands, "", pattern> { let Inst{31-22} = 0b1101010100; let Inst{21} = L; } // System instructions which do not have an Rt register. -class SimpleSystemI<bit L, dag iops, string asm, string operands> - : BaseSystemI<L, (outs), iops, asm, operands> { +class SimpleSystemI<bit L, dag iops, string asm, string operands, + list<dag> pattern = []> + : BaseSystemI<L, (outs), iops, asm, operands, pattern> { let Inst{4-0} = 0b11111; } @@ -797,13 +799,17 @@ class RtSystemI<bit L, dag oops, dag iops, string asm, string operands> } // Hint instructions that take both a CRm and a 3-bit immediate. -class HintI<string mnemonic> - : SimpleSystemI<0, (ins imm0_127:$imm), mnemonic#" $imm", "">, - Sched<[WriteHint]> { - bits <7> imm; - let Inst{20-12} = 0b000110010; - let Inst{11-5} = imm; -} +// NOTE: ideally, this would have mayStore = 0, mayLoad = 0, but we cannot +// model patterns with sufficiently fine granularity +let mayStore = 1, mayLoad = 1, hasSideEffects = 1 in + class HintI<string mnemonic> + : SimpleSystemI<0, (ins imm0_127:$imm), mnemonic#" $imm", "", + [(int_aarch64_hint imm0_127:$imm)]>, + Sched<[WriteHint]> { + bits <7> imm; + let Inst{20-12} = 0b000110010; + let Inst{11-5} = imm; + } // System instructions taking a single literal operand which encodes into // CRm. op2 differentiates the opcodes. |

