Lines Matching refs:Opcode
63 bool isLoadInst(unsigned Opcode);
77 unsigned Opcode);
97 static bool isST(unsigned Opcode) { in isST() argument
98 return Opcode == BPF::STB_imm || Opcode == BPF::STH_imm || in isST()
99 Opcode == BPF::STW_imm || Opcode == BPF::STD_imm; in isST()
102 static bool isSTX32(unsigned Opcode) { in isSTX32() argument
103 return Opcode == BPF::STB32 || Opcode == BPF::STH32 || Opcode == BPF::STW32; in isSTX32()
106 static bool isSTX64(unsigned Opcode) { in isSTX64() argument
107 return Opcode == BPF::STB || Opcode == BPF::STH || Opcode == BPF::STW || in isSTX64()
108 Opcode == BPF::STD; in isSTX64()
111 static bool isLDX32(unsigned Opcode) { in isLDX32() argument
112 return Opcode == BPF::LDB32 || Opcode == BPF::LDH32 || Opcode == BPF::LDW32; in isLDX32()
115 static bool isLDX64(unsigned Opcode) { in isLDX64() argument
116 return Opcode == BPF::LDB || Opcode == BPF::LDH || Opcode == BPF::LDW || in isLDX64()
117 Opcode == BPF::LDD; in isLDX64()
120 static bool isLDSX(unsigned Opcode) { in isLDSX() argument
121 return Opcode == BPF::LDBSX || Opcode == BPF::LDHSX || Opcode == BPF::LDWSX; in isLDSX()
124 bool BPFMISimplifyPatchable::isLoadInst(unsigned Opcode) { in isLoadInst() argument
125 return isLDX32(Opcode) || isLDX64(Opcode) || isLDSX(Opcode); in isLoadInst()
144 unsigned Opcode = DefInst->getOpcode(); in checkADDrr() local
146 if (isLDX64(Opcode) || isLDSX(Opcode)) in checkADDrr()
148 else if (isLDX32(Opcode)) in checkADDrr()
150 else if (isSTX64(Opcode) || isSTX32(Opcode) || isST(Opcode)) in checkADDrr()
163 if (isSTX64(Opcode) || isSTX32(Opcode)) { in checkADDrr()
170 .add(DefInst->getOperand(0)).addImm(Opcode).add(*BaseOp) in checkADDrr()
178 unsigned Opcode) { in checkShift() argument
185 .add(Inst->getOperand(0)).addImm(Opcode) in checkShift()
208 unsigned Opcode = I->getParent()->getOpcode(); in processCandidate() local
209 if (Opcode == BPF::SUBREG_TO_REG) { in processCandidate()
288 unsigned Opcode = Inst->getOpcode(); in processInst() local
289 if (isLoadInst(Opcode)) { in processInst()
294 if (Opcode == BPF::ADD_rr) in processInst()
296 else if (Opcode == BPF::SLL_rr) in processInst()
298 else if (Opcode == BPF::SRA_rr) in processInst()
300 else if (Opcode == BPF::SRL_rr) in processInst()