|
From: | Paulo César Pereira de Andrade |
Subject: | [Lightning] Updates for x86_64 |
Date: | Mon, 23 Aug 2010 20:12:39 -0300 |
User-agent: | SquirrelMail/1.4.19 |
Hi Paolo, I am adding a small set of patches, to setup the path, and make it easier to review all steps, to get better x86_64 support, handling varargs and/or extra arguments on stack, following the System V ABI described in http://www.x86-64.org/documentation/abi.pdf Patch1 is a clear typo and should be trivial. Patch2 changes JIT_REXTMP to %r11, so that, when calling a function with 6 integer arguments, it will not clobber the 6th argument in the last moment, due to putting the function pointer on it. Patch3 defines symbolic names for extra SSE2 %xmmN registers, and sets JIT_FPTMP to the topmost one. Patch4 increases JIT_V_NUM to 5, and make %r14 and %r15 available, at the cost of needing to also save them. They are callee save registers in the abi. Patch5 adds safety check on number of integer or float arguments being passed to a function, and also increases the number of float register arguments to 8. Also, it defines JIT_RA_NUM and JIT_FA_NUM that matches the number of integer and float register arguments. Patch6 changes the default jit_extr_x_i to jit_extr_x_l for jit_getarg_x, where x is either c, uc, s, us, and also changes jit_getarg_{i,ui} to default to jit_movr_{l,ul}, so that it should automatically work on 64 bits when arguments are passed on registers, by properly sign extending, as arguments are already passed in 64 bits. Patch6 also changes the mapping of JIT_R(num) and JIT_V(num), as well as JIT_REXTMP to use the 64 bits defines, so that it will not trigger an JITFAIL on jit_getarg_l and jit_getarg_ul for example, due to _rC telling it is a 32 bits registers. This is only an issue when _ASM_SAFETY is defined. Patch6 is also the most intrusive one, so, I am sending more patches after this one. Thanks, Paulo
0001-Correct-typo-in-fallback-jit_getarg_ul-for-arguments.patch
Description: Text Data
0002-Change-JIT_REXTMP-to-r11-to-avoid-clobbering-6th-int.patch
Description: Text Data
0003-Define-extra-SSE2-xmmN-registers-and-set-JIT_FPTMP-t.patch
Description: Text Data
0004-Increase-JIT_V_NUM-to-5-and-add-save-restore-of-r14-.patch
Description: Text Data
0005-Add-safety-check-on-number-of-integer-and-float-argu.patch
Description: Text Data
0006-Change-jit_getarg_-c-uc-s-us-i-ui-to-extr_l-to-sign-.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |