[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 --- gcc/Makefile.in| 2

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.

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

2017-04-27 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 113f83742c2..52111

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 wrote: Adds the predicates save_multiple and restore_multiple to predicates.md, which are used by following patterns in sse.md: * save_multiple - insn that calls a save stub

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 c

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 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 mov

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

2017-05-04 Thread Daniel Santos
) disambiguates 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 --- gcc/config/i386/predicates.md | 81 +++ gcc/con

[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 --- gcc/config/i386

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 I'

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

2017-09-13 Thread Daniel Santos
ff-by: Daniel Santos --- 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| 2 ++ libgcc/config

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 +++ b/gcc/testsuite/gcc.target/i386

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 --with-gmp=/opt/mp-n

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

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 writes: > >> 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

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: > --- i38

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 jus

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 ou

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

2017-09-22 Thread Daniel Santos
reak on Solaris or with -mno-omit-frame-pointer. 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 comme

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 t

[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 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&quo

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 wrote: >> On Fri, Sep 22, 2017 at 12:28 PM, Daniel Santos >> wrote: >>> On 09/22/2017 03:28 AM, Rainer Orth wrote: >>>> Hi Daniel, >>>> >>>>&

[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 f

[RFC] [PATCH] [i386] Test program for ms_abi to sysv_abi function calls

2017-02-07 Thread Daniel Santos
e__ ("subq $8,%%rsp":::"cc"); ret = do_test_u2 (a, b); __asm__ __volatile__ ("addq $8,%%rsp":::"cc"); check_results (ret); ... } Daniel Santos >From 2e9fa543e1923c7acc705e06bba006fc5887d805 Mon Sep 17 00:00:00 2001 From: Daniel Sant

[RFC] [PATCH v3 0/8] [i386] Use out-of-line stubs for ms_abi pro/epilogues

2017-02-07 Thread Daniel Santos
ogue, stack realignment case: lea0x90(%rsp),%rsi jmpq 58013 <__resms64fx_15> Testing === A comprehensive test program is submitted separately with no additional tests failing. I have also run Wine's tests with no additional failures (although a few very minor tweaks have g

[PATCH 2/8] [i386] Add option -moutline-msabi-xlogues

2017-02-07 Thread Daniel Santos
Adds the option to i386.opt and i386.c and adds documentation to invoke.texi. Signed-off-by: Daniel Santos --- gcc/config/i386/i386.c | 3 ++- gcc/config/i386/i386.opt | 5 + gcc/doc/invoke.texi | 11 ++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/gcc

[PATCH 3/8] [i386] Adds class xlouge_layout and new fields to struct machine_function

2017-02-07 Thread Daniel Santos
yout cannot be used until stack realign flags are finalized and ix86_compute_frame_layout is called, at which point xlouge_layout::get_instance may be used to retrieve the appropriate (constant) instance of xlouge_layout. Signed-off-by: Daniel Santos --- gcc/config/i386/i386.c |

[PATCH 1/8] [i386] Minor refactoring

2017-02-07 Thread Daniel Santos
For the sake of clarity, I've separated out these minor refactoring changes from the rest of the patches. Signed-off-by: Daniel Santos --- gcc/config/i386/i386.c | 21 ++--- gcc/config/i386/i386.h | 4 +++- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git

[PATCH 4/8] [i386] Modify ix86_save_reg to optionally omit stub-managed registers

2017-02-07 Thread Daniel Santos
Adds HARD_REG_SET stub_managed_regs to track registers that will be managed by the pro/epilogue stubs for the function. Adds a third parameter bool ignore_outlined to ix86_save_reg to specify rather or not the count should include registers marked in stub_managed_regs. Signed-off-by: Daniel

[PATCH 5/8] [i386] Modify ix86_compute_frame_layout for foutline-msabi-xlogues

2017-02-07 Thread Daniel Santos
ix86_compute_frame_layout will now populate fields added to structs machine_function and ix86_frame and modify the frame layout specific to facilitate the use of save & restore stubs. Signed-off-by: Daniel Santos --- gcc/config/i386/i386.c |

[PATCH 7/8] [i386] Add msabi pro/epilogue stubs to libgcc

2017-02-07 Thread Daniel Santos
rio) [f] Variant for hard frame pointer (and stack realignment) [x] Tail-call variant (is the return from function) Signed-off-by: Daniel Santos --- libgcc/config.host | 2 +- libgcc/config/i386/i386-asm.h | 82 ++ lib

[PATCH 6/8] [i386] Add patterns and predicates foutline-msabi-xlouges

2017-02-07 Thread Daniel Santos
typically offer better optimization than the restore stub as the tail call) * restore_multiple_and_return - a jump_insn that returns from the function as a tail-call. * restore_multiple_leave_return - like the above, but restores the frame pointer before returning. Signed-off-by: Daniel Santos

