lightning
[Top][All Lists]
Advanced

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

Re: [Lightning] How to use jit_ldxr_l


From: Mathieu Suen
Subject: Re: [Lightning] How to use jit_ldxr_l
Date: Wed, 21 Jul 2010 20:46:16 +0200

On Jul 21, 2010, at 6:07 PM, Paolo Bonzini wrote:

> On 07/21/2010 04:47 PM, Mathieu Suen wrote:
>> Hi,
>> 
>> I have some question concerning the ldxr/ldxi/ldr/ldi instruction.
>> Am I right to say that in Intel it is similar to the lea instruction?
> 
> No, ld/st are a move from/to memory.
> 
>> If yes  I am wondering what is the meaning of
>> 
>> jit_ldxr_p(JIT_R0, JIT_R1, ...);
>> 
>> compare to
>> 
>> jit_ldxr_i(JIT_R0, JIT_R1, 3);
> 
> This is wrong.  The second source operand must be a register, as in all 
> jit_XXXr_YY instruction.
> 
>> I mgiht not using the jit_ldxr_i / jit_ldxr_p correctly.
> 
> jit_ldxr_p and jit_ldxr_l (jit_ldxr_i) are exactly the same, but jit_ldxr_i 
> sign-extends the 32-bit value to 64 bits on 64-bit architectures.  
> jit_ldxr_ui zero-extends.

Ok so 
jit_ldxr_i(JIT_R0, JIT_R1, JIT_R2)

is equivalent to the at&t assembly:

mov %r2(%r1), %r0

mov %r1(%r2), %r0

(Depending on the answer of the other question :) )

Thanks

> 
> Paolo






___________________________________________________________________________
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son 
interface révolutionnaire.
http://fr.mail.yahoo.com



reply via email to

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