[PATCH] i386 testsuite: cope with --enable-default-pie

2022-07-11 Thread Alexandre Oliva via Gcc-patches


Running the testsuite on a toolchain build with --enable-default-pie
had some unexpected fails.  Adjust the tests to tolerate the effects
of this configuration option on x86_64-linux-gnu and i686-linux-gnu.

The cet-sjlj* tests get offsets before the base symbol name with PIC
or PIE.  A single pattern covering both alternatives somehow triggered
two matches rather than the single expected match, thus my narrowing
the '.*' to not skip line breaks, but that was not enough.  Still
puzzled, I separated the patterns into nonpic and !nonpic, and we get
the expected matchcounts this way.

Tests for -mfentry require an mfentry effective target, which excludes
32-bit x86 with PIC or PIE enabled, that's why the patterns that
accept the PIC sym@RELOC annotations only cover x86_64.

The pr24414 test stores in an unadorned named variable in an old-style
asm statement, to check that such asm statements get an implicit
memory clobber.  Rewriting the asm into a GCC extended asm with the
variable as an output would remove the regression it checks against.
Problem is, the literal reference to the variable is not PIC, so it's
rejected by the elf64 linker with an error, and flagged with a warning
by the elf32 one.  We could presumably make the variable references
PIC-friendly with #ifdefs, but I doubt that's worth the trouble.  I'm
just arranging for the test to be skipped if PIC or PIE are enabled by
default.

Regstrapped on x86_64-linux-gnu, and also tested on i686-linux-gnu, with
and without --enable-default-pie on both platforms.  Ok to install?

PS: There's at least one additional FAIL with --enable-default-pie in
the trunk, namely gcc.target/i386/mvc7.c, compared with the build
without default PIE, but I believe that's out of scope for my current
project.  I could sneak in a fix for it if just rerunning this specific
testcase is enough; rerunning all the tests over it, not so much.  At
the end of the patch is the patchlet that enables this one test to also
pass on all 4 test combinations.  WDYT?


for  gcc/testsuite/ChangeLog

* gcc.target/i386/cet-sjlj-6a.c: Cope with --enable-default-pie.
* gcc.target/i386/cet-sjlj-6b.c: Likewise.
* gcc.target/i386/fentryname3.c: Likewise.
* gcc.target/i386/pr24414.c: Likewise.
* gcc.target/i386/pr93492-3.c: Likewise.
* gcc.target/i386/pr93492-5.c: Likewise.
* gcc.target/i386/pr98482-1.c: Likewise.
---
 gcc/testsuite/gcc.target/i386/cet-sjlj-6a.c |6 --
 gcc/testsuite/gcc.target/i386/cet-sjlj-6b.c |6 --
 gcc/testsuite/gcc.target/i386/fentryname3.c |3 ++-
 gcc/testsuite/gcc.target/i386/pr24414.c |1 +
 gcc/testsuite/gcc.target/i386/pr93492-3.c   |2 +-
 gcc/testsuite/gcc.target/i386/pr93492-5.c   |2 +-
 gcc/testsuite/gcc.target/i386/pr98482-1.c   |3 ++-
 7 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/gcc/testsuite/gcc.target/i386/cet-sjlj-6a.c 
b/gcc/testsuite/gcc.target/i386/cet-sjlj-6a.c
index 040b297aeb023..c3d0eb929424d 100644
--- a/gcc/testsuite/gcc.target/i386/cet-sjlj-6a.c
+++ b/gcc/testsuite/gcc.target/i386/cet-sjlj-6a.c
@@ -2,8 +2,10 @@
 /* { dg-require-effective-target maybe_x32 } */
 /* { dg-options "-O -maddress-mode=short -fcf-protection -mx32" } */
 /* { dg-final { scan-assembler-times "endbr64" 2 } } */
-/* { dg-final { scan-assembler-times "movq\t.*buf\\+8" 1 } } */
-/* { dg-final { scan-assembler-times "subq\tbuf\\+8" 1 } } */
+/* { dg-final { scan-assembler-times "movq\t\[^\n\]*buf\\+8" 1 { target nonpic 
} } } */
+/* { dg-final { scan-assembler-times "movq\t\[^\n\]*8\\+buf" 1 { target { ! 
nonpic } } } } */
+/* { dg-final { scan-assembler-times "subq\tbuf\\+8" 1 { target nonpic } } } */
+/* { dg-final { scan-assembler-times "subq\t8\\+buf" 1 { target { ! nonpic } } 
} } */
 /* { dg-final { scan-assembler-times "shrl\t\\\$3," 1 } } */
 /* { dg-final { scan-assembler-times "rdsspq" 2 } } */
 /* { dg-final { scan-assembler-times "incsspq" 2 } } */
diff --git a/gcc/testsuite/gcc.target/i386/cet-sjlj-6b.c 
b/gcc/testsuite/gcc.target/i386/cet-sjlj-6b.c
index b2376e710df6a..4c52685d7d1e1 100644
--- a/gcc/testsuite/gcc.target/i386/cet-sjlj-6b.c
+++ b/gcc/testsuite/gcc.target/i386/cet-sjlj-6b.c
@@ -2,8 +2,10 @@
 /* { dg-require-effective-target maybe_x32 } */
 /* { dg-options "-O -maddress-mode=long -fcf-protection -mx32" } */
 /* { dg-final { scan-assembler-times "endbr64" 2 } } */
