Re: [PATCH] Fix the GNU Stack markings on libgcc.a

2018-05-02 Thread Daniel Santos
On 05/02/2018 06:17 PM, Magnus Granberg wrote: > torsdag 3 maj 2018 kl. 01:07:51 CEST skrev Daniel Santos: >> Hello >> >> On 05/01/2018 06:32 AM, Magnus Granberg wrote: >>> New patch >>> libgcc/ChangeLog: >>> >>> 2018-05-01 Magnus Granber

Re: [PATCH] Fix the GNU Stack markings on libgcc.a

2018-05-02 Thread Daniel Santos
Hello On 05/01/2018 06:32 AM, Magnus Granberg wrote: > New patch > libgcc/ChangeLog: > > 2018-05-01 Magnus Granberg > > * config/i386/resms64.h: Add .note.GNU-stack section > * config/i386/resms64f.h: Likewise. > * config/i386/resms64fx.h: Likewise. >

Re: [PATCH] Correct debug for -mcall-ms2sysv-xlogues stubs (PR target/83917, take 2)

2018-02-26 Thread Daniel Santos
On 02/26/2018 02:20 AM, Jakub Jelinek wrote: > On Sun, Feb 25, 2018 at 05:56:28PM -0600, Daniel Santos wrote: >>> --- libgcc/config/i386/i386-asm.h.jj2018-01-03 10:42:56.317763517 >>> +0100 >>> +++ libgcc/config/i386/i386-asm.h 2018-02-22 15:33:43.81292

Re: [PATCH] Correct debug for -mcall-ms2sysv-xlogues stubs (PR target/83917, take 2)

2018-02-25 Thread Daniel Santos
have one correction though. On 02/22/2018 08:56 AM, Jakub Jelinek wrote: > Hi! > > On Sat, Jan 20, 2018 at 06:01:16PM -0600, Daniel Santos wrote: >> Thanks.  I like the idea of commonizing the macros for consistency. > Didn't see a progress on this P3 for a while, so I've writ

Re: [PATCH, x86, libgcc] PR target/83917 Correct debug for -mcall-ms2sysv-xlogues stubs

2018-01-20 Thread Daniel Santos
On 01/19/2018 05:35 PM, Jakub Jelinek wrote: > On Fri, Jan 19, 2018 at 05:33:10PM -0600, Daniel Santos wrote: >> When stepping through tail-call restore stubs the debugger has to assume >> that rsp - 8 is the CFA, although it is not. This is because I did not >> explicitly ad

[PATCH, x86, libgcc] PR target/83917 Correct debug for -mcall-ms2sysv-xlogues stubs

2018-01-19 Thread Daniel Santos
feedback. I've reg-tested on x86_64, but I still need to test on Solaris and Darwin. OK to commit after those tests? Thanks, Daniel Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- libgcc/config/i386/resms64fx.h | 19 +++ libgcc/config/i386/resms64x.h

Re: [PATCH] Fix ms-sysv.exp testsuite FAILs (PR c/83117)

2017-11-28 Thread Daniel Santos
On 11/28/2017 05:22 AM, Jakub Jelinek wrote: > On Mon, Nov 27, 2017 at 05:02:32PM -0600, Daniel Santos wrote: >>> --- gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/gen.cc.jj 2017-05-22 >>> 10:49:45.0 +0200 >>> +++ gcc/testsuite/gcc.target/x86_64/abi/

Re: [PATCH] Fix ms-sysv.exp testsuite FAILs (PR c/83117)

2017-11-27 Thread Daniel Santos
On 11/27/2017 04:34 PM, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, my C FE rvalue folding patch allows folding > const variable initializers into the uses of those variables in rvalue > contexts more than before, and so we get warnings about UB in the test, > because an unprototyped

Re: [PATCH 2/2] [i386] PR82002 Part 2: Correct non-immediate offset/invalid INSN

