Skip to content

Commit 8c53282

Browse files
[PowerPC][NFC] Merged two switch entries.
Two switch entries did exactly the same thing. This patch merges them.
1 parent 132f29c commit 8c53282

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

lld/ELF/Arch/PPC64.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,17 +1259,7 @@ void PPC64::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const {
12591259
case R_PPC64_DTPREL64:
12601260
write64(loc, val - dynamicThreadPointerOffset);
12611261
break;
1262-
case R_PPC64_PCREL34: {
1263-
const uint64_t si0Mask = 0x00000003ffff0000;
1264-
const uint64_t si1Mask = 0x000000000000ffff;
1265-
const uint64_t fullMask = 0x0003ffff0000ffff;
1266-
checkInt(loc, val, 34, rel);
1267-
1268-
uint64_t instr = readPrefixedInstruction(loc) & ~fullMask;
1269-
writePrefixedInstruction(loc, instr | ((val & si0Mask) << 16) |
1270-
(val & si1Mask));
1271-
break;
1272-
}
1262+
case R_PPC64_PCREL34:
12731263
case R_PPC64_GOT_PCREL34:
12741264
case R_PPC64_GOT_TPREL_PCREL34:
12751265
case R_PPC64_TPREL34: {

0 commit comments

Comments
 (0)