-/* { dg-final { scan-assembler-times "movq\t.*buf\\+16" 1 } } */
-/* { dg-final { scan-assembler-times "subq\tbuf\\+16" 1 } } */
+/* { dg-final { scan-assembler-times "movq\t\[^\n\]*buf\\+16" 1 { target 
nonpic } } } */
+/* { dg-final { scan-assembler-times "movq\t\[^\n\]*16\\+buf" 1 { target { ! 
nonpic } } } } */
+/* { dg-final { scan-assembler-times "subq\tbuf\\+16" 1 { target nonpic } } } 
*/
+/* { dg-final { scan-assembler-times "subq\t16\\+buf" 1 { target { ! nonpic } 
} } } */
 /* { dg-final { scan-assembler-times "shrl\t\\\$3," 1 } } */
 /* { dg-final { scan-assembler-times "rds

Re: [PATCH] i386 testsuite: cope with --enable-default-pie

2022-07-11 Thread Mike Stump via Gcc-patches
On Jul 11, 2022, at 6:47 PM, Alexandre Oliva  wrote:
> 
> Running the testsuite on a toolchain build with --enable-default-pie
> had some unexpected fails.

> Regstrapped on x86_64-linux-gnu, and also tested on i686-linux-gnu, with
> and without --enable-default-pie on both platforms.  Ok to install?

Ok.

> PS: There's at least one additional FAIL with --enable-default-pie in
> the trunk, namely gcc.target/i386/mvc7.c

> WDYT?

Seems reasonable.


Re: [PATCH] i386 testsuite: cope with --enable-default-pie

2022-07-12 Thread Alexandre Oliva via Gcc-patches
On Jul 11, 2022, Mike Stump  wrote:

> Ok.

>> PS: There's at least one additional FAIL with --enable-default-pie in
>> the trunk, namely gcc.target/i386/mvc7.c

>> WDYT?

> Seems reasonable.

Thanks, here's what I installed.


i386 testsuite: cope with --enable-default-pie

Running the testsuite on a toolchain build with --enable-default-pie
had some unexpected fails.  Adjust the tests to tolerate the effects
of this configuration option on x86_64-linux-gnu and i686-linux-gnu.

The cet-sjlj* tests get offsets before the base symbol name with PIC
or PIE.  A single pattern covering both alternatives somehow triggered
two matches rather than the single expected match, thus my narrowing
the '.*' to not skip line breaks, but that was not enough.  Still
puzzled, I separated the patterns into nonpic and !nonpic, and we get
the expected matchcounts this way.

Tests for -mfentry require an mfentry effective target, which excludes
32-bit x86 with PIC or PIE enabled, that's why the patterns that
accept the PIC sym@RELOC annotations only cover x86_64.  mvc7 is
getting regexps extended to cover PIC reloc annotatios and all of the
named variants, and tightened to avoid unexpected '.' matches.

The pr24414 test stores in an unadorned named variable in an old-style
asm statement, to check that such asm statements get an implicit
memory clobber.  Rewriting the asm into a GCC extended asm with the
variable as an output would remove the regression it checks against.
Problem is, the literal reference to the variable is not PIC, so it's
rejected by the elf64 linker with an error, and flagged with a warning
by the elf32 one.  We could presumably make the variable references
PIC-friendly with #ifdefs, but I doubt that's worth the trouble.  I'm
just arranging for the test to be skipped if PIC or PIE are enabled by
default.


for  gcc/testsuite/ChangeLog

* gcc.target/i386/cet-sjlj-6a.c: Cope with --enable-default-pie.
* gcc.target/i386/cet-sjlj-6b.c: Likewise.
* gcc.target/i386/fentryname3.c: Likewise.
* gcc.target/i386/mvc7.c: Likewise.
* gcc.target/i386/pr24414.c: Likewise.
* gcc.target/i386/pr93492-3.c: Likewise.
* gcc.target/i386/pr93492-5.c: Likewise.
* gcc.target/i386/pr98482-1.c: Likewise.
---
 gcc/testsuite/gcc.target/i386/cet-sjlj-6a.c |6 --
 gcc/testsuite/gcc.target/i386/cet-sjlj-6b.c |6 --
 gcc/testsuite/gcc.target/i386/fentryname3.c |3 ++-
 gcc/testsuite/gcc.target/i386/mvc7.c|   12 ++--
 gcc/testsuite/gcc.target/i386/pr24414.c |1 +
 gcc/testsuite/gcc.target/i386/pr93492-3.c   |2 +-
 gcc/testsuite/gcc.target/i386/pr93492-5.c   |2 +-
 gcc/testsuite/gcc.target/i386/pr98482-1.c   |3 ++-
 8 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/gcc/testsuite/gcc.target/i386/cet-sjlj-6a.c 
b/gcc/testsuite/gcc.target/i386/cet-sjlj-6a.c
index 040b297aeb023..c3d0eb929424d 100644
--- a/gcc/testsuite/gcc.target/i386/cet-sjlj-6a.c
+++ b/gcc/testsuite/gcc.target/i386/cet-sjlj-6a.c
@@ -2,8 +2,10 @@
 /* { dg-require-effective-target maybe_x32 } */
 /* { dg-options "-O -maddress-mode=short -fcf-protection -mx32" } */
 /* { dg-final { scan-assembler-times "endbr64" 2 } } */
-/* { dg-final { scan-assembler-times "movq\t.*buf\\+8" 1 } } */
-/* { dg-final { scan-assembler-times "subq\tbuf\\+8" 1 } } */
+/* { dg-final { scan-assembler-times "movq\t\[^\n\]*buf\\+8" 1 { target nonpic 
} } } */
+/* { dg-final { scan-assembler-times "movq\t\[^\n\]*8\\+buf" 1 { target { ! 
nonpic } } } } */
+/* { dg-final { scan-assembler-times "subq\tbuf\\+8" 1 { target nonpic } } } */
+/* { dg-final { scan-assembler-times "subq\t8\\+buf" 1 { target { ! nonpic } } 
} } */
 /* { dg-final { scan-assembler-times "shrl\t\\\$3," 1 } } */
 /* { dg-final { scan-assembler-times "rdsspq" 2 } } */
 /* { dg-final { scan-assembler-times "incsspq" 2 } } */
