[PATCH] [mips] Expand JAL instructions when PIC is enabled.
toma.tabacu at imgtec.com
Thu Jun 18 09:58:59 PDT 2015
In http://reviews.llvm.org/D6231#187264, @dsanders wrote:
> Looking back through the comments, I believe the remaining issues are:
> - Duplicated nops
I'm not sure if this is accurate. I've compared IAS and GAS with .set reorder/noreorder and
with/without manually added NOPs and I haven't seen any discrepancies.
> - The handling of .text
I have found a fix for this, but it's a bit ugly and it only touches common code.
If I include it here, it might slow down this patch even more.
> - Offsets are lost for label+offset
They used to be lost, but since I switched the code to use evaluateRelocExpr() offsets will cause a fatal error,
because it tries to inappropriately apply relocations to constants.
I'd rather have this than silently generating the wrong code.
However, evaluateRelocExpr() needs to be fixed.
Some other remaining problems are:
- no support for the LargeGOT case
- no support for forward-declared locals
Also, this patch will cause a recently added RuntimeDyld test to fail (ExecutionEngine/RuntimeDyld/Mips/ELF_Mips64r2N64_PIC_relocations.s).
I don't know how to fix this test.
More information about the llvm-commits