Hi Benjamin, hi all, On Tue, Mar 23, 2010 at 08:31:50PM -0500, Benjamin Peterson wrote:
We have somebody who has voiced interest in doing a 64 bit backend, but there's no reason you couldn't assist them or work on some other aspect of PyPy.
I should probably mention here what I only explained in private mails so far. The 32-bit backend is in pypy/jit/backend/x86/. However that directory uses ri386.py and ri386setup.py, which are old and very custom hacks based on multimethods in order to encode machine code instructions. I already started some work on replacing these two files. It's done in this branch: http://codespeak.net/svn/pypy/branch/remove-ri386-multimethod-2 There, we have a single file rx86.py that is simpler, and supports both 32-bit and 64-bit instruction generation. But the interface is very different, so that means the whole rest of the backend has to be adapted. That would be the main work of a SoC student. To get started, look at rx86.py and its test files test/test_rx86*.py and try to write small examples that uses a subclass of X86_32_CodeBuilder or X86_64_CodeBuilder in order to build and call a test function. The 64-bit version is more complicated, because the ABI on 64-bit is to use some number of registers in order to pass arguments; see details e.g. in http://www.x86-64.org/documentation/abi.pdf section "Function Calling Sequence". A bientot, Armin.