diff --git a/gcc/testsuite/gcc.target/i386/cet-sjlj-6b.c 
b/gcc/testsuite/gcc.target/i386/cet-sjlj-6b.c
index b2376e710df6a..4c52685d7d1e1 100644
--- a/gcc/testsuite/gcc.target/i386/cet-sjlj-6b.c
+++ b/gcc/testsuite/gcc.target/i386/cet-sjlj-6b.c
@@ -2,8 +2,10 @@
 /* { dg-require-effective-target maybe_x32 } */
 /* { dg-options "-O -maddress-mode=long -fcf-protection -mx32" } */
 /* { dg-final { scan-assembler-times "endbr64" 2 } } */
-/* { dg-final { scan-assembler-times "movq\t.*buf\\+16" 1 } } */
-/* { dg-final { scan-assembler-times "subq\tbuf\\+16" 1 } } */
+/* { dg-final { scan-assembler-times "movq\t\[^\n\]*buf\\+16" 1 { target 
nonpic } } } */
+/* { dg-final { scan-assembler-times "movq\t\[^\n\]*16\\+buf" 1 { target { ! 
nonpic } } } } */
+/* { dg-final { scan-assembler-times "subq\tbuf\\+16" 1 { target nonpic } } } 
*/
+/* { dg-final { scan-assembler-times "subq\t16\\+buf" 1 { target { ! nonpic } 
} } } */
 /* { dg-final { scan-assembler-times "shrl\t\\\$3," 1 } } */
 /* { dg-final { scan-assembler-times "rdsspq" 2 } } */
 /* { dg-final { scan-assembler-times "incsspq" 2 } } */
diff -

Re: [PATCH] i386 testsuite: cope with --enable-default-pie

2022-07-26 Thread Alexandre Oliva via Gcc-patches
On Jul 11, 2022, Mike Stump  wrote:

> On Jul 11, 2022, at 6:47 PM, Alexandre Oliva  wrote:
>> 
>> Running the testsuite on a toolchain build with --enable-default-pie
>> had some unexpected fails.

>> Regstrapped on x86_64-linux-gnu, and also tested on i686-linux-gnu, with
>> and without --enable-default-pie on both platforms.  Ok to install?

> Ok.

Here's some more:


i386 PIE: testsuite: cope with default pie on ia32

This patch continues the effort of cleaning up the testsuite for
--enable-default-pie; the focus herein is mostly 32-bit x86.

As much as I tried to avoid it, most of the changes to the testsuite
simply disable PIC/PIE, for reasons I'm going to detail below.

static-cdtor1.C gets new patterns to match PIE output.  Some
avx512fp16 tests change only in register allocation, because of the
register used to hold the GOT base address.  Interrupt tests changed
in this regard as well, but here it also affected register saving and
restoring.

The previous patch modified cet-sjlj tests, mentioning a single regexp
covering PIC and nonPIC got incorrect match counts.  I found out that
adding ?: to parenthesized subpatterns avoids miscounting matches.
Other tests that count certain kinds of insns needed adjustment over
insns in get_pc_thunk, extra loads from the GOT, or extra adds to
compute addresses.  In one case, namely stack-check-12, it is nonPIC
that had extra insns, that PIC gets rid of, or rather, pushing and
popping the PIC register obviates the dummy push and matching pop used
for stack probing in nonpic.

pr95126 tests were supposed to optimize loads into known constants,
but the @GOTOFF addresses prevent that for reasons I have not
investigated, but that would be clearly desirable, so I've XFAILed
these.  pr95852 is another case of missed optimization: sibcalls are
not possible when the PIC register needs to be set up for the call,
which prevents the expected constant propagation to the return block;
I have adjusted the codegen expectations of these tests.

As for tests that disable PIE...  Some are judgment calls, that fail
for similar reasons as tests described above, but I chose not to
adjust their expectations; others are just not possible with PIC, or
not worth the effort of adjusting.

anon[14].C check for no global or comdat symbols, respectively, but
-fPIE outputs get_pc_thunk, as global hidden comdat.
initlist-const1.C wants .rodata and checks for no .data, but PIC
outputs constant data that needs relocations in .data.rel.ro.local.
no-stack-protector-attr-3.C and stackprotectexplicit2.C count
stack_check_fail matches; -fPIE calls stack_check_fail_local instead,
which matches the pattern, but this symbol is also marked as .hidden,
so the match count needs to be adjusted.

pr71694.C checks for no movl, but get_pc_thunk contains one.
pr102892-1.c is a missed optimization, ivopts creates an induction
variable because the array address can't be part of an indexing base
address with PIE, and that ends up stopping a load from being resolved
to a constant as expected.  sibcall-11.c needs @PLT for the call,
which requires the PIC register, which makes sibcalling impossible.
builtin-self.c, in turn, expects no calls, but PIC calls get_pc_thunk.

avx* vector tests that had PIE disabled were affected in that the need
for GOT-based addressing modes changed instruction selection in ways
that deviated from the expectations of the tests.  Ditto other vector
tests: pr100865*, pr101796-1, pr101846, pr101989-broadcast-1, and
pr102021, pr54855-[37], and pr90773-17.

pr15184* tests need a PIC register to access global variables, which
affects register allocation, so the patterns would have to be
adjusted.  pr27971 can't use the expected addressing mode to
dereference the array with PIC, so it ends up selecting an indexed
addressing mode, obviating the expected separate shift insn.

