* [PATCH 1/2] [testsuite] Move non-standard parallelization support into new lib and fix flaw
2017-05-19 6:29 [PATCH 0/2] [testsuite] PR80759 Fix test breakages on i386-pc-solaris2.* Daniel Santos
@ 2017-05-19 6:29 ` Daniel Santos
2017-05-19 6:50 ` [PATCH 2/2] [testsuite] PR 80759 Remove gas extensions from do-test.S, fix other problems Daniel Santos
` (2 subsequent siblings)
3 siblings, 0 replies; 12+ messages in thread
From: Daniel Santos @ 2017-05-19 6:29 UTC (permalink / raw)
To: Mike Stump, gcc-patches; +Cc: Rainer Orth, Bernd Edlinger
This fixes a flaw in my parallelization code that caused it to fail when
GCC_RUNTEST_PARALLELIZE_DIR wasn't set. It worked fine with make -j1,
but failed with just make.
As there could be other tests that might need to do their own
paralellization, I'm moving the that code into it's own file under
gcc/testsuite/lib.
Signed-off-by: Daniel Santos <daniel.santos@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(-)
create mode 100644 gcc/testsuite/lib/parallelize.exp
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
index e317af9bd85..77c40dbf349 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
+++ b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
@@ -30,13 +30,11 @@ if { (![istarget x86_64-*-*] && ![istarget i?86-*-*])
return
}
-global GCC_RUNTEST_PARALLELIZE_DIR
-
load_lib gcc-dg.exp
+load_lib parallelize.exp
proc runtest_ms_sysv { cflags generator_args } {
- global GCC_UNDER_TEST HOSTCXX HOSTCXXFLAGS tmpdir srcdir subdir \
- parallel_dir next_test
+ global GCC_UNDER_TEST HOSTCXX HOSTCXXFLAGS tmpdir srcdir subdir
set objdir "$tmpdir/ms-sysv"
set generator "$tmpdir/ms-sysv-generate.exe"
@@ -46,22 +44,6 @@ proc runtest_ms_sysv { cflags generator_args } {
set ms_sysv_exe "$objdir/ms-sysv.exe"
set status 0
set warn_flags "-Wall"
- set this_test $next_test
- incr next_test
-
- # Do parallelization here
- if [catch {set fd [open "$parallel_dir/$this_test" \
- [list RDWR CREAT EXCL]]} ] {
- if { [lindex $::errorCode 1] eq "EEXIST" } then {
- # Another job is running this test
- return
- } else {
- error "Failed to open $parallel_dir/$this_test: $::errorCode"
- set status 1
- }
- } else {
- close $fd
- }
# Detect when hard frame pointers are enabled (or required) so we know not
# to generate bp clobbers.
@@ -73,9 +55,17 @@ proc runtest_ms_sysv { cflags generator_args } {
set descr "$subdir CFLAGS=\"$cflags\" generator_args=\"$generator_args\""
verbose "$tmpdir: Running test $descr" 1
- # Cleanup any previous test in objdir
- file delete -force $objdir
- file mkdir $objdir
+ set status [parallel-should-run-test]
+
+ if { $status == 1 } then {
+ return
+ }
+
+ if { $status == 0 } then {
+ # Cleanup any previous test in objdir
+ file delete -force $objdir
+ file mkdir $objdir
+ }
# Build the generator (only needs to be done once).
set src "$srcdir/$subdir/gen.cc"
@@ -148,16 +138,8 @@ proc runtest_ms_sysv { cflags generator_args } {
}
dg-init
-
-# Setup parallelization
-set next_test 0
-set parallel_dir "$env(GCC_RUNTEST_PARALLELIZE_DIR)/abi-ms-sysv"
-file mkdir "$env(GCC_RUNTEST_PARALLELIZE_DIR)"
-file mkdir "$parallel_dir"
-
-if { ![file isdirectory "$parallel_dir"] } then {
- error "Failed to create directory $parallel_dir: $::errorCode"
- return
+if { [parallel-init "ms2sysv"] != 0 } then {
+ return;
}
set gen_opts "-p0-5"
diff --git a/gcc/testsuite/lib/parallelize.exp b/gcc/testsuite/lib/parallelize.exp
new file mode 100644
index 00000000000..346a06f0fa0
--- /dev/null
+++ b/gcc/testsuite/lib/parallelize.exp
@@ -0,0 +1,88 @@
+# Functions for parallelizing tests that cannot use the standard dg-run,
+# dg-runtest or gcc-dg-runtest for some reason.
+#
+# Copyright (C) 2017 Free Software Foundation, Inc.
+# Contributed by Daniel Santos <daniel.santos@pobox.com>
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# Under Section 7 of GPL version 3, you are granted additional
+# permissions described in the GCC Runtime Library Exception, version
+# 3.1, as published by the Free Software Foundation.
+#
+# You should have received a copy of the GNU General Public License and
+# a copy of the GCC Runtime Library Exception along with this program;
+# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+# <http://www.gnu.org/licenses/>.
+
+set is_parallel_build 0
+set parallel_next_test 0
+set parallel_dir ""
+
+# Setup parallelization directory and variables.
+#
+# Returns 0 upon success, -1 on failure.
+proc parallel-init { uid } {
+ global is_parallel_build parallel_dir parallel_parallel_next_test env
+
+ if { [info exists env(GCC_RUNTEST_PARALLELIZE_DIR) ] } {
+ set gcc_pardir "$env(GCC_RUNTEST_PARALLELIZE_DIR)"
+ set is_parallel_build 1
+ set parallel_dir "${gcc_pardir}/${uid}"
+ if [catch {file mkdir "$gcc_pardir"}] {
+ if { [lindex $::errorCode 1] ne "EEXIST" } {
+ error "Failed to create directory $gcc_pardir: $::errorCode"
+ return -1
+ }
+ }
+ if [catch {file mkdir "$parallel_dir"}] {
+ if { [lindex $::errorCode 1] ne "EEXIST" } {
+ error "Failed to create directory $parallel_dir: $::errorCode"
+ return -1
+ }
+ }
+ }
+ return 0
+}
+
+# Test if a test should be run on by this job or not.
+#
+# Returns:
+# 0 if the test should be run by this job
+# 1 if it should not,
+# -1 upon error.
+proc parallel-should-run-test {} {
+ global is_parallel_build parallel_dir parallel_next_test
+
+ # Not a parallel build
+ if { $is_parallel_build != 1 } {
+ return 0
+ }
+
+ set this_test $parallel_next_test
+ incr parallel_next_test
+
+ if [catch {set fd [open "$parallel_dir/$this_test" \
+ [list RDWR CREAT EXCL]]} ] {
+ if { [lindex $::errorCode 1] eq "EEXIST" } then {
+ # Another job is running this test
+ return 1
+ } else {
+ error "Failed to open $parallel_dir/$this_test: $::errorCode"
+ return -1
+ }
+ } else {
+ close $fd
+ return 0
+ }
+}
--
2.11.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 0/2] [testsuite] PR80759 Fix test breakages on i386-pc-solaris2.*
@ 2017-05-19 6:29 Daniel Santos
2017-05-19 6:29 ` [PATCH 1/2] [testsuite] Move non-standard parallelization support into new lib and fix flaw Daniel Santos
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Daniel Santos @ 2017-05-19 6:29 UTC (permalink / raw)
To: Mike Stump, gcc-patches, Rainer Orth; +Cc: Bernd Edlinger
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<jobs> flag is passed,
3. Builds aren't adding TEST_ALWAYS_FLAGS, so log files filled with
color escape codes, and
4. The "test unsupported" message is being spammed once for each -j<job>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80759
I've broken this apart into two patches because I don't know if you'll
agree with the first one. I fixed the make -j<n> issue and moved the
parallelization code into a new gcc/target/lib/parallelize.exp in the
first patch and fixed all of the other issues in the second. I've
removed all usage of gas .struct in my assembly file, used hard-coded
the offsets into the code and added asserts to main.c to make sure they
don't change.
I've bootstrapped and retested on x86_64 Linux and have asked Rainer to
retest on Solaris. Presuming that succeeds, are you OK with this
change? (I have SVN write privs now, so I can even commit it myself).
Thanks,
Daniel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/2] [testsuite] PR 80759 Remove gas extensions from do-test.S, fix other problems
2017-05-19 6:29 [PATCH 0/2] [testsuite] PR80759 Fix test breakages on i386-pc-solaris2.* Daniel Santos
2017-05-19 6:29 ` [PATCH 1/2] [testsuite] Move non-standard parallelization support into new lib and fix flaw Daniel Santos
@ 2017-05-19 6:50 ` Daniel Santos
2017-05-19 8:54 ` Rainer Orth
2017-05-19 9:04 ` [PATCH 0/2] [testsuite] PR80759 Fix test breakages on i386-pc-solaris2.* Rainer Orth
2017-07-02 5:06 ` [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin Daniel Santos
3 siblings, 1 reply; 12+ messages in thread
From: Daniel Santos @ 2017-05-19 6:50 UTC (permalink / raw)
To: Mike Stump, gcc-patches; +Cc: Rainer Orth, Bernd Edlinger
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-by: Daniel Santos <daniel.santos@pobox.com>
---
.../gcc.target/x86_64/abi/ms-sysv/do-test.S | 26 +++++-----------------
.../gcc.target/x86_64/abi/ms-sysv/ms-sysv.c | 7 ++++++
.../gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp | 24 ++++++++++++--------
3 files changed, 27 insertions(+), 30 deletions(-)
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S
index 1395235fd1e..967eb959fbc 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S
+++ b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S
@@ -46,22 +46,6 @@ fn:
# define MOVAPS movaps
# endif
-/* TODO: Is there a cleaner way to provide these offsets? */
- .struct 0
-test_data_save:
-
- .struct test_data_save + 224
-test_data_input:
-
- .struct test_data_save + 448
-test_data_output:
-
- .struct test_data_save + 672
-test_data_fn:
-
- .struct test_data_save + 680
-test_data_retaddr:
-
.text
regs_to_mem:
@@ -132,23 +116,23 @@ L0:
call regs_to_mem
# Load register with random data
- lea test_data + test_data_input(%rip), %rax
+ lea test_data + 224(%rip), %rax
call mem_to_regs
# Save original return address
pop %rax
- movq %rax, test_data + test_data_retaddr(%rip)
+ movq %rax, test_data + 680(%rip)
# Call the test function
- call *test_data + test_data_fn(%rip)
+ call *test_data + 672(%rip)
# Restore the original return address
- movq test_data + test_data_retaddr(%rip), %rcx
+ movq test_data + 680(%rip), %rcx
push %rcx
# Save test function return value and store resulting register values
push %rax
- lea test_data + test_data_output(%rip), %rax
+ lea test_data + 448(%rip), %rax
call regs_to_mem
# Restore registers
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c
index 2a011f5103d..7cec312c386 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c
@@ -346,6 +346,13 @@ int main (int argc, char *argv[])
assert (!((long)&test_data.regdata[REG_SET_INPUT] & 15));
assert (!((long)&test_data.regdata[REG_SET_OUTPUT] & 15));
+ /* Verify offsets hard-coded into assembly. */
+ assert (__builtin_offsetof (struct test_data, regdata[REG_SET_SAVE]) == 0);
+ assert (__builtin_offsetof (struct test_data, regdata[REG_SET_INPUT]) == 224);
+ assert (__builtin_offsetof (struct test_data, regdata[REG_SET_OUTPUT]) == 448);
+ assert (__builtin_offsetof (struct test_data, fn) == 672);
+ assert (__builtin_offsetof (struct test_data, retaddr) == 680);
+
while ((c = getopt (argc, argv, "s:f")) != -1)
{
switch (c)
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
index 77c40dbf349..a9571f194b1 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
+++ b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
@@ -23,18 +23,12 @@
# see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
# <http://www.gnu.org/licenses/>.
-# Exit immediately if this isn't a native x86_64 target.
-if { (![istarget x86_64-*-*] && ![istarget i?86-*-*])
- || ![is-effective-target lp64] || ![isnative] } then {
- unsupported "$subdir"
- return
-}
-
load_lib gcc-dg.exp
load_lib parallelize.exp
proc runtest_ms_sysv { cflags generator_args } {
- global GCC_UNDER_TEST HOSTCXX HOSTCXXFLAGS tmpdir srcdir subdir
+ global GCC_UNDER_TEST HOSTCXX HOSTCXXFLAGS tmpdir srcdir subdir \
+ TEST_ALWAYS_FLAGS
set objdir "$tmpdir/ms-sysv"
set generator "$tmpdir/ms-sysv-generate.exe"
@@ -93,7 +87,7 @@ proc runtest_ms_sysv { cflags generator_args } {
}
}
- set cc "$GCC_UNDER_TEST -I$objdir -I$srcdir/$subdir $cflags $warn_flags"
+ set cc "$GCC_UNDER_TEST -I$objdir -I$srcdir/$subdir $TEST_ALWAYS_FLAGS $cflags $warn_flags"
# Assemble do-test.S
set src "$srcdir/$subdir/do-test.S"
@@ -142,6 +136,18 @@ if { [parallel-init "ms2sysv"] != 0 } then {
return;
}
+# Exit if this isn't a native x86_64 target.
+if { (![istarget x86_64-*-*] && ![istarget i?86-*-*])
+ || ![is-effective-target lp64] || ![isnative] } then {
+
+ # The first call to parallel-should-run-test is used so we only print the
+ # "unsupported" message once.
+ if { [parallel-should-run-test] == 0 } {
+ unsupported "$subdir"
+ }
+ return
+}
+
set gen_opts "-p0-5"
set all_options [list "-O2" "-O0 -g3"]
--
2.11.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] [testsuite] PR 80759 Remove gas extensions from do-test.S, fix other problems
2017-05-19 6:50 ` [PATCH 2/2] [testsuite] PR 80759 Remove gas extensions from do-test.S, fix other problems Daniel Santos
@ 2017-05-19 8:54 ` Rainer Orth
2017-05-20 0:38 ` Daniel Santos
0 siblings, 1 reply; 12+ messages in thread
From: Rainer Orth @ 2017-05-19 8:54 UTC (permalink / raw)
To: Daniel Santos; +Cc: Mike Stump, gcc-patches, Bernd Edlinger
Hi Daniel,
> 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-by: Daniel Santos <daniel.santos@pobox.com>
> ---
> .../gcc.target/x86_64/abi/ms-sysv/do-test.S | 26 +++++-----------------
> .../gcc.target/x86_64/abi/ms-sysv/ms-sysv.c | 7 ++++++
> .../gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp | 24 ++++++++++++--------
> 3 files changed, 27 insertions(+), 30 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S
> index 1395235fd1e..967eb959fbc 100644
> --- a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S
> +++ b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S
> @@ -46,22 +46,6 @@ fn:
> # define MOVAPS movaps
> # endif
>
> -/* TODO: Is there a cleaner way to provide these offsets? */
> - .struct 0
> -test_data_save:
> -
> - .struct test_data_save + 224
> -test_data_input:
> -
> - .struct test_data_save + 448
> -test_data_output:
> -
> - .struct test_data_save + 672
> -test_data_fn:
> -
> - .struct test_data_save + 680
> -test_data_retaddr:
> -
> .text
>
> regs_to_mem:
> @@ -132,23 +116,23 @@ L0:
> call regs_to_mem
>
> # Load register with random data
> - lea test_data + test_data_input(%rip), %rax
> + lea test_data + 224(%rip), %rax
> call mem_to_regs
>
> # Save original return address
> pop %rax
> - movq %rax, test_data + test_data_retaddr(%rip)
> + movq %rax, test_data + 680(%rip)
>
> # Call the test function
> - call *test_data + test_data_fn(%rip)
> + call *test_data + 672(%rip)
>
> # Restore the original return address
> - movq test_data + test_data_retaddr(%rip), %rcx
> + movq test_data + 680(%rip), %rcx
> push %rcx
>
> # Save test function return value and store resulting register values
> push %rax
> - lea test_data + test_data_output(%rip), %rax
> + lea test_data + 448(%rip), %rax
> call regs_to_mem
>
> # Restore registers
> diff --git a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c
> index 2a011f5103d..7cec312c386 100644
> --- a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c
> +++ b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c
> @@ -346,6 +346,13 @@ int main (int argc, char *argv[])
> assert (!((long)&test_data.regdata[REG_SET_INPUT] & 15));
> assert (!((long)&test_data.regdata[REG_SET_OUTPUT] & 15));
>
> + /* Verify offsets hard-coded into assembly. */
> + assert (__builtin_offsetof (struct test_data, regdata[REG_SET_SAVE]) == 0);
> + assert (__builtin_offsetof (struct test_data, regdata[REG_SET_INPUT]) == 224);
> + assert (__builtin_offsetof (struct test_data, regdata[REG_SET_OUTPUT]) == 448);
> + assert (__builtin_offsetof (struct test_data, fn) == 672);
> + assert (__builtin_offsetof (struct test_data, retaddr) == 680);
> +
> while ((c = getopt (argc, argv, "s:f")) != -1)
> {
> switch (c)
while .struct is a gas extension and doesn't work with the Solaris/x86
/bin/as, having the same (mostly unexplained) constants hardcoded in two
places isn't exactly helpful. I'd suggest moving them to (say)
ms-sysv.h and include that from both do-test.S (which is preprocessed
assembler after all) and ms-sysv.c.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/2] [testsuite] PR80759 Fix test breakages on i386-pc-solaris2.*
2017-05-19 6:29 [PATCH 0/2] [testsuite] PR80759 Fix test breakages on i386-pc-solaris2.* Daniel Santos
2017-05-19 6:29 ` [PATCH 1/2] [testsuite] Move non-standard parallelization support into new lib and fix flaw Daniel Santos
2017-05-19 6:50 ` [PATCH 2/2] [testsuite] PR 80759 Remove gas extensions from do-test.S, fix other problems Daniel Santos
@ 2017-05-19 9:04 ` Rainer Orth
2017-07-02 5:06 ` [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin Daniel Santos
3 siblings, 0 replies; 12+ messages in thread
From: Rainer Orth @ 2017-05-19 9:04 UTC (permalink / raw)
To: Daniel Santos; +Cc: Mike Stump, gcc-patches, Bernd Edlinger
Hi Daniel,
> 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<jobs> flag is passed,
> 3. Builds aren't adding TEST_ALWAYS_FLAGS, so log files filled with
> color escape codes, and
> 4. The "test unsupported" message is being spammed once for each -j<job>
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80759
>
> I've broken this apart into two patches because I don't know if you'll
> agree with the first one. I fixed the make -j<n> issue and moved the
> parallelization code into a new gcc/target/lib/parallelize.exp in the first
> patch and fixed all of the other issues in the second. I've removed all
> usage of gas .struct in my assembly file, used hard-coded the offsets into
> the code and added asserts to main.c to make sure they don't change.
>
> I've bootstrapped and retested on x86_64 Linux and have asked Rainer to
> retest on Solaris. Presuming that succeeds, are you OK with this change?
unfortunately, it still doesn't, as explained in the PR. The multilib
support is still wrong/non-existant.
> (I have SVN write privs now, so I can even commit it myself).
Please always include ChangeLog entries with your patch submissions so
one can easily see what you've change
(cf. https://gcc.gnu.org/contribute.html).
Thanks.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/2] [testsuite] PR 80759 Remove gas extensions from do-test.S, fix other problems
2017-05-19 8:54 ` Rainer Orth
@ 2017-05-20 0:38 ` Daniel Santos
0 siblings, 0 replies; 12+ messages in thread
From: Daniel Santos @ 2017-05-20 0:38 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc-patches, Bernd Edlinger
Thanks you for your assistance Rainer!
On 05/19/2017 04:03 AM, Rainer Orth wrote:
> unfortunately, it still doesn't, as explained in the PR. The multilib
> support is still wrong/non-existant.
I guess I thought for some reason that would magically appear in
TEST_ALWAYS_FLAGS. :) I've explicitly added it for now, but I haven't
yet found where -m64 gets fed in the normal flow of things and I would
rather know I'm doing things as closely as possible to how the rest if
the test harness does it.
>> (I have SVN write privs now, so I can even commit it myself).
> Please always include ChangeLog entries with your patch submissions so
> one can easily see what you've change
> (cf. https://gcc.gnu.org/contribute.html).
>
> Thanks.
> Rainer
I hate when I forget that! I'll be sure to remember when I resubmit.
>> 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-by: Daniel Santos <daniel.santos@pobox.com>
>> ---
>> .../gcc.target/x86_64/abi/ms-sysv/do-test.S | 26 +++++-----------------
>> .../gcc.target/x86_64/abi/ms-sysv/ms-sysv.c | 7 ++++++
>> .../gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp | 24 ++++++++++++--------
>> 3 files changed, 27 insertions(+), 30 deletions(-)
>>
>> diff --git a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S
>> index 1395235fd1e..967eb959fbc 100644
>> --- a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S
>> +++ b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S
>> @@ -46,22 +46,6 @@ fn:
>> # define MOVAPS movaps
>> # endif
>>
>> -/* TODO: Is there a cleaner way to provide these offsets? */
>> - .struct 0
>> -test_data_save:
>> -
>> - .struct test_data_save + 224
>> -test_data_input:
>> -
>> - .struct test_data_save + 448
>> -test_data_output:
>> -
>> - .struct test_data_save + 672
>> -test_data_fn:
>> -
>> - .struct test_data_save + 680
>> -test_data_retaddr:
>> -
>> .text
>>
>> regs_to_mem:
>> @@ -132,23 +116,23 @@ L0:
>> call regs_to_mem
>>
>> # Load register with random data
>> - lea test_data + test_data_input(%rip), %rax
>> + lea test_data + 224(%rip), %rax
>> call mem_to_regs
>>
>> # Save original return address
>> pop %rax
>> - movq %rax, test_data + test_data_retaddr(%rip)
>> + movq %rax, test_data + 680(%rip)
>>
>> # Call the test function
>> - call *test_data + test_data_fn(%rip)
>> + call *test_data + 672(%rip)
>>
>> # Restore the original return address
>> - movq test_data + test_data_retaddr(%rip), %rcx
>> + movq test_data + 680(%rip), %rcx
>> push %rcx
>>
>> # Save test function return value and store resulting register values
>> push %rax
>> - lea test_data + test_data_output(%rip), %rax
>> + lea test_data + 448(%rip), %rax
>> call regs_to_mem
>>
>> # Restore registers
>> diff --git a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c
>> index 2a011f5103d..7cec312c386 100644
>> --- a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c
>> +++ b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c
>> @@ -346,6 +346,13 @@ int main (int argc, char *argv[])
>> assert (!((long)&test_data.regdata[REG_SET_INPUT] & 15));
>> assert (!((long)&test_data.regdata[REG_SET_OUTPUT] & 15));
>>
>> + /* Verify offsets hard-coded into assembly. */
>> + assert (__builtin_offsetof (struct test_data, regdata[REG_SET_SAVE]) == 0);
>> + assert (__builtin_offsetof (struct test_data, regdata[REG_SET_INPUT]) == 224);
>> + assert (__builtin_offsetof (struct test_data, regdata[REG_SET_OUTPUT]) == 448);
>> + assert (__builtin_offsetof (struct test_data, fn) == 672);
>> + assert (__builtin_offsetof (struct test_data, retaddr) == 680);
>> +
>> while ((c = getopt (argc, argv, "s:f")) != -1)
>> {
>> switch (c)
> while .struct is a gas extension and doesn't work with the Solaris/x86
> /bin/as, having the same (mostly unexplained) constants hardcoded in two
> places isn't exactly helpful. I'd suggest moving them to (say)
> ms-sysv.h and include that from both do-test.S (which is preprocessed
> assembler after all) and ms-sysv.c.
>
> Rainer
Well, I don't have an ms-sysv.h, but I suppose I can add one.
I'm starting to lean more towards the idea of plucking out the portion
of asm that uses these offsets, moving that to an inline asm function
and having the code in do-test.S just jmp to it. I wish there was some
sort of "naked" attribute for x86 since I'm not well versed in every way
that the compiler can change it in a way that wouldn't be friendly.
void __attribute__((optimize ("-O0 -fno-split-stack")))
do_test_body (void)
{
__asm__ __volatile__ (
"# Save registers\n"
" lea %0, %%rax\n"
" call regs_to_mem\n"
"\n"
" # Load registers with random data\n"
" lea %1, %%rax\n"
" call mem_to_regs\n"
"\n"
" # Save original return address\n"
" pop %%rax\n"
" movq %%rax, %4\n"
"\n"
" # Call the test function\n"
" call *%3\n"
"\n"
" # Restore the original return address\n"
" movq %4, %%rcx\n"
" push %%rcx\n"
"\n"
" # Save test function return value and store resulting register values\n"
" push %%rax\n"
" lea %2, %%rax\n"
" call regs_to_mem\n"
"\n"
" # Restore registers\n"
" lea %0, %%rax\n"
" call mem_to_regs\n"
" pop %%rax\n"
" retq\n\t"
FUNC_END("do_test_unaligned")
FUNC_END("do_test_aligned")
::
"m"(test_data.regdata[REG_SET_SAVE]),
"m"(test_data.regdata[REG_SET_INPUT]),
"m"(test_data.regdata[REG_SET_OUTPUT]),
"m"(test_data.fn),
"m"(test_data.retaddr):);
}
Any thoughts on that approach? I haven't actually tested it yet. (It
would probably nice if I put "memory" in the clobber.)
Thanks,
Daniel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin
2017-05-19 6:29 [PATCH 0/2] [testsuite] PR80759 Fix test breakages on i386-pc-solaris2.* Daniel Santos
` (2 preceding siblings ...)
2017-05-19 9:04 ` [PATCH 0/2] [testsuite] PR80759 Fix test breakages on i386-pc-solaris2.* Rainer Orth
@ 2017-07-02 5:06 ` Daniel Santos
2017-07-02 5:10 ` [PATCH 1/2] [testsuite] PR80759 fix tests " Daniel Santos
` (2 more replies)
3 siblings, 3 replies; 12+ messages in thread
From: Daniel Santos @ 2017-07-02 5:06 UTC (permalink / raw)
To: gcc-patches, Rainer Orth, Uros Bizjak, Mike Stump, Iain Sandoe,
Ian Lance Taylor
Cc: Bernd Edlinger
[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]
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 building with -mcall-ms2sysv-xlogues. The
issues are detailed in the notes for each patch.
I would particularly appreciate any feedback for Darwin as I am
unfamiliar with the platform and Rainer and I have fashioned some of
these changes by looking at other Darwin code in gcc.
.../gcc.target/x86_64/abi/ms-sysv/do-test.S | 200 ++++++++-----------
.../gcc.target/x86_64/abi/ms-sysv/ms-sysv.c | 83 +++++++-
.../gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp | 153 +++++---------
libgcc/config.host | 6 +-
libgcc/config/i386/i386-asm.h | 89 +++++----
libgcc/config/i386/resms64.S | 2 +-
libgcc/config/i386/resms64f.S | 2 +-
libgcc/config/i386/resms64fx.S | 2 +-
libgcc/config/i386/resms64x.S | 2 +-
libgcc/config/i386/savms64.S | 2 +-
libgcc/config/i386/savms64f.S | 2 +-
11 files changed, 274 insertions(+), 269 deletions(-)
Many thanks to Rainer for all of his help on this!
Thanks,
Daniel
[-- Attachment #2: pr80759.gcc.testsuite.ChangeLog --]
[-- Type: text/plain, Size: 1045 bytes --]
2017-06-28 Daniel Santos <daniel.santos@pobox.com>
2017-06-10 Daniel Santos <daniel.santos@pobox.com>
PR testsuite/80759
* gcc.target/x86_64/abi/ms-sysv/do-test.S
(ELFFN_BEGIN): Rename to FN_TYPE.
(ELFFN_END): Rename to FN_SIZE.
(ASMNAME): New macro.
(FUNC): Rename to FUNC_BEGIN, use ASMNAME and use .globl instead of
.global.
(FUNC_END): Use ASMNAME.
(test_data_save): Remove.
(test_data_input): Likewise.
(test_data_output: Likewise.
(test_data_fn): Likewise.
(test_data_retaddr): Likewise.
(regs_to_mem): Make globals, use r10 instead of rax.
(mem_to_regs): Likewise.
(do_test_unaligned): Remove .cfi directives, remove pushf/popf, move
body to ms-sysv.c.
(do_test_aligned): Likewise.
* gcc.target/x86_64/abi/ms-sysv/ms-sysv.c:
Add dg-* directives.
(PASTE_STR): New macro.
(ASMNAME): Likewise.
(LOAD_TEST_DATA_ADDR): Likewise.
(TEST_DATA_OFFSET): Likewise.
(do_test_body0): New C function.
(do_test_body): New inline assembly routine.
* gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
(runtest_ms_sysv): Modify.
[-- Attachment #3: pr80759.libgcc.ChangeLog --]
[-- Type: text/plain, Size: 726 bytes --]
2017-06-28 Daniel Santos <daniel.santos@pobox.com>
PR testsuite/80759
* config.host: include i386/t-msabi for darwin and solaris.
* config/i386/i386-asm.h
(ELFFN): Rename to FN_TYPE.
(FN_SIZE): New macro.
(FN_HIDDEN): Likewise.
(ASMNAME): Likewise.
(FUNC_START): Rename to FUNC_BEGIN, use ASMNAME, replace .global with
.globl.
(HIDDEN_FUNC): Use ASMNAME and .globl instead of .global.
(SSE_SAVE): Convert to cpp macro, hard-code offset (always 0x60).
* config/i386/resms64.S: Use SSE_SAVE as cpp macro instead of gas
.macro.
* config/i386/resms64f.S: Likewise.
* config/i386/resms64fx.S: Likewise.
* config/i386/resms64x.S: Likewise.
* config/i386/savms64.S: Likewise.
* config/i386/savms64f.S: Likewise.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/2] [testsuite] PR80759 fix tests on Solaris and Darwin
2017-07-02 5:06 ` [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin Daniel Santos
@ 2017-07-02 5:10 ` Daniel Santos
2017-07-02 5:10 ` [PATCH 2/2] [libgcc]: PR80759 fixes for Solaris & Darwin Daniel Santos
2017-07-17 16:11 ` PING: [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin Daniel Santos
2 siblings, 0 replies; 12+ messages in thread
From: Daniel Santos @ 2017-07-02 5:10 UTC (permalink / raw)
To: gcc-patches, Uros Bizjak, Jan Hubicka, Iain Sandoe,
Ian Lance Taylor, Mike Stump, Rainer Orth
Cc: Bernd Edlinger
The ms-sysv.exp tests were failing on Solaris and Darwin targets. In
addition, a number of other problems have been identified.
* Assembly failed on Solaris and Darwin when not using gas due to use of
.cfi directives and .struct.
* Tests were failing on Solaris due to hard frame pointer being always
enabled on that platform and and not passing --omit-rbp-clobbers to
the code generator.
* Manual compilation (via remote_exec as opposed to dg-runtest, et. al.)
was missing TEST_ALWAYS_FLAGS, resulting in color codes in log files.
It was also missing -m64 in some cases where it was needed.
* When built with make -j48 on an unsupported triplet, the "test
unsupported" message appeared 48 times in the log (it appears that
several other tests do this as well).
* Using hard-coded offsets in do-tests.S is ugly. This is fixed by
moving some code into inline assembly in ms-sysv.c.
* Custom parallelization code broke when running make without -j<n>
* Accessing the test_data global from assembly requires(?) use of global
offset table on Darwin.
This patch corrects all of these problems. The custom parallelization
code has been removed and replaced with calls to procs in gcc's standard
testing framework: gcc_parallel_test_enable, runtest_file_p and
dg-runtest. This results in much poorer parallelization, which I hope
to address in a future patch, but has little effect when built without
checking enabled.
Previously, each test job compiled and executed 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: Daniel Santos <daniel.santos@pobox.com>
---
.../gcc.target/x86_64/abi/ms-sysv/do-test.S | 200 +++++++++------------
.../gcc.target/x86_64/abi/ms-sysv/ms-sysv.c | 83 ++++++++-
.../gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp | 153 +++++-----------
3 files changed, 210 insertions(+), 226 deletions(-)
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S
index 1395235fd1e..ffe011bcc68 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S
+++ b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/do-test.S
@@ -23,141 +23,101 @@ a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
-#ifdef __x86_64__
-
-# ifdef __ELF__
-# define ELFFN_BEGIN(fn) .type fn,@function
-# define ELFFN_END(fn) .size fn,.-fn
-# else
-# define ELFFN_BEGIN(fn)
-# define ELFFN_END(fn)
-# endif
-
-# define FUNC(fn) \
- .global fn; \
- ELFFN_BEGIN(fn); \
-fn:
-
-#define FUNC_END(fn) ELFFN_END(fn)
-
-# ifdef __AVX__
-# define MOVAPS vmovaps
-# else
-# define MOVAPS movaps
-# endif
-
-/* TODO: Is there a cleaner way to provide these offsets? */
- .struct 0
-test_data_save:
-
- .struct test_data_save + 224
-test_data_input:
-
- .struct test_data_save + 448
-test_data_output:
-
- .struct test_data_save + 672
-test_data_fn:
-
- .struct test_data_save + 680
-test_data_retaddr:
+#if defined(__x86_64__) && defined(__SSE2__)
+
+/* These macros currently support GNU/Linux, Solaris and Darwin. */
+
+#ifdef __ELF__
+# define FN_TYPE(fn) .type fn,@function
+# define FN_SIZE(fn) .size fn,.-fn
+#else
+# define FN_TYPE(fn)
+# define FN_SIZE(fn)
+#endif
+
+#ifdef __USER_LABEL_PREFIX__
+# define ASMNAME2(prefix, name) prefix ## name
+# define ASMNAME1(prefix, name) ASMNAME2(prefix, name)
+# define ASMNAME(name) ASMNAME1(__USER_LABEL_PREFIX__, name)
+#else
+# define ASMNAME(name) name
+#endif
+
+#define FUNC_BEGIN(fn) \
+ .globl ASMNAME(fn); \
+ FN_TYPE (ASMNAME(fn)); \
+ASMNAME(fn):
+
+#define FUNC_END(fn) FN_SIZE(ASMNAME(fn))
+
+#ifdef __AVX__
+# define MOVAPS vmovaps
+#else
+# define MOVAPS movaps
+#endif
.text
-regs_to_mem:
- MOVAPS %xmm6, (%rax)
- MOVAPS %xmm7, 0x10(%rax)
- MOVAPS %xmm8, 0x20(%rax)
- MOVAPS %xmm9, 0x30(%rax)
- MOVAPS %xmm10, 0x40(%rax)
- MOVAPS %xmm11, 0x50(%rax)
- MOVAPS %xmm12, 0x60(%rax)
- MOVAPS %xmm13, 0x70(%rax)
- MOVAPS %xmm14, 0x80(%rax)
- MOVAPS %xmm15, 0x90(%rax)
- mov %rsi, 0xa0(%rax)
- mov %rdi, 0xa8(%rax)
- mov %rbx, 0xb0(%rax)
- mov %rbp, 0xb8(%rax)
- mov %r12, 0xc0(%rax)
- mov %r13, 0xc8(%rax)
- mov %r14, 0xd0(%rax)
- mov %r15, 0xd8(%rax)
+FUNC_BEGIN(regs_to_mem)
+ MOVAPS %xmm6, (%r10)
+ MOVAPS %xmm7, 0x10(%r10)
+ MOVAPS %xmm8, 0x20(%r10)
+ MOVAPS %xmm9, 0x30(%r10)
+ MOVAPS %xmm10, 0x40(%r10)
+ MOVAPS %xmm11, 0x50(%r10)
+ MOVAPS %xmm12, 0x60(%r10)
+ MOVAPS %xmm13, 0x70(%r10)
+ MOVAPS %xmm14, 0x80(%r10)
+ MOVAPS %xmm15, 0x90(%r10)
+ mov %rsi, 0xa0(%r10)
+ mov %rdi, 0xa8(%r10)
+ mov %rbx, 0xb0(%r10)
+ mov %rbp, 0xb8(%r10)
+ mov %r12, 0xc0(%r10)
+ mov %r13, 0xc8(%r10)
+ mov %r14, 0xd0(%r10)
+ mov %r15, 0xd8(%r10)
retq
-
-mem_to_regs:
- MOVAPS (%rax), %xmm6
- MOVAPS 0x10(%rax),%xmm7
- MOVAPS 0x20(%rax),%xmm8
- MOVAPS 0x30(%rax),%xmm9
- MOVAPS 0x40(%rax),%xmm10
- MOVAPS 0x50(%rax),%xmm11
- MOVAPS 0x60(%rax),%xmm12
- MOVAPS 0x70(%rax),%xmm13
- MOVAPS 0x80(%rax),%xmm14
- MOVAPS 0x90(%rax),%xmm15
- mov 0xa0(%rax),%rsi
- mov 0xa8(%rax),%rdi
- mov 0xb0(%rax),%rbx
- mov 0xb8(%rax),%rbp
- mov 0xc0(%rax),%r12
- mov 0xc8(%rax),%r13
- mov 0xd0(%rax),%r14
- mov 0xd8(%rax),%r15
+FUNC_END(regs_to_mem)
+
+FUNC_BEGIN(mem_to_regs)
+ MOVAPS (%r10), %xmm6
+ MOVAPS 0x10(%r10),%xmm7
+ MOVAPS 0x20(%r10),%xmm8
+ MOVAPS 0x30(%r10),%xmm9
+ MOVAPS 0x40(%r10),%xmm10
+ MOVAPS 0x50(%r10),%xmm11
+ MOVAPS 0x60(%r10),%xmm12
+ MOVAPS 0x70(%r10),%xmm13
+ MOVAPS 0x80(%r10),%xmm14
+ MOVAPS 0x90(%r10),%xmm15
+ mov 0xa0(%r10),%rsi
+ mov 0xa8(%r10),%rdi
+ mov 0xb0(%r10),%rbx
+ mov 0xb8(%r10),%rbp
+ mov 0xc0(%r10),%r12
+ mov 0xc8(%r10),%r13
+ mov 0xd0(%r10),%r14
+ mov 0xd8(%r10),%r15
retq
+FUNC_END(mem_to_regs)
# NOTE: Not MT safe
-FUNC(do_test_unaligned)
- .cfi_startproc
+FUNC_BEGIN(do_test_unaligned)
# The below alignment checks are to verify correctness of the test
# its self.
# Verify that incoming stack is aligned + 8
- pushf
- test $0x8, %rsp
- jne L0
+ test $0xf, %rsp
+ je ASMNAME(do_test_body)
int $3 # Stack not unaligned
+FUNC_END(do_test_unaligned)
-FUNC(do_test_aligned)
+FUNC_BEGIN(do_test_aligned)
# Verify that incoming stack is aligned
- pushf
- test $0xf, %rsp
- je L0
+ test $0x8, %rsp
+ jne ASMNAME(do_test_body)
int $3 # Stack not aligned
-L0:
- popf
-
- # Save registers
- lea test_data(%rip), %rax
- call regs_to_mem
-
- # Load register with random data
- lea test_data + test_data_input(%rip), %rax
- call mem_to_regs
-
- # Save original return address
- pop %rax
- movq %rax, test_data + test_data_retaddr(%rip)
-
- # Call the test function
- call *test_data + test_data_fn(%rip)
-
- # Restore the original return address
- movq test_data + test_data_retaddr(%rip), %rcx
- push %rcx
-
- # Save test function return value and store resulting register values
- push %rax
- lea test_data + test_data_output(%rip), %rax
- call regs_to_mem
-
- # Restore registers
- lea test_data(%rip), %rax
- call mem_to_regs
- pop %rax
- retq
- .cfi_endproc
FUNC_END(do_test_aligned)
-FUNC_END(do_test_unaligned)
#endif /* __x86_64__ */
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c
index 2a011f5103d..caf9e6b5deb 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.c
@@ -46,6 +46,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
is then called. After the function returns, the value of all volatile
registers is verified against the random data and then restored. */
+/* { dg-do run } */
+/* { dg-additional-sources "do-test.S" } */
+/* { dg-additional-options "-Wall" } */
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -58,8 +62,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include <errno.h>
#include <ctype.h>
-#ifndef __x86_64__
-# error Test only valid on x86_64
+#if !defined(__x86_64__) || !defined(__SSE2__)
+# error Test only valid on x86_64 with -msse2
#endif
enum reg_data_sets
@@ -144,6 +148,81 @@ static __attribute__((ms_abi)) long
static int arbitrarily_fail;
static const char *argv0;
+
+#define PASTE_STR2(a) #a
+#define PASTE_STR1(a, b) PASTE_STR2(a ## b)
+#define PASTE_STR(a, b) PASTE_STR1(a, b)
+
+#ifdef __USER_LABEL_PREFIX__
+# define ASMNAME(name) PASTE_STR(__USER_LABEL_PREFIX__, name)
+#else
+# define ASMNAME(name) #name
+#endif
+
+#ifdef __MACH__
+# define LOAD_TEST_DATA_ADDR(dest) \
+ " mov " ASMNAME(test_data) "@GOTPCREL(%%rip), " dest "\n"
+#else
+# define LOAD_TEST_DATA_ADDR(dest) \
+ " lea " ASMNAME(test_data) "(%%rip), " dest "\n"
+#endif
+
+#define TEST_DATA_OFFSET(f) ((int)__builtin_offsetof(struct test_data, f))
+
+void __attribute__((used))
+do_test_body0 (void)
+{
+ __asm__ ("\n"
+ " .globl " ASMNAME(do_test_body) "\n"
+#ifdef __ELF__
+ " .type " ASMNAME(do_test_body) ",@function\n"
+#endif
+ ASMNAME(do_test_body) ":\n"
+ " # rax, r10 and r11 are usable here.\n"
+ "\n"
+ " # Save registers.\n"
+ LOAD_TEST_DATA_ADDR("%%rax")
+ " lea %p0(%%rax), %%r10\n"
+ " call " ASMNAME(regs_to_mem) "\n"
+ "\n"
+ " # Load registers with random data.\n"
+ " lea %p1(%%rax), %%r10\n"
+ " call " ASMNAME(mem_to_regs) "\n"
+ "\n"
+ " # Pop and save original return address.\n"
+ " pop %%r10\n"
+ " mov %%r10, %p4(%%rax)\n"
+ "\n"
+ " # Call the test function, after which rcx, rdx and r8-11\n"
+ " # become usable.\n"
+ " lea %p3(%%rax), %%rax\n"
+ " call *(%%rax)\n"
+ "\n"
+ " # Store resulting register values.\n"
+ LOAD_TEST_DATA_ADDR("%%rcx")
+ " lea %p2(%%rcx), %%r10\n"
+ " call " ASMNAME(regs_to_mem) "\n"
+ "\n"
+ " # Push the original return address.\n"
+ " lea %p4(%%rcx), %%r10\n"
+ " push (%%r10)\n"
+ "\n"
+ " # Restore registers.\n"
+ " lea %p0(%%rcx), %%r10\n"
+ " call " ASMNAME(mem_to_regs) "\n"
+ "\n"
+ " retq\n"
+#ifdef __ELF__
+ " .size " ASMNAME(do_test_body) ",.-" ASMNAME(do_test_body) "\n"
+#endif
+ ::
+ "i"(TEST_DATA_OFFSET(regdata[REG_SET_SAVE])),
+ "i"(TEST_DATA_OFFSET(regdata[REG_SET_INPUT])),
+ "i"(TEST_DATA_OFFSET(regdata[REG_SET_OUTPUT])),
+ "i"(TEST_DATA_OFFSET(fn)),
+ "i"(TEST_DATA_OFFSET(retaddr)) : "memory");
+}
+
static void __attribute__((noinline))
init_test (void *fn, const char *name, enum alignment_option alignment,
enum shrink_wrap_option shrink_wrap, long ret_expected)
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
index 26777e0b59f..87f81690bc7 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
+++ b/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
@@ -56,52 +56,48 @@ proc host_supports_c++11 {} {
# Exit immediately if this isn't a native x86_64 target.
if { (![istarget x86_64-*-*] && ![istarget i?86-*-*])
- || ![is-effective-target lp64] || ![isnative]
- || ![host_supports_c++11] } then {
- unsupported "$subdir"
+ || ![is-effective-target lp64] || ![isnative]
+ || ![host_supports_c++11] } then {
+
+ # Gate "unsupported" message return value of first runtest_file_p call.
+ if [runtest_file_p $runtests "$srcdir/$subdir/ms-sysv.c"] {
+ unsupported "$subdir"
+ }
return
}
-global GCC_RUNTEST_PARALLELIZE_DIR
-
proc runtest_ms_sysv { cflags generator_args } {
global GCC_UNDER_TEST HOSTCXX HOSTCXXFLAGS tmpdir srcdir subdir \
- parallel_dir next_test
+ TEST_ALWAYS_FLAGS runtests
set objdir "$tmpdir/ms-sysv"
set generator "$tmpdir/ms-sysv-generate.exe"
set generated_header "$objdir/ms-sysv-generated.h"
- set do_test_o "$objdir/do-test.o"
- set ms_sysv_o "$objdir/ms-sysv.o"
- set ms_sysv_exe "$objdir/ms-sysv.exe"
set status 0
set warn_flags "-Wall"
- set this_test $next_test
- incr next_test
-
- # Do parallelization here
- if [catch {set fd [open "$parallel_dir/$this_test" \
- [list RDWR CREAT EXCL]]} ] {
- if { [lindex $::errorCode 1] eq "EEXIST" } then {
- # Another job is running this test
- return
- } else {
- error "Failed to open $parallel_dir/$this_test: $::errorCode"
- set status 1
- }
- } else {
- close $fd
- }
# Detect when hard frame pointers are enabled (or required) so we know not
# to generate bp clobbers.
- if [regexp "^(.+ +| *)-(O0|fno-omit-frame-pointer|p|pg)( +.*)?$" \
- $cflags match] then {
+ if { [regexp "(^| )-(O0|fno-omit-frame-pointer|p|pg)( |$)" \
+ "$TEST_ALWAYS_FLAGS $cflags" match]
+ || [istarget *-*-solaris*] } then {
set generator_args "$generator_args --omit-rbp-clobbers"
}
- set descr "$subdir CFLAGS=\"$cflags\" generator_args=\"$generator_args\""
- verbose "$tmpdir: Running test $descr" 1
+ # Add all other flags
+ set escaped_generator_args [regsub -all " " $generator_args "\\ "]
+ set cflags "$cflags\"-DGEN_ARGS=$escaped_generator_args\""
+
+ gcc_parallel_test_enable 1
+ if ![runtest_file_p $runtests "$srcdir/$subdir/ms-sysv.c"] then {
+ return
+ }
+
+ #verbose "runtest_ms_sysv $cflags" 0
+
+ # Make sure there's no previous header file so that we can't accidentally
+ # pass if generation fails.
+ file delete -force $generated_header
# Cleanup any previous test in objdir
file delete -force $objdir
@@ -109,18 +105,16 @@ proc runtest_ms_sysv { cflags generator_args } {
# Build the generator (only needs to be done once).
set src "$srcdir/$subdir/gen.cc"
- if { $status == 0 } then {
- if { (![file exists "$generator"]) || ([file mtime "$generator"]
- < [file mtime "$src"]) } {
- # Temporarily switch to the environment for the host compiler.
- restore_ld_library_path_env_vars
- set cxx "$HOSTCXX $HOSTCXXFLAGS $warn_flags -std=c++11"
- set status [remote_exec host "$cxx -o $generator $src"]
- set status [lindex $status 0]
- set_ld_library_path_env_vars
- if { $status != 0 } then {
- warning "Could not build $subdir generator"
- }
+ if { (![file exists "$generator"]) || ([file mtime "$generator"]
+ < [file mtime "$src"]) } {
+ # Temporarily switch to the environment for the host compiler.
+ restore_ld_library_path_env_vars
+ set cxx "$HOSTCXX $HOSTCXXFLAGS $TEST_ALWAYS_FLAGS $warn_flags -std=c++11"
+ set status [remote_exec host "$cxx -o $generator $src"]
+ set status [lindex $status 0]
+ set_ld_library_path_env_vars
+ if { $status != 0 } then {
+ warning "Could not build $subdir generator"
}
}
@@ -133,75 +127,26 @@ proc runtest_ms_sysv { cflags generator_args } {
}
}
- set cc "$GCC_UNDER_TEST -I$objdir -I$srcdir/$subdir $cflags $warn_flags"
-
- # Assemble do-test.S
- set src "$srcdir/$subdir/do-test.S"
- if { $status == 0 } then {
- set status [remote_exec build "$cc -c -o $do_test_o $src"]
- set status [lindex $status 0]
- if { $status != 0 } then {
- warning "Could not assemble $src"
- }
- }
-
- # Build ms-sysv.c
- set src "$srcdir/$subdir/ms-sysv.c"
- if { $status == 0 } then {
- set status [remote_exec build "$cc -c -o $ms_sysv_o $src" "" "" "" 1200]
- set status [lindex $status 0]
- if { $status != 0 } then {
- warning "Could not build $src."
- }
- }
-
- # Link
- if { $status == 0 } then {
- set status [remote_exec build "$cc -o $ms_sysv_exe $ms_sysv_o $do_test_o"]
- set status [lindex $status 0]
- if { $status != 0 } then {
- warning "Link failed."
- }
- }
-
- # Execute
- if { $status == 0 } then {
- set status [remote_exec build "$ms_sysv_exe"]
- set status [lindex $status 0]
- }
-
- if { $status != 0 } then {
- fail $descr
- } else {
- pass $descr
- }
+ gcc_parallel_test_enable 0
+ dg-runtest $srcdir/$subdir/ms-sysv.c "$cflags" "-I$objdir -I$srcdir/$subdir $warn_flags"
+ gcc_parallel_test_enable 1
}
dg-init
-# Setup parallelization
-set next_test 0
-set parallel_dir "$env(GCC_RUNTEST_PARALLELIZE_DIR)/abi-ms-sysv"
-file mkdir "$env(GCC_RUNTEST_PARALLELIZE_DIR)"
-file mkdir "$parallel_dir"
-
-if { ![file isdirectory "$parallel_dir"] } then {
- error "Failed to create directory $parallel_dir: $::errorCode"
- return
-}
+# Standard test parameters.
+set gen_pcount_opts [list "-p0" "-p1" "-p5"]
+set base_cflags_arr [list " -O2 " " -O0 -g3 "]
-set gen_opts "-p0-5"
-set all_options [list "-O2" "-O0 -g3"]
+foreach gen_opts $gen_pcount_opts {
+ foreach cflags $base_cflags_arr {
+ # Run without -mcall-ms2sysv-xlogues always
+ runtest_ms_sysv "$cflags" "$gen_opts"
-# Run without -mcall-ms2sysv-xlogues always
-foreach opt $all_options {
- runtest_ms_sysv "$opt" "$gen_opts"
-}
-
-# Skip -mcall-ms2sysv-xlogues on Windows (not supported)
-if { ![istarget *-*-cygwin*] && ![istarget *-*-mingw*] } {
- foreach opt $all_options {
- runtest_ms_sysv "-mcall-ms2sysv-xlogues $opt" "$gen_opts"
+ # Skip unsupported -mcall-ms2sysv-xlogues on Windows
+ if { ![istarget *-*-cygwin*] && ![istarget *-*-mingw*] } {
+ runtest_ms_sysv "-mcall-ms2sysv-xlogues$cflags" "$gen_opts"
+ }
}
}
--
2.11.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/2] [libgcc]: PR80759 fixes for Solaris & Darwin
2017-07-02 5:06 ` [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin Daniel Santos
2017-07-02 5:10 ` [PATCH 1/2] [testsuite] PR80759 fix tests " Daniel Santos
@ 2017-07-02 5:10 ` Daniel Santos
2017-07-17 16:11 ` PING: [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin Daniel Santos
2 siblings, 0 replies; 12+ messages in thread
From: Daniel Santos @ 2017-07-02 5:10 UTC (permalink / raw)
To: gcc-patches, Uros Bizjak, Jan Hubicka, Iain Sandoe,
Ian Lance Taylor, Mike Stump, Rainer Orth
Cc: Bernd Edlinger
The -mcall-ms2sysv-xlogues option is supposed to work on Solaris and
Darwin, but my changes to config.host weren't adding the sav/res stubs
to libgcc and the assembly code wasn't compatible with their assemblers
either.
* Change config.host to build -mcall-ms2sysv-xlogues sav/res stubs 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 <daniel.santos@pobox.com>
---
libgcc/config.host | 6 +--
libgcc/config/i386/i386-asm.h | 89 ++++++++++++++++++++++++++----------------
libgcc/config/i386/resms64.S | 2 +-
libgcc/config/i386/resms64f.S | 2 +-
libgcc/config/i386/resms64fx.S | 2 +-
libgcc/config/i386/resms64x.S | 2 +-
libgcc/config/i386/savms64.S | 2 +-
libgcc/config/i386/savms64f.S | 2 +-
8 files changed, 64 insertions(+), 43 deletions(-)
diff --git a/libgcc/config.host b/libgcc/config.host
index cf62e0e54f7..bee3e931106 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -588,12 +588,12 @@ hppa*-*-openbsd*)
tmake_file="$tmake_file pa/t-openbsd"
;;
i[34567]86-*-darwin*)
- tmake_file="$tmake_file i386/t-crtpc t-crtfm"
+ tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
tm_file="$tm_file i386/darwin-lib.h"
extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
;;
x86_64-*-darwin*)
- tmake_file="$tmake_file i386/t-crtpc t-crtfm"
+ tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
tm_file="$tm_file i386/darwin-lib.h"
extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
;;
@@ -670,7 +670,7 @@ i[34567]86-*-rtems*)
extra_parts="$extra_parts crti.o crtn.o"
;;
i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
- tmake_file="$tmake_file i386/t-crtpc t-crtfm"
+ tmake_file="$tmake_file i386/t-crtpc t-crtfm i386/t-msabi"
extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o"
tm_file="${tm_file} i386/elf-lib.h"
md_unwind_header=i386/sol2-unwind.h
diff --git a/libgcc/config/i386/i386-asm.h b/libgcc/config/i386/i386-asm.h
index c613e9fd83d..1387fd24b4f 100644
--- a/libgcc/config/i386/i386-asm.h
+++ b/libgcc/config/i386/i386-asm.h
@@ -26,22 +26,45 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#ifndef I386_ASM_H
#define I386_ASM_H
+#include "auto-host.h"
+
+/* These macros currently support GNU/Linux, Solaris and Darwin. */
+
#ifdef __ELF__
-# define ELFFN(fn) .type fn,@function
+# define FN_TYPE(fn) .type fn,@function
+# define FN_SIZE(fn) .size fn,.-fn
+# ifdef HAVE_GAS_HIDDEN
+# define FN_HIDDEN(fn) .hidden fn
+# endif
+#else
+# define FN_TYPE(fn)
+# define FN_SIZE(fn)
+#endif
+
+#ifndef FN_HIDDEN
+# define FN_HIDDEN(fn)
+#endif
+
+#ifdef __USER_LABEL_PREFIX__
+# define ASMNAME2(prefix, name) prefix ## name
+# define ASMNAME1(prefix, name) ASMNAME2(prefix, name)
+# define ASMNAME(name) ASMNAME1(__USER_LABEL_PREFIX__, name)
#else
-# define ELFFN(fn)
+# define ASMNAME(name) name
#endif
-#define FUNC_START(fn) \
- .global fn; \
- ELFFN (fn); \
-fn:
+#define FUNC_BEGIN(fn) \
+ .globl ASMNAME(fn); \
+ FN_TYPE (ASMNAME(fn)); \
+ASMNAME(fn):
-#define HIDDEN_FUNC(fn)\
- FUNC_START (fn) \
- .hidden fn; \
+#define HIDDEN_FUNC(fn) \
+ .globl ASMNAME(fn); \
+ FN_TYPE(ASMNAME(fn)); \
+ FN_HIDDEN(ASMNAME(fn)); \
+ASMNAME(fn):
-#define FUNC_END(fn) .size fn,.-fn
+#define FUNC_END(fn) FN_SIZE(ASMNAME(fn))
#ifdef __SSE2__
# ifdef __AVX__
@@ -51,32 +74,30 @@ fn:
# endif
/* Save SSE registers 6-15. off is the offset of rax to get to xmm6. */
-.macro SSE_SAVE off=0
- MOVAPS %xmm15,(\off - 0x90)(%rax)
- MOVAPS %xmm14,(\off - 0x80)(%rax)
- MOVAPS %xmm13,(\off - 0x70)(%rax)
- MOVAPS %xmm12,(\off - 0x60)(%rax)
- MOVAPS %xmm11,(\off - 0x50)(%rax)
- MOVAPS %xmm10,(\off - 0x40)(%rax)
- MOVAPS %xmm9, (\off - 0x30)(%rax)
- MOVAPS %xmm8, (\off - 0x20)(%rax)
- MOVAPS %xmm7, (\off - 0x10)(%rax)
- MOVAPS %xmm6, \off(%rax)
-.endm
+#define SSE_SAVE \
+ MOVAPS %xmm15,-0x30(%rax); \
+ MOVAPS %xmm14,-0x20(%rax); \
+ MOVAPS %xmm13,-0x10(%rax); \
+ MOVAPS %xmm12, (%rax); \
+ MOVAPS %xmm11, 0x10(%rax); \
+ MOVAPS %xmm10, 0x20(%rax); \
+ MOVAPS %xmm9, 0x30(%rax); \
+ MOVAPS %xmm8, 0x40(%rax); \
+ MOVAPS %xmm7, 0x50(%rax); \
+ MOVAPS %xmm6, 0x60(%rax)
/* Restore SSE registers 6-15. off is the offset of rsi to get to xmm6. */
-.macro SSE_RESTORE off=0
- MOVAPS (\off - 0x90)(%rsi), %xmm15
- MOVAPS (\off - 0x80)(%rsi), %xmm14
- MOVAPS (\off - 0x70)(%rsi), %xmm13
- MOVAPS (\off - 0x60)(%rsi), %xmm12
- MOVAPS (\off - 0x50)(%rsi), %xmm11
- MOVAPS (\off - 0x40)(%rsi), %xmm10
- MOVAPS (\off - 0x30)(%rsi), %xmm9
- MOVAPS (\off - 0x20)(%rsi), %xmm8
- MOVAPS (\off - 0x10)(%rsi), %xmm7
- MOVAPS \off(%rsi), %xmm6
-.endm
+#define SSE_RESTORE \
+ MOVAPS -0x30(%rsi), %xmm15; \
+ MOVAPS -0x20(%rsi), %xmm14; \
+ MOVAPS -0x10(%rsi), %xmm13; \
+ MOVAPS (%rsi), %xmm12; \
+ MOVAPS 0x10(%rsi), %xmm11; \
+ MOVAPS 0x20(%rsi), %xmm10; \
+ MOVAPS 0x30(%rsi), %xmm9 ; \
+ MOVAPS 0x40(%rsi), %xmm8 ; \
+ MOVAPS 0x50(%rsi), %xmm7 ; \
+ MOVAPS 0x60(%rsi), %xmm6
#endif /* __SSE2__ */
#endif /* I386_ASM_H */
diff --git a/libgcc/config/i386/resms64.S b/libgcc/config/i386/resms64.S
index f47e2f066fb..f842c20a77a 100644
--- a/libgcc/config/i386/resms64.S
+++ b/libgcc/config/i386/resms64.S
@@ -43,7 +43,7 @@ HIDDEN_FUNC(__resms64_13)
mov -0x48(%rsi),%rbx
HIDDEN_FUNC(__resms64_12)
mov -0x40(%rsi),%rdi
- SSE_RESTORE off=0x60
+ SSE_RESTORE
mov -0x38(%rsi),%rsi
ret
FUNC_END(__resms64_12)
diff --git a/libgcc/config/i386/resms64f.S b/libgcc/config/i386/resms64f.S
index 817da60cf15..81946cda944 100644
--- a/libgcc/config/i386/resms64f.S
+++ b/libgcc/config/i386/resms64f.S
@@ -42,7 +42,7 @@ HIDDEN_FUNC(__resms64f_13)
mov -0x48(%rsi),%rbx
HIDDEN_FUNC(__resms64f_12)
mov -0x40(%rsi),%rdi
- SSE_RESTORE off=0x60
+ SSE_RESTORE
mov -0x38(%rsi),%rsi
ret
FUNC_END(__resms64f_12)
diff --git a/libgcc/config/i386/resms64fx.S b/libgcc/config/i386/resms64fx.S
index 5dba5848dee..acf34fa0837 100644
--- a/libgcc/config/i386/resms64fx.S
+++ b/libgcc/config/i386/resms64fx.S
@@ -43,7 +43,7 @@ HIDDEN_FUNC(__resms64fx_13)
mov -0x48(%rsi),%rbx
HIDDEN_FUNC(__resms64fx_12)
mov -0x40(%rsi),%rdi
- SSE_RESTORE off=0x60
+ SSE_RESTORE
mov -0x38(%rsi),%rsi
leaveq
ret
diff --git a/libgcc/config/i386/resms64x.S b/libgcc/config/i386/resms64x.S
index 7770447cf38..e27aab7d881 100644
--- a/libgcc/config/i386/resms64x.S
+++ b/libgcc/config/i386/resms64x.S
@@ -44,7 +44,7 @@ HIDDEN_FUNC(__resms64x_13)
mov -0x48(%rsi),%rbx
HIDDEN_FUNC(__resms64x_12)
mov -0x40(%rsi),%rdi
- SSE_RESTORE off=0x60
+ SSE_RESTORE
mov -0x38(%rsi),%rsi
mov %r10,%rsp
ret
diff --git a/libgcc/config/i386/savms64.S b/libgcc/config/i386/savms64.S
index 2067dd8614f..44dda46ec54 100644
--- a/libgcc/config/i386/savms64.S
+++ b/libgcc/config/i386/savms64.S
@@ -44,7 +44,7 @@ HIDDEN_FUNC(__savms64_13)
HIDDEN_FUNC(__savms64_12)
mov %rdi,-0x40(%rax)
mov %rsi,-0x38(%rax)
- SSE_SAVE off=0x60
+ SSE_SAVE
ret
FUNC_END(__savms64_12)
FUNC_END(__savms64_13)
diff --git a/libgcc/config/i386/savms64f.S b/libgcc/config/i386/savms64f.S
index 81583b6eb68..64e91ac0394 100644
--- a/libgcc/config/i386/savms64f.S
+++ b/libgcc/config/i386/savms64f.S
@@ -43,7 +43,7 @@ HIDDEN_FUNC(__savms64f_13)
HIDDEN_FUNC(__savms64f_12)
mov %rdi,-0x40(%rax)
mov %rsi,-0x38(%rax)
- SSE_SAVE off=0x60
+ SSE_SAVE
ret
FUNC_END(__savms64f_12)
FUNC_END(__savms64f_13)
--
2.11.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* PING: [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin
2017-07-02 5:06 ` [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin Daniel Santos
2017-07-02 5:10 ` [PATCH 1/2] [testsuite] PR80759 fix tests " Daniel Santos
2017-07-02 5:10 ` [PATCH 2/2] [libgcc]: PR80759 fixes for Solaris & Darwin Daniel Santos
@ 2017-07-17 16:11 ` Daniel Santos
2017-07-17 16:38 ` Mike Stump
2017-07-17 18:50 ` Uros Bizjak
2 siblings, 2 replies; 12+ messages in thread
From: Daniel Santos @ 2017-07-17 16:11 UTC (permalink / raw)
To: Uros Bizjak, Mike Stump, Iain Sandoe, Ian Lance Taylor
Cc: gcc-patches, Rainer Orth
https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00025.html
Uros,
Can you review changes for i386 please?
Mike or Iain,
Can one of you review changes for Darwin please? I'm not familiar with
the platform, although Rainer tested on Darwin for me.
Ian,
Can you review changes to libgcc please?
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 building with -mcall-ms2sysv-xlogues. The
> issues are detailed in the notes for each patch.
>
> I would particularly appreciate any feedback for Darwin as I am
> unfamiliar with the platform and Rainer and I have fashioned some of
> these changes by looking at other Darwin code in gcc.
>
> .../gcc.target/x86_64/abi/ms-sysv/do-test.S | 200
> ++++++++-----------
> .../gcc.target/x86_64/abi/ms-sysv/ms-sysv.c | 83 +++++++-
> .../gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp | 153 +++++---------
> libgcc/config.host | 6 +-
> libgcc/config/i386/i386-asm.h | 89 +++++----
> libgcc/config/i386/resms64.S | 2 +-
> libgcc/config/i386/resms64f.S | 2 +-
> libgcc/config/i386/resms64fx.S | 2 +-
> libgcc/config/i386/resms64x.S | 2 +-
> libgcc/config/i386/savms64.S | 2 +-
> libgcc/config/i386/savms64f.S | 2 +-
> 11 files changed, 274 insertions(+), 269 deletions(-)
>
>
> Many thanks to Rainer for all of his help on this!
>
> Thanks,
> Daniel
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: PING: [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin
2017-07-17 16:11 ` PING: [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin Daniel Santos
@ 2017-07-17 16:38 ` Mike Stump
2017-07-17 18:50 ` Uros Bizjak
1 sibling, 0 replies; 12+ messages in thread
From: Mike Stump @ 2017-07-17 16:38 UTC (permalink / raw)
To: Daniel Santos
Cc: Uros Bizjak, Iain Sandoe, Ian Lance Taylor, gcc-patches, Rainer Orth
On Jul 17, 2017, at 9:16 AM, Daniel Santos <daniel.santos@pobox.com> wrote:
>
> https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00025.html
> Mike or Iain,
> Can one of you review changes for Darwin please?
Ok.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: PING: [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin
2017-07-17 16:11 ` PING: [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin Daniel Santos
2017-07-17 16:38 ` Mike Stump
@ 2017-07-17 18:50 ` Uros Bizjak
1 sibling, 0 replies; 12+ messages in thread
From: Uros Bizjak @ 2017-07-17 18:50 UTC (permalink / raw)
To: Daniel Santos
Cc: Mike Stump, Iain Sandoe, Ian Lance Taylor, gcc-patches, Rainer Orth
On Mon, Jul 17, 2017 at 6:16 PM, Daniel Santos <daniel.santos@pobox.com> wrote:
> https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00025.html
>
> Uros,
> Can you review changes for i386 please?
x86 part is OK, so considering that Mike is OK with the Darwin part,
if there are no comments from Ian, the patch is OK for mainline.
Thanks,
Uros.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2017-07-17 18:50 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-19 6:29 [PATCH 0/2] [testsuite] PR80759 Fix test breakages on i386-pc-solaris2.* Daniel Santos
2017-05-19 6:29 ` [PATCH 1/2] [testsuite] Move non-standard parallelization support into new lib and fix flaw Daniel Santos
2017-05-19 6:50 ` [PATCH 2/2] [testsuite] PR 80759 Remove gas extensions from do-test.S, fix other problems Daniel Santos
2017-05-19 8:54 ` Rainer Orth
2017-05-20 0:38 ` Daniel Santos
2017-05-19 9:04 ` [PATCH 0/2] [testsuite] PR80759 Fix test breakages on i386-pc-solaris2.* Rainer Orth
2017-07-02 5:06 ` [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin Daniel Santos
2017-07-02 5:10 ` [PATCH 1/2] [testsuite] PR80759 fix tests " Daniel Santos
2017-07-02 5:10 ` [PATCH 2/2] [libgcc]: PR80759 fixes for Solaris & Darwin Daniel Santos
2017-07-17 16:11 ` PING: [PATCH v2 0/2] [testsuite, libgcc] PR80759 Fix FAILs on Solaris and Darwin Daniel Santos
2017-07-17 16:38 ` Mike Stump
2017-07-17 18:50 ` Uros Bizjak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).