File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -1542,17 +1542,12 @@ bool BTFDebug::InstLower(const MachineInstr *MI, MCInst &OutMI) {
15421542 const GlobalValue *GVal = MO.getGlobal ();
15431543 auto *GVar = dyn_cast<GlobalVariable>(GVal);
15441544 if (GVar) {
1545- // Emit "mov ri, <imm>"
1546- int64_t Imm;
1547- uint32_t Reloc;
1548- if (GVar->hasAttribute (BPFCoreSharedInfo::AmaAttr) ||
1549- GVar->hasAttribute (BPFCoreSharedInfo::TypeIdAttr)) {
1550- Imm = PatchImms[GVar].first ;
1551- Reloc = PatchImms[GVar].second ;
1552- } else {
1545+ if (!GVar->hasAttribute (BPFCoreSharedInfo::AmaAttr) &&
1546+ !GVar->hasAttribute (BPFCoreSharedInfo::TypeIdAttr))
15531547 return false ;
1554- }
15551548
1549+ // Emit "mov ri, <imm>"
1550+ auto [Imm, Reloc] = PatchImms[GVar];
15561551 if (Reloc == BTF::ENUM_VALUE_EXISTENCE || Reloc == BTF::ENUM_VALUE ||
15571552 Reloc == BTF::BTF_TYPE_ID_LOCAL || Reloc == BTF::BTF_TYPE_ID_REMOTE)
15581553 OutMI.setOpcode (BPF::LD_imm64);
You can’t perform that action at this time.
0 commit comments