[LLVMdev] MCJIT problem on native 'ppc64' target

Ulrich Weigand Ulrich.Weigand at de.ibm.com
Mon Mar 10 11:35:47 PDT 2014


Frank Winter <fwinter at jlab.org> wrote:

> The issue seems to have to do with the number of calls to external
> functions or whether a particular external function is called repeatedly.
> I am saying this because when replacing all external calls with trivial
> additions (fadd double ..), then the offending function works fine too.

Just from this symptom, this reminds me a problem I've been seeing
a while back: when the MCJIT dynamic loader resolves a function call
to an external function, it needs to patch in code to restore the
TOC pointer after the external call returns.  Current code does that,
but only for the first call to a particular external function; for
subsequent calls, it is omitted.

Can you check whether this patch fixes the problem you're seeing?
(See attached file: diff-llvm-ppc64-restoretoc)

Bye,
Ulrich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff-llvm-ppc64-restoretoc
Type: application/octet-stream
Size: 977 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140310/59959e05/attachment.obj>


More information about the llvm-dev mailing list