[mips] Modify long branch for NaCl:
- Move the instruction that changes sp outside of the branch delay slot.
- Bundle-align the target of indirect branch.
Paths
| Differential D3928
Modify MIPS long branch for NaCl ClosedPublic Authored by sstankovic on May 27 2014, 1:54 PM.
Details
Summary [mips] Modify long branch for NaCl:
Diff Detail Event Timelinesstankovic updated this object. Comment Actions LGTM BTW, if you're hitting this when targeting NaCl at the moment, you should probably turn off PIC code generation, since you don't need PIC for NaCl nexes.
Comment Actions
Should this be done in LLVM, or in pnacl/driver scripts?
Comment Actions MIPS traditionally used PIC relocation model, to be able to use shared libraries. PLT support (which enables non-PIC code to use shared libraries) was added to MIPS only recently, in 2008. I suppose at that time GCC switched to using non-PIC as default. I don't know why LLVM still uses PIC. Regards, This revision is now accepted and ready to land.Jun 5 2014, 8:12 AM
Revision Contents
Diff 9846 lib/Target/Mips/MipsLongBranch.cpp
test/CodeGen/Mips/longbranch.ll
|
Could the code grow by more than a factor of 2? Some explanation of the max expansion factor here would be good.
e.g. "lw $sp, ($reg)" requires 2 sandboxing instructions to be added (before and after).