[pypy-dev] PPC64 JIT progress

Sven Hager Sven.Hager at uni-duesseldorf.de
Tue Aug 16 13:57:40 CEST 2011


On 08/15/2011 07:12 PM, David Edelsohn wrote:
> 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
Hello David,

I added your latest patch to the codebase.

I talked with Armin about the problem with the failing tests, and we
agreed that for now it's the best approach to implemented stuff for
a 32 bit machine until there is a possibility to test on a 64 bit machine.

The problem is that until I can't test the implemented 64 bit 
functionality I heavily doubt
that I am able to write code that does what it should. ;)

Best regards,
Sven


More information about the pypy-dev mailing list