Skip to content

Commit 2fa2d5c

Browse files
committed
fix code style
1 parent 9b06f46 commit 2fa2d5c

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lld/ELF/Arch/LoongArch.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,17 +1183,16 @@ bool LoongArch::tryGotToPCRel(uint8_t *loc, const Relocation &rHi20,
11831183
if (!isInt<20>(pageOffset >> 12))
11841184
return false;
11851185

1186-
Relocation newRHi20 = {RE_LOONGARCH_PAGE_PC, R_LARCH_PCALA_HI20, rHi20.offset,
1187-
rHi20.addend, &sym};
1188-
Relocation newRLo12 = {R_ABS, R_LARCH_PCALA_LO12, rLo12.offset, rLo12.addend,
1189-
&sym};
1190-
11911186
const uint32_t currInsn = read32le(loc);
11921187
const uint32_t nextInsn = read32le(loc + 4);
11931188
// Check if use the same register.
11941189
if (getD5(currInsn) != getJ5(nextInsn) || getJ5(nextInsn) != getD5(nextInsn))
11951190
return false;
11961191

1192+
Relocation newRHi20 = {RE_LOONGARCH_PAGE_PC, R_LARCH_PCALA_HI20, rHi20.offset,
1193+
rHi20.addend, &sym};
1194+
Relocation newRLo12 = {R_ABS, R_LARCH_PCALA_LO12, rLo12.offset, rLo12.addend,
1195+
&sym};
11971196
uint64_t pageDelta =
11981197
getLoongArchPageDelta(symLocal, secAddr + rHi20.offset, rHi20.type);
11991198
// pcalau12i $a0, %pc_hi20

0 commit comments

Comments
 (0)