diff options
Diffstat (limited to 'llvm/lib/Target/BPF/BPFInstrInfo.td')
-rw-r--r-- | llvm/lib/Target/BPF/BPFInstrInfo.td | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/lib/Target/BPF/BPFInstrInfo.td b/llvm/lib/Target/BPF/BPFInstrInfo.td index ae5a82a99303..0f39294daa2b 100644 --- a/llvm/lib/Target/BPF/BPFInstrInfo.td +++ b/llvm/lib/Target/BPF/BPFInstrInfo.td @@ -437,6 +437,25 @@ class LOAD<BPFWidthModifer SizeOp, string OpcodeStr, list<dag> Pattern> class LOADi64<BPFWidthModifer SizeOp, string OpcodeStr, PatFrag OpNode> : LOAD<SizeOp, OpcodeStr, [(set i64:$dst, (OpNode ADDRri:$addr))]>; +let isCodeGenOnly = 1 in { + def CORE_MEM : TYPE_LD_ST<BPF_MEM.Value, BPF_W.Value, + (outs GPR:$dst), + (ins u64imm:$opcode, GPR:$src, u64imm:$offset), + "$dst = core_mem($opcode, $src, $offset)", + []>; + def CORE_ALU32_MEM : TYPE_LD_ST<BPF_MEM.Value, BPF_W.Value, + (outs GPR32:$dst), + (ins u64imm:$opcode, GPR:$src, u64imm:$offset), + "$dst = core_alu32_mem($opcode, $src, $offset)", + []>; + let Constraints = "$dst = $src" in { + def CORE_SHIFT : ALU_RR<BPF_ALU64, BPF_LSH, + (outs GPR:$dst), + (ins u64imm:$opcode, GPR:$src, u64imm:$offset), + "$dst = core_shift($opcode, $src, $offset)", + []>; + } +} let Predicates = [BPFNoALU32] in { def LDW : LOADi64<BPF_W, "u32", zextloadi32>; |