2017-11-03 Thread Daniel Santos
On 11/03/2017 04:22 PM, Daniel Santos wrote: > ... > How does this patch look?  (Also, I've updated comments for > choose_baseaddr.)  Currently re-running tests. > > Thanks, > Daniel > > @@ -13110,10 +13125,26 @@ ix86_expand_prologue (void) >target. */ >

Re: [PATCH 2/2] [i386] PR82002 Part 2: Correct non-immediate offset/invalid INSN

2017-11-03 Thread Daniel Santos
On 11/03/2017 02:09 AM, Uros Bizjak wrote: > On Thu, Nov 2, 2017 at 11:43 PM, Daniel Santos <daniel.san...@pobox.com> > wrote: > >>>>int_registers_saved = (frame.nregs == 0); >>>>sse_registers_saved = (frame.nsseregs == 0); >>&

Re: [PATCH 2/2] [i386] PR82002 Part 2: Correct non-immediate offset/invalid INSN

2017-11-02 Thread Daniel Santos
On 10/31/2017 04:31 AM, Uros Bizjak wrote: > On Tue, Oct 31, 2017 at 3:09 AM, Daniel Santos <daniel.san...@pobox.com> > wrote: >> When we are realigning the stack pointer, making an ms_abi to sysv_abi >> call and alllocating 2GiB or more on the stack we end up with an inva

Re: [PATCH 2/2] [i386] PR82002 Part 2: Correct non-immediate offset/invalid INSN

2017-10-30 Thread Daniel Santos
On 10/30/2017 09:09 PM, Daniel Santos wrote: > 3. Modify choose_baseaddr to take an optional scratch_regno argument >and never return rtx that cannot be used as an immediate. I should amend this, it actually does a gcc_assert, so that won't happen if --enable-checking=no, but it would

[PATCH 2/2] [i386] PR82002 Part 2: Correct non-immediate offset/invalid INSN

2017-10-30 Thread Daniel Santos
2-2b.c: Likewise. Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/config/i386/i386.c | 76 -- gcc/testsuite/gcc.target/i386/pr82002-2a.c | 2 - gcc/testsuite/gcc.target/i386/pr82002-2b.c | 2 - 3 files changed, 62 inser

[PATCH 1/2] [i386] PR82002 Part 1: Correct ICE caused by wrong calculation.

2017-10-30 Thread Daniel Santos
. gcc.target/i386/pr82002-2a.c: New xfail test. gcc.target/i386/pr82002-2b.c: New xfail test. Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/config/i386/i386.c | 2 +- gcc/testsuite/gcc.target/i386/pr82002-1.c | 12 gcc/testsuite/gcc.

[PATCH 0/2] [i386] PR82002 Correct ICE with large stack frame

2017-10-30 Thread Daniel Santos
I originally intended to submit the first part of this patch set a few weeks ago as it was simpler, but here is the full fix.  The first part is a really simple follow-up fix to an off-by-one error H.J. originally fixed with r252099, but in the process of testing I discovered a more complex

[PATCH] [testsuite/i386] PR 82268 Correct FAIL when configured --with-cpu

2017-10-27 Thread Daniel Santos
When I originally wrote this test I wasn't wasn't aware of the --with-cpu configure option, so this change explicitly disables avx to make sure we choose the sse implementation, even when --with-cpu specifies an arch that has avx support. OK for head? gcc/testsuite/ChangeLog:

[PATCH try 3] [i386,testsuite,libgcc] Fix build breakage on Mac and test FAILS on Solaris caused by PR82196 patch

2017-09-23 Thread Daniel Santos
OK, hopefully I've gotten everything cleaned up.  I should note that because I'm now including both auto-target.h from libgcc (for HAVE_AS_AVX) and auto-host.h from gcc (HAVE_GAS_HIDDEN) that there are several warnings for redefined macros, but I plan on fixing that once this is resolved.  Thanks

Re: [PATCH try 2] [i386,testsuite,libgcc] Fix build breakage on Mac and test FAILS on Solaris caused by PR82196 patch

2017-09-23 Thread Daniel Santos
On 09/22/2017 06:50 AM, Uros Bizjak wrote: > On Fri, Sep 22, 2017 at 1:27 PM, Uros Bizjak <ubiz...@gmail.com> wrote: >> On Fri, Sep 22, 2017 at 12:28 PM, Daniel Santos <daniel.san...@pobox.com> >> wrote: >>> On 09/22/2017 03:28 AM, Rainer Orth wrote: >>&g

Re: [PATCH try 2] [i386,testsuite,libgcc] Fix build breakage on Mac and test FAILS on Solaris caused by PR82196 patch

2017-09-23 Thread Daniel Santos
On 09/22/2017 05:33 AM, Jakub Jelinek wrote: > On Fri, Sep 22, 2017 at 05:28:00AM -0500, Daniel Santos wrote: >> +/* If the assembler doesn't support AVX then directly emit machine code >> + for the instructions above directly. */ > Just a nit: too many "directly" wo

[PATCH try 2] [i386,testsuite,libgcc] Fix build breakage on Mac and test FAILS on Solaris caused by PR82196 patch

2017-09-22 Thread Daniel Santos
On 09/22/2017 03:28 AM, Rainer Orth wrote: > Hi Daniel, > >> On 09/22/2017 02:18 AM, Rainer Orth wrote: >>> Hi Daniel, >>> >>>> On 09/21/2017 05:18 PM, Daniel Santos wrote: >>>>> So libgcc doesn't use a config.in. :( >>>>

Re: [PATCH] [i386, libgcc] PR 82196 -mcall-ms2sysv-xlogues emits wrong AVX/SSE MOV

2017-09-22 Thread Daniel Santos
On 09/22/2017 02:18 AM, Rainer Orth wrote: > Hi Daniel, > >> On 09/21/2017 05:18 PM, Daniel Santos wrote: >>> So libgcc doesn't use a config.in. :( >> Scratch that, I forgot that we're using gcc/config.in via auto-host.h.  >> So I only have to add this to gcc/conf

[PATCH] [i386, testsuite, libgcc] Fix build breakage on Mac and test FAILS on Solaris.

2017-09-22 Thread Daniel Santos
. gcc.target/i386/pr82196-2.c: Likewise. libgcc: config/i386/i386-asm.h (SSE_SAVE, SSE_RESTORE): Sniff HAVE_AS_IX86_AVX and directly emit raw .byte code when assembler doesn't support avx, correct out-of-date comments. Thanks, Daniel Signed-off-by: Daniel Santos <daniel.

Re: [PATCH] [i386, libgcc] PR 82196 -mcall-ms2sysv-xlogues emits wrong AVX/SSE MOV

2017-09-21 Thread Daniel Santos
On 09/21/2017 05:18 PM, Daniel Santos wrote: > So libgcc doesn't use a config.in. :( Scratch that, I forgot that we're using gcc/config.in via auto-host.h.  So I only have to add this to gcc/configure.ac and it will be available for my libgcc header -- this is what I used to sniff out supp

Re: [PATCH] [i386, libgcc] PR 82196 -mcall-ms2sysv-xlogues emits wrong AVX/SSE MOV

2017-09-21 Thread Daniel Santos
On 09/21/2017 11:14 AM, Rainer Orth wrote: > Hi Daniel, > >> On 09/19/2017 01:58 AM, Jakub Jelinek wrote: >>> What can be done in libgcc is detect in configure whether the assembler >>> supports AVX, and if not, provide some alternative (e.g. because the insns >>> are always the same, you could

Re: [PATCH] [i386, libgcc] PR 82196 -mcall-ms2sysv-xlogues emits wrong AVX/SSE MOV

2017-09-20 Thread Daniel Santos
On 09/19/2017 01:58 AM, Jakub Jelinek wrote: > What can be done in libgcc is detect in configure whether the assembler > supports AVX, and if not, provide some alternative (e.g. because the insns > are always the same, you could just code them as .byte or something similar). > > Say like: > ---

Re: [PATCH] [i386, libgcc] PR 82196 -mcall-ms2sysv-xlogues emits wrong AVX/SSE MOV

2017-09-19 Thread Daniel Santos
On 09/19/2017 07:13 AM, Rainer Orth wrote: > Daniel Santos <daniel.san...@pobox.com> writes: > >> On 09/17/2017 10:53 AM, Uros Bizjak wrote: >>> OK. >>> >>> Thanks, >>> Uros. >> Thanks. I should have posted this Friday when my tests

Re: [PATCH] [i386, libgcc] PR 82196 -mcall-ms2sysv-xlogues emits wrong AVX/SSE MOV

2017-09-19 Thread Daniel Santos
On 09/19/2017 01:58 AM, Jakub Jelinek wrote: > On Mon, Sep 18, 2017 at 06:10:29PM -0500, Daniel Santos wrote: >> Mike, can you take a look at this please? >> >> On 09/18/2017 10:17 AM, Dominique d'Humières wrote: >>> This patch (r252896) breaks bootstrap on x8

Re: [PATCH] [i386, libgcc] PR 82196 -mcall-ms2sysv-xlogues emits wrong AVX/SSE MOV

2017-09-18 Thread Daniel Santos
Mike, can you take a look at this please? On 09/18/2017 10:17 AM, Dominique d'Humières wrote: > This patch (r252896) breaks bootstrap on x86_64-apple-darwin10 configured with > > ../work/configure --prefix=/opt/gcc/gcc8w > --enable-languages=c,c++,fortran,objc,obj-c++,ada,lto

Re: [PATCH] [i386, libgcc] PR 82196 -mcall-ms2sysv-xlogues emits wrong AVX/SSE MOV

2017-09-17 Thread Daniel Santos
On 09/17/2017 10:53 AM, Uros Bizjak wrote: > OK. > > Thanks, > Uros. Thanks. I should have posted this Friday when my tests finished, but I'll be committing with one minor change so tests don't run on m32 or mx32: --- a/gcc/testsuite/gcc.target/i386/pr82196-1.c +++

[PATCH] [i386, libgcc] PR 82196 -mcall-ms2sysv-xlogues emits wrong AVX/SSE MOV

2017-09-13 Thread Daniel Santos
-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/config/i386/i386.c | 15 ++- gcc/testsuite/gcc.target/i386/pr82196-1.c | 14 ++ gcc/testsuite/gcc.target/i386/pr82196-2.c | 14 ++ libgcc/config/i386/avx_resms64.S

Re: [PATCH] [i386] PR 81850 Don't ignore -mabi=sysv on Cygwin/MinGW

2017-08-23 Thread Daniel Santos
On 08/23/2017 01:12 AM, Uros Bizjak wrote: > On Wed, Aug 23, 2017 at 7:23 AM, Daniel Santos <daniel.san...@pobox.com> > wrote: >> On 08/22/2017 03:00 PM, Uros Bizjak wrote: >>> On Tue, Aug 22, 2017 at 9:47 PM, Daniel Santos <daniel.san...@pobox.com> >&g

Re: [PATCH 4/4] [i386, testsuite] Add tests, fix bug in check_avx2_hw_available

2017-08-23 Thread Daniel Santos
On 08/23/2017 08:26 AM, Uros Bizjak wrote: >> @@ -1822,6 +1845,7 @@ proc check_avx2_hw_available { } { >> expr 0 >> } else { >> check_runtime_nocache avx2_hw_available { >> + #include > Why is the above include needed? It is only needed to #define

Re: [PATCH] [i386] PR 81850 Don't ignore -mabi=sysv on Cygwin/MinGW

2017-08-22 Thread Daniel Santos
On 08/22/2017 03:00 PM, Uros Bizjak wrote: > On Tue, Aug 22, 2017 at 9:47 PM, Daniel Santos <daniel.san...@pobox.com> > wrote: >>> Please add UNKNOWN_ABI to the enum and initialize -mabi in i386.opt to >>> UNKNOWN_ABI. >> It would seem to me that UNSPECIF

[PATCH 4/4] [i386, testsuite] Add tests, fix bug in check_avx2_hw_available

2017-08-22 Thread Daniel Santos
). pr80969-4.c With va_args passed via va_list pr80969-4a.c With va_args passed via va_list and ms to sysv call. pr80969-4b.c With va_args passed via va_list and ms to sysv call using stubs. pr80969-4.h Common header for pr80969-4*.c. Signed-off-by: Daniel Santos <daniel.

[PATCH 3/4] [i386] Modify SP realignment in ix86_expand_prologue, et. al.

2017-08-22 Thread Daniel Santos
). Since the alignment required may be more than 16-bytes, we cannot defer SP allocation to ix86_emit_outlined_ms2sysv_save (when it's enabled), so that function needs to be updated as well. Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/config/i

[PATCH 2/4] [i386] Modify ix86_compute_frame_layout

2017-08-22 Thread Daniel Santos
will. This results in a properly aligned stack for the function body and avoids wasting stack space. Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/config/i386/i386.c | 116 + gcc/config/i386/i386.h | 2 +- 2 files changed, 80 insertions(

[PATCH 1/4] [i386] Correct comments, add assertions to sp_valid_at and fp_valid_at

2017-08-22 Thread Daniel Santos
behaviour of sp_valid_at and fp_valid_at prior to r250587 and this change now corrects the documentation and adds clarification of the CFA-relative calculation. Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/config/i386/i386.c | 45 ++---

[PATCH v4 0/4] [i386] PR80969 Fix ICE with -mabi=ms -mavx512f

2017-08-22 Thread Daniel Santos
of the whole patch set. OK for trunk? 2017-08-22 Daniel Santos <daniel.san...@pobox.com> * config/i386/i386.h (ix86_frame::stack_realign_allocate_offset): Remove field. (ix86_frame::stack_realign_allocate): New field. (struct machine_frame_state): Modify co

[PATCH] [i386] PR 81850 Don't ignore -mabi=sysv on Cygwin/MinGW

2017-08-22 Thread Daniel Santos
> Please add UNKNOWN_ABI to the enum and initialize -mabi in i386.opt to > UNKNOWN_ABI. It would seem to me that UNSPECIFIED_ABI would be a better value name. Also, I don't really understand what opts_set and opts are, except that I had guessed opts_set is what the user asked for (or didn't ask

Re: [PATCH] [docs] Explain how to use multiple file-name patterns in RUNTESTFLAGS

2017-08-22 Thread Daniel Santos
OK, the problem is at line 4014 of gcc/Makefile.in: $(MAKE) TESTSUITEDIR="$(TESTSUITEDIR)" RUNTESTFLAGS="$(RUNTESTFLAGS)" \ check-parallel-$* \ Even worse, one can inject arbitrary shell commands here, not that I can think of a scenario where it would be an actual security

Re: [PATCH] [docs] Explain how to use multiple file-name patterns in RUNTESTFLAGS

2017-08-22 Thread Daniel Santos
On 08/22/2017 12:32 PM, Mike Stump wrote: > On Aug 22, 2017, at 10:32 AM, Daniel Santos <daniel.san...@pobox.com> wrote: >>> I would suggest "escaped or quoted." >>> The whole argument to RUNTESTFLAGS can be quoted in either single >>> or double quote

Re: [PATCH] [docs] Explain how to use multiple file-name patterns in RUNTESTFLAGS

2017-08-22 Thread Daniel Santos
On 08/22/2017 12:32 PM, Mike Stump wrote: > On Aug 22, 2017, at 10:32 AM, Daniel Santos <daniel.san...@pobox.com> wrote: >>> I would suggest "escaped or quoted." >>> The whole argument to RUNTESTFLAGS can be quoted in either single >>> or double quote

[PATCH] [docs] Explain how to use multiple file-name patterns in RUNTESTFLAGS

2017-08-22 Thread Daniel Santos
OK, how's this one? * doc/install.texi: Modify to add more details on running selected tests. Thanks, Daniel Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/doc/install.texi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/gcc/doc/install.

Re: [PATCH] [docs] Explain how to use multiple file-name patterns in RUNTESTFLAGS

2017-08-22 Thread Daniel Santos
On 08/22/2017 10:58 AM, Martin Sebor wrote: > On 08/21/2017 07:41 PM, Daniel Santos wrote: >> It took me a while to figure out how to do this so I figured that it >> should be >> in the docs. OK for trunk? >> >> * doc/install.texi: Add more details on select

Re: [PATCH] [i386] PR 81850 Don't ignore -mabi=sysv on Cygwin/MinGW

2017-08-22 Thread Daniel Santos
On 08/22/2017 01:26 AM, Andreas Schwab wrote: > On Aug 21 2017, Daniel Santos <daniel.san...@pobox.com> wrote: > >> This is a problem that occured because of this code in >> ix86_option_override_internal: >> >> if (!opts_set->x_ix86_abi) >&

[PATCH] [i386] PR 81850 Don't ignore -mabi=sysv on Cygwin/MinGW

2017-08-21 Thread Daniel Santos
legal values are equivalent to zero. Thanks, Daniel Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/config/i386/i386-opts.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/i386/i386-opts.h b/gcc/config/i386/i386-opts.h index 542cd0f3d67.

[PATCH] [i386, testsuite] [PR 71958] Error on -mx32 with -mabi=ms

2017-08-21 Thread Daniel Santos
ormal" x86_64-pc-linux-gnu testing with --target_board=unix/\{,-m32\}, and * on Windows. OK for trunk? gcc/ChangeLog: 2017-08-11 Daniel Santos <daniel.san...@pobox.com> * config/i386/i386.c (ix86_option_override_internal): Error when -mx32 is combin

[PATCH] [docs] Explain how to use multiple file-name patterns in RUNTESTFLAGS

2017-08-21 Thread Daniel Santos
It took me a while to figure out how to do this so I figured that it should be in the docs. OK for trunk? * doc/install.texi: Add more details on selecting multiple tests. Thanks, Daniel Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/doc/install.texi | 10 +++

[PATCH] [i386,testsuite] [PR 71958] Error on -mx32 with -mabi=ms

2017-08-11 Thread Daniel Santos
and will run x32 tests when those are done. Presuming that I've corrected all existing tests that do not filter out x32 target and there are no additional failures, is this OK for head? Thanks, Daniel gcc/ChangeLog: 2017-08-11 Daniel Santos <daniel.san...@pobox.com> * config/i38

PING Re: [PATCH 0/6] [i386] PR80969 Fix ICE with -mabi=ms -mavx512f

2017-08-08 Thread Daniel Santos
Committed. 3. Committed. 4. https://gcc.gnu.org/ml/gcc-patches/2017-07/msg02009.html 5. v2 -- https://gcc.gnu.org/ml/gcc-patches/2017-08/msg00249.html 6. v2 -- https://gcc.gnu.org/ml/gcc-patches/2017-08/msg00618.html Thanks, Daniel 2017-08-08 Daniel Santos <daniel.san...@pobox.com> *

[PATCH 6/6 v2] [i386, testsuite] Add tests, fix bug in check_avx2_hw_available

2017-08-08 Thread Daniel Santos
to sysv call using stubs. Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/doc/sourcebuild.texi | 12 +++ gcc/testsuite/gcc.target/i386/pr80969-1.c | 16 gcc/testsuite/gcc.target/i386/pr80969-2.c | 26 ++ gcc/testsuite/gcc.targe

[PATCH 5/6 v2] [i386] Modify SP realignment in ix86_expand_prologue, et. al.

2017-08-02 Thread Daniel Santos
ed as well. Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/config/i386/i386.c | 58 -- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 0dc366cf16e..a1f39cd714

Re: [PATCH 0/6] [i386] PR80969 Fix ICE with -mabi=ms -mavx512f

2017-07-31 Thread Daniel Santos
Well I just learned how to test 32-bit earlier and I've uncovered a problem when running 32-bit tests. Do you want me to commit the the two patches (squashed together) in the mean time? Thanks, Daniel

[PATCH 6/6] [i386, testsuite] Add tests, fix bug in check_avx2_hw_available

2017-07-31 Thread Daniel Santos
With va_args passed via va_list pr80969-4a.c With va_args passed via va_list and ms to sysv call. pr80969-4b.c With va_args passed via va_list and ms to sysv call using stubs. Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/testsuite/gcc.target/i386/pr80969-1.c

[PATCH 5/6] [i386] Modify SP realignment in ix86_expand_prologue, et. al.

2017-07-31 Thread Daniel Santos
., you can pass cfa_offset 48 and it can return an alignment of 64 bytes). Since the alignment required may be more than 16-bytes, we cannot defer SP allocation to ix86_emit_outlined_ms2sysv_save (when it's enabled), so that function needs to be updated as well. Signed-off-by: Daniel Santos

[PATCH 4/6] [i386] Modify ix86_compute_frame_layout

2017-07-31 Thread Daniel Santos
will. This results in a properly aligned stack for the function body and avoids wasting stack space. Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/config/i386/i386.c | 116 + gcc/config/i386/i386.h | 2 +- 2 files changed, 80 insertions(

[PATCH 3/6] [i386] Remove machine_function::call_ms2sysv_pad_out

2017-07-31 Thread Daniel Santos
), the ROUND_UP calculation for the stack offset at the start of the function body (frame.frame_pointer_offset) will assure there is enough room for any padding needed to keep the save area for SSE va_args 16-byte aligned, so no modification is needed for that calculation. Signed-off-by: Daniel Santos

[PATCH 2/6] [i386] Remove ix86_frame::outlined_save_offset

2017-07-31 Thread Daniel Santos
This value was used in an earlier incarnation of the -mcall-ms2sysv-xlogues patch set but is now set and never read. The value of ix86_frame::sse_reg_save_offset serves the same purpose. Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/config/i386/i386.c | 1 - gcc/confi

[PATCH 1/6] [i386] Correct comments, add assertions to sp_valid_at and fp_valid_at

2017-07-31 Thread Daniel Santos
behaviour of sp_valid_at and fp_valid_at prior to r250587 and this change now corrects the documentation and adds clarification of the CFA-relative calculation. Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/config/i386/i386.c | 45 ++---

[PATCH 0/6] [i386] PR80969 Fix ICE with -mabi=ms -mavx512f

2017-07-31 Thread Daniel Santos
for pr80969-4*.c. As an aside note, I still have some rework of the ms-sysv.exp tests that I haven't yet to submitted and in which I'm adding more tests for cases with uncommon stacks, as in PR 81563. Thanks, Daniel 2017-07-23 Daniel Santos <daniel.san...@pobox.com> * config/i38

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<daniel.san...@pobox.com> 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

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

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

PING: [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin

2017-07-17 Thread Daniel Santos
? Thank you all! Daniel On 07/02/2017 12:11 AM, Daniel Santos wrote: This patchset addresses a number of testsuite issues for gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp, mostly occurring on Solaris and Darwin. Additionally, it solves a bug in libgcc that caused link failures on Darwin when

[PATCH 2/2] [libgcc]: PR80759 fixes for Solaris & Darwin

2017-07-01 Thread Daniel Santos
on Solaris and Darwin. * Replace .macro/.endm with cpp macros * Replace .global with .globl * Append __USER_LABEL_PREFIX__ when defined (via ASMNAME macro). * Only use .size when __ELF__ is defined. * Only use .hidden when both __ELF__ and HAVE_GAS_HIDDEN are defined. Signed-off-by: Daniel Santos

[PATCH 1/2] [testsuite] PR80759 fix tests on Solaris and Darwin

2017-07-01 Thread Daniel Santos
around 20k individual tests. This high number resulted in test jobs far exceeding the default 5 minute timeout for remote_/local_exec when gcc was built with --enable-checking=rtl. This has been resolved by splitting the tests out to a maximum of around 3500 tests per job. Signed-off-by: Dan

Re: [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin

2017-07-01 Thread Daniel Santos
+- 11 files changed, 274 insertions(+), 269 deletions(-) Many thanks to Rainer for all of his help on this! Thanks, Daniel 2017-06-28 Daniel Santos <daniel.san...@pobox.com> 2017-06-10 Daniel Santos <daniel.san...@pobox.com> PR testsuite/80759 * gcc.target/x

[PATCH try 2 resend] [i386] Remove warnings for ignoring -mcall-ms2sysv-xlogues.

2017-06-11 Thread Daniel Santos
calls __buildin_eh_return. Some of these cases can likely be supported, but they are just on the "not yet tested" list. 2017-06-11 Daniel Santos <daniel.san...@pobox.com * config/i386/i386.c (warn_once_call_ms2sysv_xlogues): Remove. (ix86_compute_frame_layout

Re: [PATCH] [i386] Recompute the frame layout less often

2017-05-23 Thread Daniel Santos
On 05/23/2017 09:31 AM, Bernd Edlinger wrote: Hi, this is the latest version of my patch. As already said, it attempts to compute the frame layout only when relevant data have changed. Apologies for doing more clean-up on Daniel's patch than absolutely necessary, but ... Bootstrap and

Re: [PATCH] [i386] Recompute the frame layout less often

2017-05-23 Thread Daniel Santos
On 05/22/2017 01:32 PM, Bernd Edlinger wrote: On 05/19/17 05:17, Daniel Santos wrote: No, I'm not at all comfortable with you making so many seemingly unnecessary changes to this code. (Although I wish I got this much feedback during my RFCs! :) I can accept the changes

Re: [PATCH 2/2] [testsuite] PR 80759 Remove gas extensions from do-test.S, fix other problems

2017-05-19 Thread Daniel Santos
., Solaris). I also wasn't including TEST_ALWAYS_FLAGS in my CFLAGS resulting in super-ugly log files. Finally, this patch eliminates spam of "test unsupported" (limiting it to one printing). Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- .../gcc.target/x86_64/abi/m

[PATCH 2/2] [testsuite] PR 80759 Remove gas extensions from do-test.S, fix other problems

2017-05-19 Thread Daniel Santos
Use of .struct in do_test.S causes breakages when gas isn't the assembler (e.g., Solaris). I also wasn't including TEST_ALWAYS_FLAGS in my CFLAGS resulting in super-ugly log files. Finally, this patch eliminates spam of "test unsupported" (limiting it to one printing). Signed-off-

[PATCH 1/2] [testsuite] Move non-standard parallelization support into new lib and fix flaw

2017-05-19 Thread Daniel Santos
under gcc/testsuite/lib. Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- .../gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp | 48 gcc/testsuite/lib/parallelize.exp | 88 ++ 2 files changed, 103 insertions(+), 33 deletions(-) creat

[PATCH 0/2] [testsuite] PR80759 Fix test breakages on i386-pc-solaris2.*

2017-05-19 Thread Daniel Santos
There are a few issues with my ms-sysv.exp tests: 1. Use of gas extensions in do_test.S cause breakages on Solaris, 2. Parallelization breaks when no make -j flag is passed, 3. Builds aren't adding TEST_ALWAYS_FLAGS, so log files filled with color escape codes, and 4. The "test unsupported"

Re: [PATCH] [i386] Recompute the frame layout less often

2017-05-18 Thread Daniel Santos
PS: Oh! it might be due to the difference between -j1 and no -j argument. Yes, that's how I missed it. This flaw isn't exposed with make -j1, but is exposed with just make. Thanks for finding this! Daniel

Re: [PATCH] [i386] Recompute the frame layout less often

2017-05-18 Thread Daniel Santos
On 05/18/2017 08:37 AM, Bernd Edlinger wrote: On 05/17/17 04:01, Daniel Santos wrote: - if (ignore_outlined && cfun->machine->call_ms2sysv - && in_hard_reg_set_p (stub_managed_regs, DImode, regno)) -return false; + if (ignore_outlined &&am

Re: [PATCH] [i386] Recompute the frame layout less often

2017-05-18 Thread Daniel Santos
On 05/17/2017 01:39 PM, Bernd Edlinger wrote: On 05/15/17 03:39, Daniel Santos wrote: I should add that if you want to run faster tests just on the ms to sysv abi code, you can use make RUNTESTFLAGS="ms-sysv.exp" check and then if that succeeds run the full testsuite. Daniel H

Re: [PATCH] [i386] Recompute the frame layout less often

2017-05-18 Thread Daniel Santos
On 05/17/2017 12:41 PM, Bernd Edlinger wrote: Apologies if I ruined your patch... As I said before, I'm the new guy here. :) So when this is done I'll rebase my changes. I have some test stuff to fix and some refactoring and refinements to xlogue_layout::compute_stub_managed_regs(). And

Re: [PATCH] [i386] Recompute the frame layout less often

2017-05-16 Thread Daniel Santos
On 05/16/2017 02:52 PM, Bernd Edlinger wrote: I think I solved the problem with -fsplit-stack, I am not sure if ix86_static_chain_on_stack might change after reload due to final.c possibly calling targetm.calls.static_chain, but if that is the case, that is an already pre-existing problem. The

Re: [PATCH] [i386] Recompute the frame layout less often

2017-05-16 Thread Daniel Santos
On 05/16/2017 12:19 PM, Ian Lance Taylor wrote: On Mon, May 15, 2017 at 10:00 PM, Daniel Santos <daniel.san...@pobox.com> wrote: Ian, would you mind looking at this please? A combination of my -mcall-ms2sysv-xlogues patch with Bernd's patch is causing problem

Re: [PATCH] [i386] Recompute the frame layout less often

2017-05-16 Thread Daniel Santos
On 05/16/2017 03:34 AM, Bernd Edlinger wrote: It would be good to have test cases for each of the not-supported warnings that can happen, so far I only managed to get a test case for -fsplit-stack. Yes, I'm inclined to agree. I'll try to get this done today or tomorrow. I've also put in a

Re: [PATCH] [i386] Recompute the frame layout less often

2017-05-15 Thread Daniel Santos
Ian, would you mind looking at this please? A combination of my -mcall-ms2sysv-xlogues patch with Bernd's patch is causing problems when ix86_expand_split_stack_prologue() calls ix86_expand_call(). On 05/15/2017 06:46 PM, Daniel Santos wrote: Rather or not m->call_ms2sysv is set determi

Re: [PATCH] [i386] Recompute the frame layout less often

2017-05-15 Thread Daniel Santos
On 05/15/2017 03:39 PM, Bernd Edlinger wrote: On 05/15/17 03:39, Daniel Santos wrote: On 05/14/2017 11:31 AM, Bernd Edlinger wrote: Hi Daniel, there is one thing I don't understand in your patch: That is, it introduces a static value: /* Registers who's save & restore will be man

Re: [PATCH] [i386] Recompute the frame layout less often

2017-05-14 Thread Daniel Santos
On 05/14/2017 11:31 AM, Bernd Edlinger wrote: Hi Daniel, there is one thing I don't understand in your patch: That is, it introduces a static value: /* Registers who's save & restore will be managed by stubs called from pro/epilogue. */ static HARD_REG_SET GTY(()) stub_managed_regs;

Re: [PATCH] [i386] Recompute the frame layout less often

2017-05-14 Thread Daniel Santos
On 05/14/2017 11:31 AM, Bernd Edlinger wrote: Hi Daniel, there is one thing I don't understand in your patch: That is, it introduces a static value: /* Registers who's save & restore will be managed by stubs called from pro/epilogue. */ static HARD_REG_SET GTY(()) stub_managed_regs;

Re: [PATCH] [i386] Recompute the frame layout less often

2017-05-14 Thread Daniel Santos
On 05/14/2017 02:42 AM, Bernd Edlinger wrote: Hi, this patch uses the new TARGET_COMPUTE_FRAME_LAYOUT hook in the i386 backend to avoid re-computing the frame layout when not really necessary. It simplifies the logic in ix86_compute_frame_layout by removing the

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 <daniel.san...@pobox.com> 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-p

[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

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

2017-05-08 Thread Daniel Santos
On 05/06/2017 03:22 PM, Daniel Santos wrote: gcc-5.4.0 CFLAGS="-march=native -O2 -g": 74 gcc-7.1.0 CFLAGS="-march=native -O2 -g": 74 gcc-7.1.0 CFLAGS="-march=nocona -mtune=generic -O2 -g": 79 gcc-7.1.0 CFLAGS="-march=native -O2 -g -mcall-ms2sysv-xlogues

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

2017-05-06 Thread Daniel Santos
On 05/05/2017 03:56 AM, Daniel Santos wrote: On 05/02/2017 05:40 AM, Kai Tietz wrote: Right, and Wine people will tell, if something doesn't work for them. So ok for me too. Kai Well, I haven't re-run these tests in a few months, but I got 272 failed wine tests with gcc 7.1 and 234 with my

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

2017-05-05 Thread Daniel Santos
On 05/02/2017 05:40 AM, Kai Tietz wrote: Right, and Wine people will tell, if something doesn't work for them. So ok for me too. Kai Well, I haven't re-run these tests in a few months, but I got 272 failed wine tests with gcc 7.1 and 234 with my patch set rebased onto 7.1. So it looks like

[PATCH 11/12 rev1] [i386] Add remainder of -mcall-ms2sysv-xlogues implementation

2017-05-04 Thread Daniel Santos
Now generates RTL with appropriate stack restore and leave patterns. Slightly cleaned up code that calculates the number of vector elements for clarity. Tests are good when rebased onto gcc-7_1_0-release as HEAD currently fails to bootstrap. Signed-off-by: Daniel Santos <daniel.san...@pobox.

[PATCH 09/12 rev1] [i386] Add patterns and predicates mcall-ms2sysv-xlogues

2017-05-04 Thread Daniel Santos
ambiguates them just fine without the const_int tag while correctly describing exactly what the pattern does. Thanks for your guidance. I understand RTL much better now. Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/config/i386/pr

Re: [PATCH 09/12] [i386] Add patterns and predicates foutline-msabi-xlouges

2017-05-03 Thread Daniel Santos
On 05/03/2017 01:10 AM, Uros Bizjak wrote: The order of subexpressions of parallel in general does not matter. Thanks, this makes things much clearer. Also, I'm wondering if there's anything wrong with calling ix86_gen_leave () and plucking the insns out of the generated parallel insn and

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

2017-05-02 Thread Daniel Santos
On 05/02/2017 05:40 AM, Kai Tietz wrote: Right, and Wine people will tell, if something doesn't work for them. So ok for me too. Kai Yes, and I although I haven't repeated the Wine tests in a few months, little has changed since my last run. I'll be running them again soon anyway. Daniel

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

2017-05-02 Thread Daniel Santos
On 05/02/2017 05:21 AM, JonY wrote: On 05/01/2017 11:31 AM, Uros Bizjak wrote: I also assume that Cygwin and MinGW people agree with the patch and the functionality itself. Uros. Cygwin and MinGW does not use SysV/MS transitions directly in their own code, changes should be OK. And to be

Re: [PATCH 09/12] [i386] Add patterns and predicates foutline-msabi-xlouges

2017-05-02 Thread Daniel Santos
Thank you for the review. On 05/01/2017 06:18 AM, Uros Bizjak wrote: On Thu, Apr 27, 2017 at 10:09 AM, Daniel Santos <daniel.san...@pobox.com> wrote: Adds the predicates save_multiple and restore_multiple to predicates.md, which are used by following patterns in sse.md: * save_multiple

Re: [PATCH 05/12 rev 1] [i386] Add option -mcall-ms2sysv-xlogues

2017-04-28 Thread Daniel Santos
Oops. I blame my fingers. :) Daniel --- gcc/config/i386/i386.c | 6 +- gcc/config/i386/i386.opt | 4 gcc/doc/invoke.texi | 13 - 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index

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

2017-04-27 Thread Daniel Santos
I probably should have mentioned that these are all for GCC8.

[PATCH 12/12] [i386,testsuite] Test program for ms to sysv abi function calls.

2017-04-27 Thread Daniel Santos
A comprehensive program for testing x86_64 ms_abi functions that call sysv_abi functions to help validate -mcall-ms2sysv-xlogues and use of aligned SSE MOVs after a (non-DRAP) realigned stack. Signed-off-by: Daniel Santos <daniel.san...@pobox.com> --- gcc/Makef

  1   2   >