Monday, June 07, 2010

 

rx86 conversion complete, 64-bit work started

Last week saw the completion of the rx86 conversion: All tests pass, and the JIT works on i386 machines.

Last week I started on actually implementing 64-bit support. Mostly this will be an exercise in "magic removal": Locating those parts of the code that are only applicable to i386, and either adapting them to work with both i386 and x86_64 or else factoring those differences out into arch-specific classes.

One issue specific to x86_64 is the fact that most instructions cannot encode a 64-bit immediate value. I've worked around this by setting aside one register as a scratch register, and loading the immediate to that register first when a case like this arises. In the future I may try to optimize this to output a 32-bit relative displacement in the cases where that could work.


Comments:
Go, man, Go! I'm greatly looking forward to 64-bit PyPy.
 
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?