[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lightning] sse instructions and gcc warnings
From: |
Paulo César Pereira de Andrade |
Subject: |
Re: [Lightning] sse instructions and gcc warnings |
Date: |
Mon, 26 Jul 2010 17:35:46 -0300 |
User-agent: |
SquirrelMail/1.4.19 |
Paolo Bonzini wrote:
Hi,
I just updated the lightning code I wrote during the weekend to
work on x86_64.
>> 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.
>>>> 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.
>>> Argument passing in i387 was buggy, it is kind of impossible to get it
>>> right due to the stack-like registers. :(
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...
About the x86_64 warnings, I simply cannot get rid of this pattern:
elightning.c:1125: warning: cast from pointer to integer of different size
that is generated for every jit_patch and jit_patch_at, but is not
generated for jit_patch_movi. Probably not a big problem, unless it
has problem with jit_set_ip(<above-2-or-4-GB>), should be just some
noise in build output.
Thanks,
Paulo
- [Lightning] sse instructions and gcc warnings, Paulo César Pereira de Andrade, 2010/07/26
- Re: [Lightning] sse instructions and gcc warnings, Paolo Bonzini, 2010/07/26
- Re: [Lightning] sse instructions and gcc warnings, Paulo César Pereira de Andrade, 2010/07/26
- Re: [Lightning] sse instructions and gcc warnings, Paolo Bonzini, 2010/07/26
- Re: [Lightning] sse instructions and gcc warnings,
Paulo César Pereira de Andrade <=
- Re: [Lightning] sse instructions and gcc warnings, Paolo Bonzini, 2010/07/26
- Re: [Lightning] sse instructions and gcc warnings, Paulo César Pereira de Andrade, 2010/07/27
- Re: [Lightning] sse instructions and gcc warnings, Paolo Bonzini, 2010/07/28
- Re: [Lightning] sse instructions and gcc warnings, Paulo César Pereira de Andrade, 2010/07/28
- Re: [Lightning] sse instructions and gcc warnings, Paulo César Pereira de Andrade, 2010/07/28
- Re: [Lightning] sse instructions and gcc warnings, Paulo César Pereira de Andrade, 2010/07/30
- Re: [Lightning] sse instructions and gcc warnings, Paolo Bonzini, 2010/07/30
- Re: [Lightning] sse instructions and gcc warnings, Paulo César Pereira de Andrade, 2010/07/30
- [Lightning] Re: Update on testcase [was: sse instructions and gcc warnings], Paulo César Pereira de Andrade, 2010/07/31