Re: [RFC] [PATCH] [i386] Test program for ms_abi to sysv_abi function calls

2017-02-07 Thread Daniel Santos
On 02/07/2017 01:12 PM, Mike Stump wrote: On Feb 7, 2017, at 10:27 AM, Daniel Santos wrote: This is a test program designed to test 64-bit Microsoft ABI functions that call System V functions in a multitude of permutations to attempt to discover flaws in the generation of prologues and

Re: [PATCH 2/8] [i386] Add option -moutline-msabi-xlogues

2017-02-09 Thread Daniel Santos
On 02/08/2017 05:28 PM, Bernhard Reutner-Fischer wrote: On 7 February 2017 19:40:17 CET, Daniel Santos wrote: +{ "-mmoutline-msabi-xlogues",MASK_OUTLINE_MSABI_XLOGUES } }; s/mm/m/ +thus reducing function size at the cost of and few extra instructions. s/and/a/

Re: [RFC] [PATCH v3 0/8] [i386] Use out-of-line stubs for ms_abi pro/epilogues

2017-02-10 Thread Daniel Santos
On 02/10/2017 05:34 AM, JonY wrote: Hi, Thanks for the code size reduction patch, I have a few questions: Thanks for your review! 1. How does code compiled with -moutline-msabi-xlogues interact with older code compiled without it? Are these only called on ABI transition? These are only cal

Re: [PATCH 2/8] [i386] Add option -moutline-msabi-xlogues

2017-02-10 Thread Daniel Santos
On 02/10/2017 10:54 AM, Sandra Loosemore wrote: On 02/09/2017 09:46 PM, Daniel Santos wrote: On 02/08/2017 05:28 PM, Bernhard Reutner-Fischer wrote: On 7 February 2017 19:40:17 CET, Daniel Santos wrote: +{ "-mmoutline-msabi-xlogues", MASK_OUTLINE_MSABI_XLOGUES } }; s/m

Re: [RFC] [PATCH v3 0/8] [i386] Use out-of-line stubs for ms_abi pro/epilogues

