Re: [PING] [PATCH v4 0/12] [i386] Improve 64-bit Microsoft to System V ABI pro/epilogues

2017-07-31 Thread Daniel Santos

On 07/28/2017 09:41 AM, H.J. Lu wrote:

On Fri, Jul 28, 2017 at 6:57 AM, Daniel Santos  wrote:

On 07/26/2017 02:03 PM, H.J. Lu wrote:

This patch caused:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81563

Hello.  I've rebased my patch set and I'm now retesting.  I'm afraid that
your changes are wrong because my my sp_valid_at and fp_valid_at functions
are wrong -- these are supposed to be for the base offset and not the CFA
offset, sorry about that.  This means that the check in choose_basereg (and
thus choose_baseaddr) have been wrong as well.  I'm retesting now.

Please check your change with gcc.target/i386/pr81563.c.

Thanks.


I'm still getting used to x86 stack math and and briefly I thought that 
my understanding of the CFA was wrong and that I had messed up 
sp_valid_at and fp_valid_at, but I was mistaken, so sorry for the false 
alarm.  My rebased patches pass all tests, so it's OK.


Re: [PING] [PATCH v4 0/12] [i386] Improve 64-bit Microsoft to System V ABI pro/epilogues

2017-07-28 Thread H.J. Lu
On Fri, Jul 28, 2017 at 6:57 AM, Daniel Santos  wrote:
> On 07/26/2017 02:03 PM, H.J. Lu wrote:
>>
>> This patch caused:
>>
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81563
>
>
> Hello.  I've rebased my patch set and I'm now retesting.  I'm afraid that
> your changes are wrong because my my sp_valid_at and fp_valid_at functions
> are wrong -- these are supposed to be for the base offset and not the CFA
> offset, sorry about that.  This means that the check in choose_basereg (and
> thus choose_baseaddr) have been wrong as well.  I'm retesting now.

Please check your change with gcc.target/i386/pr81563.c.

Thanks.

-- 
H.J.


Re: [PING] [PATCH v4 0/12] [i386] Improve 64-bit Microsoft to System V ABI pro/epilogues

2017-07-28 Thread Daniel Santos

On 07/26/2017 02:03 PM, H.J. Lu wrote:

This patch caused:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81563


Hello.  I've rebased my patch set and I'm now retesting.  I'm afraid 
that your changes are wrong because my my sp_valid_at and fp_valid_at 
functions are wrong -- these are supposed to be for the base offset and 
not the CFA offset, sorry about that.  This means that the check in 
choose_basereg (and thus choose_baseaddr) have been wrong as well.  I'm 
retesting now.


Re: [PING] [PATCH v4 0/12] [i386] Improve 64-bit Microsoft to System V ABI pro/epilogues

2017-07-26 Thread Daniel Santos

On 07/26/2017 02:03 PM, H.J. Lu wrote:

This patch caused:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81563


Yes, I discovered this flaw while working on PR 80969 but I hadn't found 
an actual testcase where it caused a problem yet.  I'm about to submit 
my patchset for review, so sorry I didn't get it committed sooner.  My 
patch set further improves sp_valid_at and fp_valid_at since it's 
possible that the the last offset the frame pointer can be used to 
access is not equal to realignment offset.  I'll try to get this out 
tonight or tomorrow.


Thanks!
Daniel


Re: [PING] [PATCH v4 0/12] [i386] Improve 64-bit Microsoft to System V ABI pro/epilogues

2017-07-26 Thread H.J. Lu
On Sun, May 14, 2017 at 3:23 AM, Uros Bizjak  wrote:
> On Sun, May 14, 2017 at 12:34 AM, Daniel Santos  
> wrote:
>> On 05/13/2017 11:52 AM, Uros Bizjak wrote:
>>>
>>> On Sat, May 13, 2017 at 1:01 AM, Daniel Santos 
>>> wrote:

 Ping?  I have posted revisions of the following in patch set:

 05/12 - https://gcc.gnu.org/ml/gcc-patches/2017-04/msg01442.html
 09/12 - https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00348.html
 11/12 - https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00350.html

 I have retested them on Linux x86-64 in addition a Wine testsuite
 comparison
 resulting in fewer failed tests (31) than when using unpatched 7.1.0 (78)
 and 5.4.0 (78).  A cursory examination of the now working failures with
 7.1.0 seemed to be to be due to race conditions in Wine that are
 incidentally hidden after the patches.

 Is there anything else needed before we can commit these?  They still
 rebase
 cleanly onto the HEAD, but I can repost as "v5" if you prefer.
>>>
>>> Please go ahead and commit the patches.
>>>
>>> However, please stay around to fix possible fallout. As said - you are
>>> touching quite complex part of the compiler ...
>>>
>>> Thanks,
>>> Uros.
>>
>>
>> Thanks!  I'll definitely be around, I have a lot more that I'm working on
>> with C generics/pseudo-templates (all middle-end stuff). I also want to
>> examine more ways that SSE saves/restores can be omitted in these ms to sysv
>> calls through static analysis and such.
>>
>> Anyway, I don't yet have SVN write access, will you sponsor my request?
>
> The patchset was committed to mainline SVN as r248029.
>
> Uros.

This patch caused:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81563


-- 
H.J.


