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
I probably should have mentioned that these are all for GCC8.
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
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
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
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
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
) 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
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
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'
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
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
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
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 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
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
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
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
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
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
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. :(
>>>
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
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,
>>>>
>>>>&
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
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
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
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
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 |
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
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
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 |
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
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
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
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/
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
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
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
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
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
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
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
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
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/
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
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
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/
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
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
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
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
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 -
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
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
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
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
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/
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
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
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/
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
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
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
101 - 163 of 163 matches
Mail list logo