Unconditional branch uses relative addressing which is the right choice in case of position independent code.
This is a fix for the bug:
https://dmz-portal.mips.com/bugz/show_bug.cgi?id=2445
Paths
| Differential D27483
[mips] For PIC code convert unconditional jump to unconditional branch ClosedPublic Authored by atanasyan on Dec 6 2016, 1:51 PM.
Details Summary Unconditional branch uses relative addressing which is the right choice in case of position independent code. This is a fix for the bug:
Diff Detail
Event TimelineClosed by commit rL289448: [mips] For PIC code convert unconditional jump to unconditional branch (authored by atanasyan). · Explain WhyDec 12 2016, 9:50 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 80477 lib/Target/Mips/AsmParser/MipsAsmParser.cpp
test/MC/Mips/expansion-j-sym-pic.s
|
Nit: This comment should be before the "if ((Inst.getOpcode() == ..".