2017-02-10 Thread Daniel Santos
On 02/10/2017 04:32 AM, Uros Bizjak wrote: On Tue, Feb 7, 2017 at 7:38 PM, Daniel Santos wrote: You will need a sign-off from cygwin od mingw-w64 maintainer (CC'd). While I can review the patch in the sense that it won't break generic code, I don't know nothing about mingw-64

Re: [RFC] [PATCH v3 0/8] [i386] Use out-of-line stubs for ms_abi pro/epilogues

2017-02-10 Thread Daniel Santos
On 02/10/2017 06:20 PM, JonY wrote: On 02/10/2017 05:23 PM, Daniel Santos wrote: On 02/10/2017 05:34 AM, JonY wrote: Hi, mingw-w64 itself does not use any ms_abi/sysv_abi marked functions internally, so it should be unaffected. I don't think Cygwin uses any either, but I need to double

Re: [RFC] [PATCH v3 0/8] [i386] Use out-of-line stubs for ms_abi pro/epilogues

2017-03-09 Thread Daniel Santos
It's been a while and I wanted to post a status update. My new tests needed a few fix-ups to work on Cygwin, but they pass. As for the rest, it turns out that running the testsuite on Cygwin is a vertable nightmare. The tests are NOT even correct because they load the shared libs (dlls) that

Re: [RFC] [PATCH v3 0/8] [i386] Use out-of-line stubs for ms_abi pro/epilogues

2017-03-13 Thread Daniel Santos
Uros, Testing on Cygwin only turns out to be a nightmare, but I've finally gotten some test results that I'm calling "clean enough". I have only done 64-bit Cygwin thus far, (still need 32-bit Cygwin as well as 32/64 MinGW), but I've hit a snag. The first patch set ("Use aligned SSE movs for

Re: [PATCH 3/9] Add option -moutline-msabi-xlogues

2016-11-25 Thread Daniel Santos
Thank you very much for your review! On 11/25/2016 05:51 PM, Sandra Loosemore wrote: On 11/22/2016 10:19 PM, Daniel Santos wrote: diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt index 9eef558..f556978 100644 --- a/gcc/config/i386/i386.opt +++ b/gcc/config/i386/i386.opt

[PATCH 0/9] RFC: Add optimization -foutline-msabi-xlougues (for Wine 64)

2016-11-15 Thread Daniel Santos
Due to differences between the 64-bit Microsoft and System V ABIs, any msabi function that calls a sysv function must consider RSI, RDI and XMM6-15 as clobbered. The result is that such functions are bloated with SSE saves/restores costing as much as 106 bytes each (up to 200-ish bytes per func

[PATCH 1/9] Change type of x86_64_ms_sysv_extra_clobbered_registers

2016-11-15 Thread Daniel Santos
This will need to be unsigned for a subsequent patch. Also adds the constant NUM_X86_64_MS_CLOBBERED_REGS for brievity. --- gcc/config/i386/i386.c | 8 +++- gcc/config/i386/i386.h | 4 +++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/

[PATCH 4/9] Add struct fields and option for foutline-msabi-xlouges

2016-11-15 Thread Daniel Santos
Adds fountline-msabi-xlogues to common.opt and various fields to structs machine_function and ix86_frame --- gcc/common.opt | 7 +++ gcc/config/i386/i386.c | 35 ++- gcc/config/i386/i386.h | 18 ++ 3 files changed, 55 insertions(+), 5 de

[PATCH 3/9] Add msabi pro/epilogue stubs to libgcc

2016-11-15 Thread Daniel Santos
i diff --git a/libgcc/config/i386/i386-asm.h b/libgcc/config/i386/i386-asm.h new file mode 100644 index 000..73acf5c --- /dev/null +++ b/libgcc/config/i386/i386-asm.h @@ -0,0 +1,82 @@ +/* Defines common perprocessor and assembly macros for use by various stubs. + * + * Copyright (C) 2016 Free Sof

[PATCH 7/9] Modify ix86_save_reg to optionally omit stub-managed registers

2016-11-15 Thread Daniel Santos
Adds static HARD_REG_SET stub_managed_regs to track registers that will be managed by the pro/epilogue stubs for the function. Adds a third parameter bool ignore_outlined to ix86_save_reg to specify rather or not the count should include registers marked in stub_managed_regs. --- gcc/config/i386/

[PATCH 2/9] Minor refactor in ix86_compute_frame_layout

2016-11-15 Thread Daniel Santos
This refactor is separated from a future patch that actually alters ix86_compute_frame_layout. --- gcc/config/i386/i386.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 56cc67d..5ed8fb6 100644 --- a/gcc/config

[PATCH 5/9] Add patterns and predicates foutline-msabi-xlouges

2016-11-15 Thread Daniel Santos
Adds the predicates save_multiple and restore_multiple to predicates.md, which are used by following patterns in sse.md: * save_multiple - insn that calls a save stub * save_multiple_realign - insn that calls a save stub and also manages a realign and hard frame pointer * restore_multiple - call

[PATCH 8/9] Modify ix86_compute_frame_layout for foutline-msabi-xlogues

2016-11-15 Thread Daniel Santos
ix86_compute_frame_layout will now populate fields added to structs machine_function and ix86_frame and modify the frame layout specific to facilitate the use of save & restore stubs. --- gcc/config/i386/i386.c | 117 - 1 file changed, 116 insertions

[PATCH 6/9] Adds class xlouge_layout to i386.c

2016-11-15 Thread Daniel Santos
This C++ class adds the basic support for foutline-msabi-xlogues by manging the layout (where registers are stored based upon and other facets of the optimization) and providing the proper symbol rtx for the required stub. xlouge_layout should not be used until a call to ix86_compute_frame_layout

[PATCH 9/9] Add remainder of foutline-msabi-xlogues implementation

2016-11-15 Thread Daniel Santos
Adds functions emit_msabi_outlined_save and emit_msabi_outlined_restore, which are called from ix86_expand_prologue and ix86_expand_epilogue, respectively. --- gcc/config/i386/i386.c | 307 ++--- 1 file changed, 288 insertions(+), 19 deletions(-) diff -

Re: [PATCH 5/9] Add patterns and predicates foutline-msabi-xlouges

2016-11-15 Thread Daniel Santos
On 11/15/2016 02:06 PM, Daniel Santos wrote: +;; Save multiple registers out-of-line after realignment +(define_insn "save_multiple_realign" + [(match_parallel 0 "save_multiple" +[(use (match_operand:P 1 "symbol_operand")) + (set (reg:P

[PATCH v2 0/9] Add optimization -moutline-msabi-xlougues (for Wine 64)

2016-11-22 Thread Daniel Santos
Due to ABI differences, when a 64-bit Microsoft function calls and System V function, it must consider RSI, RDI and XMM6-15 as clobbered. Saving these registers can cost as much as 109 bytes and a similar amount for restoring. This patch set targets 64-bit Wine and aims to mitigate some of the

[PATCH 4/9] Adds class xlouge_layout and new fields to struct machine_function

2016-11-22 Thread Daniel Santos
Of the new fields added to struct machine_function, outline_ms_sysv is initially set in ix86_expand_call, but may later be cleared when ix86_compute_frame_layout is called (both of these are in subsequent patch). If it is not cleared, then the remaining new fields will be set. The new class xloug

[PATCH 2/9] Minor refactor in ix86_compute_frame_layout

2016-11-22 Thread Daniel Santos
This refactor is separated from a future patch that actually alters ix86_compute_frame_layout. --- gcc/config/i386/i386.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 56cc67d..5ed8fb6 100644 --- a/gcc/config

[PATCH 1/9] Change type of x86_64_ms_sysv_extra_clobbered_registers

2016-11-22 Thread Daniel Santos
This will need to be unsigned for a subsequent patch. Also adds the constant NUM_X86_64_MS_CLOBBERED_REGS for brievity. --- gcc/config/i386/i386.c | 8 +++- gcc/config/i386/i386.h | 4 +++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/

[PATCH 3/9] Add option -moutline-msabi-xlogues

2016-11-22 Thread Daniel Santos
Adds the option to i386.opt and i386.c and adds documentation to invoke.texi. --- gcc/config/i386/i386.c | 1 + gcc/config/i386/i386.opt | 5 + gcc/doc/invoke.texi | 11 ++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386

[PATCH 6/9] Modify ix86_compute_frame_layout for foutline-msabi-xlogues

2016-11-22 Thread Daniel Santos
ix86_compute_frame_layout will now populate fields added to structs machine_function and ix86_frame and modify the frame layout specific to facilitate the use of save & restore stubs. --- gcc/config/i386/i386.c | 138 ++--- 1 file changed, 131 insertions

[PATCH 5/9] Modify ix86_save_reg to optionally omit stub-managed registers

2016-11-22 Thread Daniel Santos
Adds static HARD_REG_SET stub_managed_regs to track registers that will be managed by the pro/epilogue stubs for the function. Adds a third parameter bool ignore_outlined to ix86_save_reg to specify rather or not the count should include registers marked in stub_managed_regs. --- gcc/config/i386/

[PATCH 8/9] Add msabi pro/epilogue stubs to libgcc

2016-11-22 Thread Daniel Santos
i diff --git a/libgcc/config/i386/i386-asm.h b/libgcc/config/i386/i386-asm.h new file mode 100644 index 000..73acf5c --- /dev/null +++ b/libgcc/config/i386/i386-asm.h @@ -0,0 +1,82 @@ +/* Defines common perprocessor and assembly macros for use by various stubs. + * + * Copyright (C) 2016 Free Sof

[PATCH 9/9] Add remainder of moutline-msabi-xlogues implementation

2016-11-22 Thread Daniel Santos
Adds functions emit_msabi_outlined_save and emit_msabi_outlined_restore, which are called from ix86_expand_prologue and ix86_expand_epilogue, respectively. Also adds the code to ix86_expand_call that enables the optimization (setting the machine_function's outline_ms_sysv field). --- gcc/config/i

[PATCH 7/9] Add patterns and predicates foutline-msabi-xlouges

2016-11-22 Thread Daniel Santos
Adds the predicates save_multiple and restore_multiple to predicates.md, which are used by following patterns in sse.md: * save_multiple - insn that calls a save stub * save_multiple_hfp - insn that calls a save stub when a hard frame pointer is used. * restore_multiple - call_insn that calls a

<    1   2