pr70263-2 is another case that implicitly expects a sibcall,
impossible because of the need for the PIC register; without a
sibcall, the expected REG_EQUIV for the reuse of the stack slot of an
incoming argument does not occur.  pr78035 duplicates the final
compare in both then and else blocks with PIE, which deviates from the
expected cmp count.  pr81736-[57] test for no frame pointer, but the
PIC register assignment to a call-saved register forces a frame; the
former ends up not using the PIC register, but it's only optimized out
after committing to a stack frame to preserve it.  pr85620-6 also
expects a tail call in a situation that is impossible on ia32 PIC.

pr85667-6 doesn't expect the movl in get_pc_thunk.  pr93492-5 tests
-mfentry, not available with PIC on ia32.  pr96539 expects a
tail-call, to avoid copying a large-ish struct argument, but the call
requires the PIC register, so no tail-call.  stack-prot-sym.c expects
a nonpic addressing mode.

Regstrapped on x86_64-linux-gnu; also tested, along with other patches
I'm posting today with "i386 PIE" in the subject, and compared
default-PIE and default-nonPIE results o

Re: [PATCH] i386 testsuite: cope with --enable-default-pie

2022-08-09 Thread Alexandre Oliva via Gcc-patches
Ping?

https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598276.html

On Jul 27, 2022, Alexandre Oliva  wrote:

> for  gcc/testsuite/ChangeLog

>   * g++.dg/abi/anon1.C: Disable pie on ia32.
>   * g++.dg/abi/anon4.C: Likewise.
>   * g++.dg/cpp0x/initlist-const1.C: Likewise.
>   * g++.dg/no-stack-protector-attr-3.C: Likewise.
>   * g++.dg/stackprotectexplicit2.C: Likewise.
>   * g++.dg/pr71694.C: Likewise.
>   * gcc.dg/pr102892-1.c: Likewise.
>   * gcc.dg/sibcall-11.c: Likewise.
>   * gcc.dg/torture/builtin-self.c: Likewise.
>   * gcc.target/i386/avx2-dest-false-dep-for-glc.c: Likewise.
>   * gcc.target/i386/avx512bf16-cvtsbh2ss-1.c: Likewise.
>   * gcc.target/i386/avx512f-broadcast-pr87767-1.c: Likewise.
>   * gcc.target/i386/avx512f-broadcast-pr87767-3.c: Likewise.
>   * gcc.target/i386/avx512f-broadcast-pr87767-5.c: Likewise.
>   * gcc.target/i386/avx512f-broadcast-pr87767-7.c: Likewise.
>   * gcc.target/i386/avx512fp16-broadcast-1.c: Likewise.
>   * gcc.target/i386/avx512fp16-pr101846.c: Likewise.
>   * gcc.target/i386/avx512vl-broadcast-pr87767-1.c: Likewise.
>   * gcc.target/i386/avx512vl-broadcast-pr87767-3.c: Likewise.
>   * gcc.target/i386/avx512vl-broadcast-pr87767-5.c: Likewise.
>   * gcc.target/i386/pr100865-2.c: Likewise.
>   * gcc.target/i386/pr100865-3.c: Likewise.
>   * gcc.target/i386/pr100865-4a.c: Likewise.
>   * gcc.target/i386/pr100865-4b.c: Likewise.
>   * gcc.target/i386/pr100865-5a.c: Likewise.
>   * gcc.target/i386/pr100865-5b.c: Likewise.
>   * gcc.target/i386/pr100865-6a.c: Likewise.
>   * gcc.target/i386/pr100865-6b.c: Likewise.
>   * gcc.target/i386/pr100865-6c.c: Likewise.
>   * gcc.target/i386/pr100865-7b.c: Likewise.
>   * gcc.target/i386/pr101796-1.c: Likewise.
>   * gcc.target/i386/pr101846-2.c: Likewise.
>   * gcc.target/i386/pr101989-broadcast-1.c: Likewise.
>   * gcc.target/i386/pr102021.c: Likewise.
>   * gcc.target/i386/pr90773-17.c: Likewise.
>   * gcc.target/i386/pr54855-3.c: Likewise.
>   * gcc.target/i386/pr54855-7.c: Likewise.
>   * gcc.target/i386/pr15184-1.c: Likewise.
>   * gcc.target/i386/pr15184-2.c: Likewise.
>   * gcc.target/i386/pr27971.c: Likewise.
>   * gcc.target/i386/pr70263-2.c: Likewise.
>   * gcc.target/i386/pr78035.c: Likewise.
>   * gcc.target/i386/pr81736-5.c: Likewise.
>   * gcc.target/i386/pr81736-7.c: Likewise.
>   * gcc.target/i386/pr85620-6.c: Likewise.
>   * gcc.target/i386/pr85667-6.c: Likewise.
>   * gcc.target/i386/pr93492-5.c: Likewise.
>   * gcc.target/i386/pr96539.c: Likewise.
>   PR target/81708 (%gs:my_guard)
>   * gcc.target/i386/stack-prot-sym.c: Likewise.
>   * g++.dg/init/static-cdtor1.C: Add alternate patterns for PIC.
>   * gcc.target/i386/avx512fp16-vcvtsh2si-1a.c: Extend patterns
>   for PIC/PIE register allocation.
>   * gcc.target/i386/pr100704-3.c: Likewise.
>   * gcc.target/i386/avx512fp16-vcvtsh2usi-1a.c: Likewise.
>   * gcc.target/i386/avx512fp16-vcvttsh2si-1a.c: Likewise.
>   * gcc.target/i386/avx512fp16-vcvttsh2usi-1a.c: Likewise.
>   * gcc.target/i386/avx512fp16-vmovsh-1a.c: Likewise.
>   * gcc.target/i386/interrupt-11.c: Likewise, allowing for
>   preservation of the PIC register.
>   * gcc.target/i386/interrupt-12.c: Likewise.
>   * gcc.target/i386/interrupt-13.c: Likewise.
>   * gcc.target/i386/interrupt-15.c: Likewise.
>   * gcc.target/i386/interrupt-16.c: Likewise.
>   * gcc.target/i386/interrupt-17.c: Likewise.
>   * gcc.target/i386/interrupt-8.c: Likewise.
>   * gcc.target/i386/cet-sjlj-6a.c: Combine patterns from
>   previous change.
>   * gcc.target/i386/cet-sjlj-6b.c: Likewise.
>   * gcc.target/i386/pad-10.c: Accept insns in get_pc_thunk.
>   * gcc.target/i386/pr70321.c: Likewise.
>   * gcc.target/i386/pr81563.c: Likewise.
>   * gcc.target/i386/pr84278.c: Likewise.
>   * gcc.target/i386/pr90773-2.c: Likewise, plus extra loads from
>   the GOT.
>   * gcc.target/i386/pr90773-3.c: Likewise.
>   * gcc.target/i386/pr94913-2.c: Accept additional PIC insns.
>   * gcc.target/i386/stack-check-17.c: Likewise.
>   * gcc.target/i386/stack-check-12.c: Do not require dummy stack
>   probing obviated with PIC.
>   * gcc.target/i386/pr95126-m32-1.c: Expect missed optimization
>   with PIC.
>   * gcc.target/i386/pr95126-m32-2.c: Likewise.
>   * gcc.target/i386/pr95852-2.c: Accept different optimization
>   with PIC.
>   * gcc.target/i386/pr95852-4.c: Likewise.


