[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lightning] Re: Updates for x86_64

From: Paolo Bonzini
Subject: [Lightning] Re: Updates for x86_64
Date: Tue, 24 Aug 2010 12:38:25 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.0.5

On 08/24/2010 01:12 AM, Paulo César Pereira de Andrade wrote:
  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.

  /* Used to implement ldc, stc, ... */
  #define JIT_CAN_16 0
-#define JIT_REXTMP             _R9D
+#define JIT_REXTMP             _R11D

  #define JIT_R_NUM             3
  #define JIT_R(i)                ((i) == 0 ? _EAX : _R9D + (i))

Doesn't this mean JIT_R2 overlaps JIT_REXTMP? Please redo the patch using %r12, and at the same time moving V1/V2 to r13/r14.

  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.

I'd rather skip this one, 3 callee-save register are often enough. %r14 is going to be used anyway for V2 after you redo patch 2.

  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 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.

Both look fine.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]