[PATCH] Modify MIPS long branch for NaCl

Mark Seaborn mseaborn at chromium.org
Wed May 28 12:05:22 PDT 2014


On 28 May 2014 11:29, Sasa Stankovic <Sasa.Stankovic at imgtec.com> wrote:

> > 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.
>
> Should this be done in LLVM, or in pnacl/driver scripts?


That depends.  Why does LLVM default to using -relocation-model=pic on
MIPS?  This differs from GCC, and it differs from other architectures.

The default appears to be set by this code
in lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp:
  if (RM == Reloc::Default)
    RM = Reloc::PIC_;
but there's no explanation of the reason there.

I would recommend taking that out and changing the default to be non-PIC,
for efficiency, and for consistency with other architectures and with GCC.
 But maybe there is a reason for it?

Cheers,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140528/8d13c8a9/attachment.html>


More information about the llvm-commits mailing list