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) {
1542
1542
const GlobalValue *GVal = MO.getGlobal ();
1543
1543
auto *GVar = dyn_cast<GlobalVariable>(GVal);
1544
1544
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))
1553
1547
return false ;
1554
- }
1555
1548
1549
+ // Emit "mov ri, <imm>"
1550
+ auto [Imm, Reloc] = PatchImms[GVar];
1556
1551
if (Reloc == BTF::ENUM_VALUE_EXISTENCE || Reloc == BTF::ENUM_VALUE ||
1557
1552
Reloc == BTF::BTF_TYPE_ID_LOCAL || Reloc == BTF::BTF_TYPE_ID_REMOTE)
1558
1553
OutMI.setOpcode (BPF::LD_imm64);
You can’t perform that action at this time.
0 commit comments