-- 
Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/
   Free Software Activist   GNU Toolchain Engineer
Disinformation flourishes because many people care deeply about injustice
but very few check the facts.  Ask me about 


Re: [PATCH] i386 testsuite: cope with --enable-default-pie

2022-08-09 Thread Fangrui Song via Gcc-patches
On Tue, Aug 9, 2022 at 7:00 AM Alexandre Oliva via Gcc-patches
 wrote:
>
> Ping?
>
> https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598276.html

This is great! And hope
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103398 can be
re-considered, at least for some ports :)

> On Jul 27, 2022, Alexandre Oliva  wrote:
>
> > for  gcc/testsuite/ChangeLog
>
> >   * g++.dg/abi/anon1.C: Disable pie on ia32.
> >   * g++.dg/abi/anon4.C: Likewise.
> >   * g++.dg/cpp0x/initlist-const1.C: Likewise.
> >   * g++.dg/no-stack-protector-attr-3.C: Likewise.
> >   * g++.dg/stackprotectexplicit2.C: Likewise.
> >   * g++.dg/pr71694.C: Likewise.
> >   * gcc.dg/pr102892-1.c: Likewise.
> >   * gcc.dg/sibcall-11.c: Likewise.
> >   * gcc.dg/torture/builtin-self.c: Likewise.
> >   * gcc.target/i386/avx2-dest-false-dep-for-glc.c: Likewise.
> >   * gcc.target/i386/avx512bf16-cvtsbh2ss-1.c: Likewise.
> >   * gcc.target/i386/avx512f-broadcast-pr87767-1.c: Likewise.
> >   * gcc.target/i386/avx512f-broadcast-pr87767-3.c: Likewise.
> >   * gcc.target/i386/avx512f-broadcast-pr87767-5.c: Likewise.
> >   * gcc.target/i386/avx512f-broadcast-pr87767-7.c: Likewise.
> >   * gcc.target/i386/avx512fp16-broadcast-1.c: Likewise.
> >   * gcc.target/i386/avx512fp16-pr101846.c: Likewise.
> >   * gcc.target/i386/avx512vl-broadcast-pr87767-1.c: Likewise.
> >   * gcc.target/i386/avx512vl-broadcast-pr87767-3.c: Likewise.
> >   * gcc.target/i386/avx512vl-broadcast-pr87767-5.c: Likewise.
> >   * gcc.target/i386/pr100865-2.c: Likewise.
> >   * gcc.target/i386/pr100865-3.c: Likewise.
> >   * gcc.target/i386/pr100865-4a.c: Likewise.
> >   * gcc.target/i386/pr100865-4b.c: Likewise.
> >   * gcc.target/i386/pr100865-5a.c: Likewise.
> >   * gcc.target/i386/pr100865-5b.c: Likewise.
> >   * gcc.target/i386/pr100865-6a.c: Likewise.
> >   * gcc.target/i386/pr100865-6b.c: Likewise.
> >   * gcc.target/i386/pr100865-6c.c: Likewise.
> >   * gcc.target/i386/pr100865-7b.c: Likewise.
> >   * gcc.target/i386/pr101796-1.c: Likewise.
> >   * gcc.target/i386/pr101846-2.c: Likewise.
> >   * gcc.target/i386/pr101989-broadcast-1.c: Likewise.
> >   * gcc.target/i386/pr102021.c: Likewise.
> >   * gcc.target/i386/pr90773-17.c: Likewise.
> >   * gcc.target/i386/pr54855-3.c: Likewise.
> >   * gcc.target/i386/pr54855-7.c: Likewise.
> >   * gcc.target/i386/pr15184-1.c: Likewise.
> >   * gcc.target/i386/pr15184-2.c: Likewise.
> >   * gcc.target/i386/pr27971.c: Likewise.
> >   * gcc.target/i386/pr70263-2.c: Likewise.
> >   * gcc.target/i386/pr78035.c: Likewise.
> >   * gcc.target/i386/pr81736-5.c: Likewise.
> >   * gcc.target/i386/pr81736-7.c: Likewise.
> >   * gcc.target/i386/pr85620-6.c: Likewise.
> >   * gcc.target/i386/pr85667-6.c: Likewise.
> >   * gcc.target/i386/pr93492-5.c: Likewise.
> >   * gcc.target/i386/pr96539.c: Likewise.
> >   PR target/81708 (%gs:my_guard)
> >   * gcc.target/i386/stack-prot-sym.c: Likewise.
> >   * g++.dg/init/static-cdtor1.C: Add alternate patterns for PIC.
> >   * gcc.target/i386/avx512fp16-vcvtsh2si-1a.c: Extend patterns
> >   for PIC/PIE register allocation.
> >   * gcc.target/i386/pr100704-3.c: Likewise.
> >   * gcc.target/i386/avx512fp16-vcvtsh2usi-1a.c: Likewise.
> >   * gcc.target/i386/avx512fp16-vcvttsh2si-1a.c: Likewise.
> >   * gcc.target/i386/avx512fp16-vcvttsh2usi-1a.c: Likewise.
> >   * gcc.target/i386/avx512fp16-vmovsh-1a.c: Likewise.
> >   * gcc.target/i386/interrupt-11.c: Likewise, allowing for
> >   preservation of the PIC register.
> >   * gcc.target/i386/interrupt-12.c: Likewise.
> >   * gcc.target/i386/interrupt-13.c: Likewise.
> >   * gcc.target/i386/interrupt-15.c: Likewise.
> >   * gcc.target/i386/interrupt-16.c: Likewise.
> >   * gcc.target/i386/interrupt-17.c: Likewise.
> >   * gcc.target/i386/interrupt-8.c: Likewise.
> >   * gcc.target/i386/cet-sjlj-6a.c: Combine patterns from
> >   previous change.
> >   * gcc.target/i386/cet-sjlj-6b.c: Likewise.
> >   * gcc.target/i386/pad-10.c: Accept insns in get_pc_thunk.
> >   * gcc.target/i386/pr70321.c: Likewise.
> >   * gcc.target/i386/pr81563.c: Likewise.
> >   * gcc.target/i386/pr84278.c: Likewise.
> >   * gcc.target/i386/pr90773-2.c: Likewise, plus extra loads from
> >   the GOT.
> >   * gcc.target/i386/pr90773-3.c: Likewise.
> >   * gcc.target/i386/pr94913-2.c: Accept additional PIC insns.
> >   * gcc.target/i386/stack-check-17.c: Likewise.
> >   * gcc.target/i386/stack-check-12.c: Do not require dummy stack
> >   probing obviated with PIC.
> >   * gcc.target/i386/pr95126-m32-1.c: Expect missed optimization
> >   with PIC.
> >   * gcc.target/i386/pr95126-m32-2.c: Likewise.
> >   * gcc.target/i386/pr95852-2.c: Accept different optimization
> >   with PIC

