Lines Matching refs:Opcode
62 bool isLoadInst(unsigned Opcode);
76 unsigned Opcode);
96 static bool isST(unsigned Opcode) { in isST() argument
97 return Opcode == BPF::STB_imm || Opcode == BPF::STH_imm || in isST()
98 Opcode == BPF::STW_imm || Opcode == BPF::STD_imm; in isST()
101 static bool isSTX32(unsigned Opcode) { in isSTX32() argument
102 return Opcode == BPF::STB32 || Opcode == BPF::STH32 || Opcode == BPF::STW32; in isSTX32()
105 static bool isSTX64(unsigned Opcode) { in isSTX64() argument
106 return Opcode == BPF::STB || Opcode == BPF::STH || Opcode == BPF::STW || in isSTX64()
107 Opcode == BPF::STD; in isSTX64()
110 static bool isLDX32(unsigned Opcode) { in isLDX32() argument
111 return Opcode == BPF::LDB32 || Opcode == BPF::LDH32 || Opcode == BPF::LDW32; in isLDX32()
114 static bool isLDX64(unsigned Opcode) { in isLDX64() argument
115 return Opcode == BPF::LDB || Opcode == BPF::LDH || Opcode == BPF::LDW || in isLDX64()
116 Opcode == BPF::LDD; in isLDX64()
119 static bool isLDSX(unsigned Opcode) { in isLDSX() argument
120 return Opcode == BPF::LDBSX || Opcode == BPF::LDHSX || Opcode == BPF::LDWSX; in isLDSX()
123 bool BPFMISimplifyPatchable::isLoadInst(unsigned Opcode) { in isLoadInst() argument
124 return isLDX32(Opcode) || isLDX64(Opcode) || isLDSX(Opcode); in isLoadInst()
143 unsigned Opcode = DefInst->getOpcode(); in checkADDrr() local
145 if (isLDX64(Opcode) || isLDSX(Opcode)) in checkADDrr()
147 else if (isLDX32(Opcode)) in checkADDrr()
149 else if (isSTX64(Opcode) || isSTX32(Opcode) || isST(Opcode)) in checkADDrr()
162 if (isSTX64(Opcode) || isSTX32(Opcode)) { in checkADDrr()
169 .add(DefInst->getOperand(0)).addImm(Opcode).add(*BaseOp) in checkADDrr()
177 unsigned Opcode) { in checkShift() argument
184 .add(Inst->getOperand(0)).addImm(Opcode) in checkShift()
207 unsigned Opcode = I->getParent()->getOpcode(); in processCandidate() local
208 if (Opcode == BPF::SUBREG_TO_REG) { in processCandidate()
287 unsigned Opcode = Inst->getOpcode(); in processInst() local
288 if (isLoadInst(Opcode)) { in processInst()
293 if (Opcode == BPF::ADD_rr) in processInst()
295 else if (Opcode == BPF::SLL_rr) in processInst()
297 else if (Opcode == BPF::SRA_rr) in processInst()
299 else if (Opcode == BPF::SRL_rr) in processInst()