lightning
[Top][All Lists]
Advanced

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

Re: [Lightning] sse instructions and gcc warnings


From: Paolo Bonzini
Subject: Re: [Lightning] sse instructions and gcc warnings
Date: Tue, 27 Jul 2010 01:46:50 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Thunderbird/3.0.5

On 07/26/2010 10:35 PM, Paulo César Pereira de Andrade wrote:
    This started happening when I added calls to jit_str_c, jit_str_uc,
etc, and apparently doesn't happen if there are only calls to
jit_stxi_s, jit_stxi_us, etc, but I am not 100% sure now.

Yes, jit_str_c and jit_str_uc are indeed responsible.

   It does not happen in x86_64.

All x86_64 registers are 8-bit-accessible.

     Also about @subject, I needed to add a global function to check
if a double is zero, because apparently the i387 goes nonsense if
a function using vector instructions was called.

   Also does not happen in x86_64.

x86_64 uses SSE.

   Now the bad news :-)

   Load/store of float32 simply does not work, examples:
     jit_ldr_f(JIT_FPR0, JIT_R1);
     jit_stxi_d(..., JIT_V1, JIT_FPR0);
and
     jit_ldxi_d(JIT_FPR0, JIT_V1, ....);
     [...]
     jit_str_f(JIT_R1, JIT_FPR0);

   Another problem is that:
     jit_ldr_c or jit_ldr_s   (JIT_R0, JIT_R1)
     [...]
     jit_stxi_l(JIT_R0, JIT_V1, ...);
does not sign extend the top 32 bits, but jit_stxi_ul paired with
jit_ldr_uc or jit_ldr_us sign extends (zeros out top 32 bits). From
the test cases I currently use, it appears to sign extend int32, but
I just added all small ints to the same fallback for now...

Thanks, I'll look at it.

Paolo



reply via email to

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