Skip to content

Commit 47a6fd2

Browse files
committed
Truncate 32-bit target address when printing it
1 parent 99ed5e5 commit 47a6fd2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Target/Sparc/MCTargetDesc/SparcInstPrinter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ void SparcInstPrinter::printCTILabel(const MCInst *MI, uint64_t Address,
275275
int64_t Offset = Op.getImm();
276276
if (PrintBranchImmAsAddress) {
277277
uint64_t Target = Address + Offset;
278+
if (STI.getTargetTriple().isSPARC32())
279+
Target &= 0xffffffff;
278280
O << formatHex(Target);
279281
} else {
280282
O << ".";

0 commit comments

Comments
 (0)