Re: [PATCH] i386 testsuite: cope with --enable-default-pie

2022-08-09 Thread Alexandre Oliva via Gcc-patches
On Aug  9, 2022, Alexandre Oliva  wrote:

> Ping?
> https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598276.html

Oops, sorry, I linked to the wrong patch.  This is the one I meant to ping:

https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598874.html

> On Jul 27, 2022, Alexandre Oliva  wrote:

>> for  gcc/testsuite/ChangeLog

>> * g++.dg/abi/anon1.C: Disable pie on ia32.
>> * g++.dg/abi/anon4.C: Likewise.
>> * g++.dg/cpp0x/initlist-const1.C: Likewise.
>> * g++.dg/no-stack-protector-attr-3.C: Likewise.
>> * g++.dg/stackprotectexplicit2.C: Likewise.
>> * g++.dg/pr71694.C: Likewise.
>> * gcc.dg/pr102892-1.c: Likewise.
>> * gcc.dg/sibcall-11.c: Likewise.
>> * gcc.dg/torture/builtin-self.c: Likewise.
>> * gcc.target/i386/avx2-dest-false-dep-for-glc.c: Likewise.
>> * gcc.target/i386/avx512bf16-cvtsbh2ss-1.c: Likewise.
>> * gcc.target/i386/avx512f-broadcast-pr87767-1.c: Likewise.
>> * gcc.target/i386/avx512f-broadcast-pr87767-3.c: Likewise.
>> * gcc.target/i386/avx512f-broadcast-pr87767-5.c: Likewise.
>> * gcc.target/i386/avx512f-broadcast-pr87767-7.c: Likewise.
>> * gcc.target/i386/avx512fp16-broadcast-1.c: Likewise.
>> * gcc.target/i386/avx512fp16-pr101846.c: Likewise.
>> * gcc.target/i386/avx512vl-broadcast-pr87767-1.c: Likewise.
>> * gcc.target/i386/avx512vl-broadcast-pr87767-3.c: Likewise.
>> * gcc.target/i386/avx512vl-broadcast-pr87767-5.c: Likewise.
>> * gcc.target/i386/pr100865-2.c: Likewise.
>> * gcc.target/i386/pr100865-3.c: Likewise.
>> * gcc.target/i386/pr100865-4a.c: Likewise.
>> * gcc.target/i386/pr100865-4b.c: Likewise.
>> * gcc.target/i386/pr100865-5a.c: Likewise.
>> * gcc.target/i386/pr100865-5b.c: Likewise.
>> * gcc.target/i386/pr100865-6a.c: Likewise.
>> * gcc.target/i386/pr100865-6b.c: Likewise.
>> * gcc.target/i386/pr100865-6c.c: Likewise.
>> * gcc.target/i386/pr100865-7b.c: Likewise.
>> * gcc.target/i386/pr101796-1.c: Likewise.
>> * gcc.target/i386/pr101846-2.c: Likewise.
>> * gcc.target/i386/pr101989-broadcast-1.c: Likewise.
>> * gcc.target/i386/pr102021.c: Likewise.
>> * gcc.target/i386/pr90773-17.c: Likewise.
>> * gcc.target/i386/pr54855-3.c: Likewise.
>> * gcc.target/i386/pr54855-7.c: Likewise.
>> * gcc.target/i386/pr15184-1.c: Likewise.
>> * gcc.target/i386/pr15184-2.c: Likewise.
>> * gcc.target/i386/pr27971.c: Likewise.
>> * gcc.target/i386/pr70263-2.c: Likewise.
>> * gcc.target/i386/pr78035.c: Likewise.
>> * gcc.target/i386/pr81736-5.c: Likewise.
>> * gcc.target/i386/pr81736-7.c: Likewise.
>> * gcc.target/i386/pr85620-6.c: Likewise.
>> * gcc.target/i386/pr85667-6.c: Likewise.
>> * gcc.target/i386/pr93492-5.c: Likewise.
>> * gcc.target/i386/pr96539.c: Likewise.
>> PR target/81708 (%gs:my_guard)
>> * gcc.target/i386/stack-prot-sym.c: Likewise.
>> * g++.dg/init/static-cdtor1.C: Add alternate patterns for PIC.
>> * gcc.target/i386/avx512fp16-vcvtsh2si-1a.c: Extend patterns
>> for PIC/PIE register allocation.
>> * gcc.target/i386/pr100704-3.c: Likewise.
>> * gcc.target/i386/avx512fp16-vcvtsh2usi-1a.c: Likewise.
>> * gcc.target/i386/avx512fp16-vcvttsh2si-1a.c: Likewise.
>> * gcc.target/i386/avx512fp16-vcvttsh2usi-1a.c: Likewise.
>> * gcc.target/i386/avx512fp16-vmovsh-1a.c: Likewise.
>> * gcc.target/i386/interrupt-11.c: Likewise, allowing for
>> preservation of the PIC register.
>> * gcc.target/i386/interrupt-12.c: Likewise.
>> * gcc.target/i386/interrupt-13.c: Likewise.
>> * gcc.target/i386/interrupt-15.c: Likewise.
>> * gcc.target/i386/interrupt-16.c: Likewise.
>> * gcc.target/i386/interrupt-17.c: Likewise.
>> * gcc.target/i386/interrupt-8.c: Likewise.
>> * gcc.target/i386/cet-sjlj-6a.c: Combine patterns from
>> previous change.
>> * gcc.target/i386/cet-sjlj-6b.c: Likewise.
>> * gcc.target/i386/pad-10.c: Accept insns in get_pc_thunk.
>> * gcc.target/i386/pr70321.c: Likewise.
>> * gcc.target/i386/pr81563.c: Likewise.
>> * gcc.target/i386/pr84278.c: Likewise.
>> * gcc.target/i386/pr90773-2.c: Likewise, plus extra loads from
>> the GOT.
>> * gcc.target/i386/pr90773-3.c: Likewise.
>> * gcc.target/i386/pr94913-2.c: Accept additional PIC insns.
>> * gcc.target/i386/stack-check-17.c: Likewise.
>> * gcc.target/i386/stack-check-12.c: Do not require dummy stack
>> probing obviated with PIC.
>> * gcc.target/i386/pr95126-m32-1.c: Expect missed optimization
>> with PIC.
>> * gcc.target/i386/pr95126-m32-2.c: Likewise.
>> * gcc.target/i386/pr95852-2.c: Accept different optimization
>> with PIC.
>> * gcc.target/i386/pr95852-4.c: Likewise.

