Skip to content

Instantly share code, notes, and snippets.

@agentzh

agentzh/a.patch Secret

Created November 6, 2021 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agentzh/edaca7c06763eea9cd02cf7d6f67888d to your computer and use it in GitHub Desktop.
Save agentzh/edaca7c06763eea9cd02cf7d6f67888d to your computer and use it in GitHub Desktop.
diff --git a/llvm/lib/Target/BPF/BPFInstrInfo.td b/llvm/lib/Target/BPF/BPFInstrInfo.td
index 082e1f4a92c2..26710b3b594c 100644
--- a/llvm/lib/Target/BPF/BPFInstrInfo.td
+++ b/llvm/lib/Target/BPF/BPFInstrInfo.td
@@ -162,11 +162,11 @@ class JMP_RR<BPFJumpOp Opc, string OpcodeStr, PatLeaf Cond>
[(BPFbrcc i64:$dst, i64:$src, Cond, bb:$BrDst)]> {
bits<4> dst;
bits<4> src;
- bits<16> BrDst;
+ bits<32> BrDst;
let Inst{55-52} = src;
let Inst{51-48} = dst;
- let Inst{47-32} = BrDst;
+ let Inst{31-0} = BrDst;
let BPFClass = BPF_JMP;
}
@@ -471,9 +471,9 @@ class BRANCH<BPFJumpOp Opc, string OpcodeStr, list<dag> Pattern>
(ins brtarget:$BrDst),
!strconcat(OpcodeStr, " $BrDst"),
Pattern> {
- bits<16> BrDst;
+ bits<32> BrDst;
- let Inst{47-32} = BrDst;
+ let Inst{31-0} = BrDst;
let BPFClass = BPF_JMP;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment