[pypy-dev] PPC64 JIT progress

David Edelsohn dje.gcc at gmail.com
Mon Aug 15 19:12:11 CEST 2011


Attached is the next patch for the PPC JIT backend.

The patch adds shift-left simplified mnemonic (sldi) and a load
doubleword (load_dword) function that uses it.

I also discovered some typos in my previous patch to ppc_field.py.

Currently every PPC JIT testcase fails on PPC64 Linux because the PPC
backend makes an incorrect assumption about function pointers.  PPC64
Linux function pointer point to function descriptors, not code
addresses.  PPC64 Linux libffi knows this, which makes

    def get_function(self):
        i = self.code.materialize(AsmMemoryManager(), [])
        t = lltype.FuncType([], lltype.Signed)
        return rffi.cast(lltype.Ptr(t), i)

wrong for PPC64.

A function descriptor is a three-word data vector containing the
function address, data addressibility pointer and static chain.  For
some of the tests to start working on PPC64 Linux, the backend needs
to create another data object that contains the function address and
that pointer is coerced into a function pointer.

Thanks, David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ppcjit-diff4
Type: application/octet-stream
Size: 2243 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20110815/61d4c2fa/attachment-0001.obj>


More information about the pypy-dev mailing list