-- 
Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/
   Free Software Activist   GNU Toolchain Engineer
Disinformation flourishes because many people care deeply about injustice
but very few check the facts.  Ask me about 


Re: [PATCH] i386 testsuite: cope with --enable-default-pie

2022-08-14 Thread Hongtao Liu via Gcc-patches
On Wed, Aug 10, 2022 at 1:42 PM Alexandre Oliva via Gcc-patches
 wrote:
>
> On Aug  9, 2022, Alexandre Oliva  wrote:
>
> > Ping?
> > https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598276.html
>
> Oops, sorry, I linked to the wrong patch.  This is the one I meant to ping:
>
> https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598874.html
Patch LGTM.
>
> > On Jul 27, 2022, Alexandre Oliva  wrote:
>
> >> for  gcc/testsuite/ChangeLog
>
> >> * g++.dg/abi/anon1.C: Disable pie on ia32.
> >> * g++.dg/abi/anon4.C: Likewise.
> >> * g++.dg/cpp0x/initlist-const1.C: Likewise.
> >> * g++.dg/no-stack-protector-attr-3.C: Likewise.
> >> * g++.dg/stackprotectexplicit2.C: Likewise.
> >> * g++.dg/pr71694.C: Likewise.
> >> * gcc.dg/pr102892-1.c: Likewise.
> >> * gcc.dg/sibcall-11.c: Likewise.
> >> * gcc.dg/torture/builtin-self.c: Likewise.
> >> * gcc.target/i386/avx2-dest-false-dep-for-glc.c: Likewise.
> >> * gcc.target/i386/avx512bf16-cvtsbh2ss-1.c: Likewise.
> >> * gcc.target/i386/avx512f-broadcast-pr87767-1.c: Likewise.
> >> * gcc.target/i386/avx512f-broadcast-pr87767-3.c: Likewise.
> >> * gcc.target/i386/avx512f-broadcast-pr87767-5.c: Likewise.
> >> * gcc.target/i386/avx512f-broadcast-pr87767-7.c: Likewise.
> >> * gcc.target/i386/avx512fp16-broadcast-1.c: Likewise.
> >> * gcc.target/i386/avx512fp16-pr101846.c: Likewise.
> >> * gcc.target/i386/avx512vl-broadcast-pr87767-1.c: Likewise.
> >> * gcc.target/i386/avx512vl-broadcast-pr87767-3.c: Likewise.
> >> * gcc.target/i386/avx512vl-broadcast-pr87767-5.c: Likewise.
> >> * gcc.target/i386/pr100865-2.c: Likewise.
> >> * gcc.target/i386/pr100865-3.c: Likewise.
> >> * gcc.target/i386/pr100865-4a.c: Likewise.
> >> * gcc.target/i386/pr100865-4b.c: Likewise.
> >> * gcc.target/i386/pr100865-5a.c: Likewise.
> >> * gcc.target/i386/pr100865-5b.c: Likewise.
> >> * gcc.target/i386/pr100865-6a.c: Likewise.
> >> * gcc.target/i386/pr100865-6b.c: Likewise.
> >> * gcc.target/i386/pr100865-6c.c: Likewise.
> >> * gcc.target/i386/pr100865-7b.c: Likewise.
> >> * gcc.target/i386/pr101796-1.c: Likewise.
> >> * gcc.target/i386/pr101846-2.c: Likewise.
> >> * gcc.target/i386/pr101989-broadcast-1.c: Likewise.
> >> * gcc.target/i386/pr102021.c: Likewise.
> >> * gcc.target/i386/pr90773-17.c: Likewise.
> >> * gcc.target/i386/pr54855-3.c: Likewise.
> >> * gcc.target/i386/pr54855-7.c: Likewise.
> >> * gcc.target/i386/pr15184-1.c: Likewise.
> >> * gcc.target/i386/pr15184-2.c: Likewise.
> >> * gcc.target/i386/pr27971.c: Likewise.
> >> * gcc.target/i386/pr70263-2.c: Likewise.
> >> * gcc.target/i386/pr78035.c: Likewise.
> >> * gcc.target/i386/pr81736-5.c: Likewise.
> >> * gcc.target/i386/pr81736-7.c: Likewise.
> >> * gcc.target/i386/pr85620-6.c: Likewise.
> >> * gcc.target/i386/pr85667-6.c: Likewise.
> >> * gcc.target/i386/pr93492-5.c: Likewise.
> >> * gcc.target/i386/pr96539.c: Likewise.
> >> PR target/81708 (%gs:my_guard)
> >> * gcc.target/i386/stack-prot-sym.c: Likewise.
> >> * g++.dg/init/static-cdtor1.C: Add alternate patterns for PIC.
> >> * gcc.target/i386/avx512fp16-vcvtsh2si-1a.c: Extend patterns
> >> for PIC/PIE register allocation.
> >> * gcc.target/i386/pr100704-3.c: Likewise.
> >> * gcc.target/i386/avx512fp16-vcvtsh2usi-1a.c: Likewise.
> >> * gcc.target/i386/avx512fp16-vcvttsh2si-1a.c: Likewise.
> >> * gcc.target/i386/avx512fp16-vcvttsh2usi-1a.c: Likewise.
> >> * gcc.target/i386/avx512fp16-vmovsh-1a.c: Likewise.
> >> * gcc.target/i386/interrupt-11.c: Likewise, allowing for
> >> preservation of the PIC register.
> >> * gcc.target/i386/interrupt-12.c: Likewise.
> >> * gcc.target/i386/interrupt-13.c: Likewise.
> >> * gcc.target/i386/interrupt-15.c: Likewise.
> >> * gcc.target/i386/interrupt-16.c: Likewise.
> >> * gcc.target/i386/interrupt-17.c: Likewise.
> >> * gcc.target/i386/interrupt-8.c: Likewise.
> >> * gcc.target/i386/cet-sjlj-6a.c: Combine patterns from
> >> previous change.
> >> * gcc.target/i386/cet-sjlj-6b.c: Likewise.
> >> * gcc.target/i386/pad-10.c: Accept insns in get_pc_thunk.
> >> * gcc.target/i386/pr70321.c: Likewise.
> >> * gcc.target/i386/pr81563.c: Likewise.
> >> * gcc.target/i386/pr84278.c: Likewise.
> >> * gcc.target/i386/pr90773-2.c: Likewise, plus extra loads from
> >> the GOT.
> >> * gcc.target/i386/pr90773-3.c: Likewise.
> >> * gcc.target/i386/pr94913-2.c: Accept additional PIC insns.
> >> * gcc.target/i386/stack-check-17.c: Likewise.
> >> * gcc.target/i386/stack-check-12.c: Do not require dummy stack
> >> probing obviated with PIC.
> >> * gcc.target/i386/pr95126-m32-1.c: Expect missed optimization
> >> with PIC.
> >> * gcc.target/i386/pr95126-m32-2.c: Likewise.
> >> * gcc.target/i386/pr95852-2.c: Accept different optimization
> >> with PIC.
> >> * gcc.target/i386/pr95852-4.c: Likewise.
>
> --
> Alexandre Oliva, happy hackerhttps://FSFLA.org/blogs/lxo/
>Free Software Activist   GNU Toolchain Engineer
> Disinformation flourishes because many people care deeply about injustice
> but very few check the facts.  Ask me about