Re: [PING] [PATCH v4 0/12] [i386] Improve 64-bit Microsoft to System V ABI pro/epilogues

2017-05-14 Thread Uros Bizjak
On Sun, May 14, 2017 at 12:34 AM, Daniel Santos  wrote:
> On 05/13/2017 11:52 AM, Uros Bizjak wrote:
>>
>> On Sat, May 13, 2017 at 1:01 AM, Daniel Santos 
>> wrote:
>>>
>>> Ping?  I have posted revisions of the following in patch set:
>>>
>>> 05/12 - https://gcc.gnu.org/ml/gcc-patches/2017-04/msg01442.html
>>> 09/12 - https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00348.html
>>> 11/12 - https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00350.html
>>>
>>> I have retested them on Linux x86-64 in addition a Wine testsuite
>>> comparison
>>> resulting in fewer failed tests (31) than when using unpatched 7.1.0 (78)
>>> and 5.4.0 (78).  A cursory examination of the now working failures with
>>> 7.1.0 seemed to be to be due to race conditions in Wine that are
>>> incidentally hidden after the patches.
>>>
>>> Is there anything else needed before we can commit these?  They still
>>> rebase
>>> cleanly onto the HEAD, but I can repost as "v5" if you prefer.
>>
>> Please go ahead and commit the patches.
>>
>> However, please stay around to fix possible fallout. As said - you are
>> touching quite complex part of the compiler ...
>>
>> Thanks,
>> Uros.
>
>
> Thanks!  I'll definitely be around, I have a lot more that I'm working on
> with C generics/pseudo-templates (all middle-end stuff). I also want to
> examine more ways that SSE saves/restores can be omitted in these ms to sysv
> calls through static analysis and such.
>
> Anyway, I don't yet have SVN write access, will you sponsor my request?

The patchset was committed to mainline SVN as r248029.

Uros.


Re: [PING] [PATCH v4 0/12] [i386] Improve 64-bit Microsoft to System V ABI pro/epilogues

2017-05-13 Thread Daniel Santos

On 05/13/2017 11:52 AM, Uros Bizjak wrote:

On Sat, May 13, 2017 at 1:01 AM, Daniel Santos  wrote:

Ping?  I have posted revisions of the following in patch set:

05/12 - https://gcc.gnu.org/ml/gcc-patches/2017-04/msg01442.html
09/12 - https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00348.html
11/12 - https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00350.html

I have retested them on Linux x86-64 in addition a Wine testsuite comparison
resulting in fewer failed tests (31) than when using unpatched 7.1.0 (78)
and 5.4.0 (78).  A cursory examination of the now working failures with
7.1.0 seemed to be to be due to race conditions in Wine that are
incidentally hidden after the patches.

Is there anything else needed before we can commit these?  They still rebase
cleanly onto the HEAD, but I can repost as "v5" if you prefer.

Please go ahead and commit the patches.

However, please stay around to fix possible fallout. As said - you are
touching quite complex part of the compiler ...

Thanks,
Uros.


Thanks!  I'll definitely be around, I have a lot more that I'm working 
on with C generics/pseudo-templates (all middle-end stuff). I also want 
to examine more ways that SSE saves/restores can be omitted in these ms 
to sysv calls through static analysis and such.


Anyway, I don't yet have SVN write access, will you sponsor my request?

Thanks,
Daniel



Re: [PING] [PATCH v4 0/12] [i386] Improve 64-bit Microsoft to System V ABI pro/epilogues

2017-05-13 Thread Uros Bizjak
On Sat, May 13, 2017 at 1:01 AM, Daniel Santos  wrote:
> Ping?  I have posted revisions of the following in patch set:
>
> 05/12 - https://gcc.gnu.org/ml/gcc-patches/2017-04/msg01442.html
> 09/12 - https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00348.html
> 11/12 - https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00350.html
>
> I have retested them on Linux x86-64 in addition a Wine testsuite comparison
> resulting in fewer failed tests (31) than when using unpatched 7.1.0 (78)
> and 5.4.0 (78).  A cursory examination of the now working failures with
> 7.1.0 seemed to be to be due to race conditions in Wine that are
> incidentally hidden after the patches.
>
> Is there anything else needed before we can commit these?  They still rebase
> cleanly onto the HEAD, but I can repost as "v5" if you prefer.

Please go ahead and commit the patches.

However, please stay around to fix possible fallout. As said - you are
touching quite complex part of the compiler ...

Thanks,
Uros.


[PING] [PATCH v4 0/12] [i386] Improve 64-bit Microsoft to System V ABI pro/epilogues

2017-05-12 Thread Daniel Santos

Ping?  I have posted revisions of the following in patch set:

05/12 - https://gcc.gnu.org/ml/gcc-patches/2017-04/msg01442.html
09/12 - https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00348.html
11/12 - https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00350.html

I have retested them on Linux x86-64 in addition a Wine testsuite 
comparison resulting in fewer failed tests (31) than when using 
unpatched 7.1.0 (78) and 5.4.0 (78).  A cursory examination of the now 
working failures with 7.1.0 seemed to be to be due to race conditions in 
Wine that are incidentally hidden after the patches.


Is there anything else needed before we can commit these?  They still 
rebase cleanly onto the HEAD, but I can repost as "v5" if you prefer.


Thanks,
Daniel