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: Wed, 28 Jul 2010 23:22:37 +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/28/2010 12:29 AM, Paulo César Pereira de Andrade wrote:
Paolo Bonzini wrote:

   Hi,

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.

   I tried to build a simple test case to prevent/detect other problems
as I may again delay a bit more work in the jit backend, to work on
other optimizations/features in the language (I don't want to specialize
it too much for now as there several things that may still change).

Very good!

   But I could not get a simple test to compile due to jit_replace...
it appears to only affect JIT_Vx, and in my current code it works
because I used JIT_Rx, I believe...

Fixed.

   The x86_64 output, with CHECK_FLOAT defined to 1 is:
-%<-
$ gcc -O0 -g3 lightning-test.c
$ ./a.out
check0:58: 0.000000

This is the movi_f issue, which I fixed in the git repo.

check1:37: 0x40571f 0x4007d7
check1:38: 0x40572c 0x1
check1:39: 0x405737 0x1
check1:40: 0x405744 0x1
check1:43: 0x405767 0x1

These are a bug in your program:

-    jit_stxi_d (offsetof(types_t, uc), V1, F0);
+    jit_stxi_d (offsetof(types_t, d),  V1, F0);

It now passes for both 32-bit and 64-bit.

Paolo



reply via email to

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