* [PATCH] [i386] Fix push2pop2 test fail on non-linux target [PR112729]
@ 2023-11-28 13:50 Hongyu Wang
2023-11-29 0:25 ` Hongtao Liu
0 siblings, 1 reply; 2+ messages in thread
From: Hongyu Wang @ 2023-11-28 13:50 UTC (permalink / raw)
To: gcc-patches; +Cc: hongtao.liu
Hi,
On linux x86-64, -fomit-frame-pointer was by default enabled so the
push2pop2 tests cfi scans are based on it. On other target with
-fno-omit-frame-pointer the cfi scan will be wrong as the frame pointer
is pushed at first. Add -fomit-frame-pointer to these tests that related
to cfi scan.
OK for master?
gcc/testsuite/ChangeLog:
PR target/112729
* gcc.target/i386/apx-interrupt-1.c: Add -fomit-frame-pointer.
* gcc.target/i386/apx-push2pop2-1.c: Likewise.
* gcc.target/i386/apx-push2pop2_force_drap-1.c: Likewise.
---
gcc/testsuite/gcc.target/i386/apx-interrupt-1.c | 2 +-
gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c | 2 +-
gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/gcc.target/i386/apx-interrupt-1.c b/gcc/testsuite/gcc.target/i386/apx-interrupt-1.c
index ffcb8fce71c..6844e574d00 100644
--- a/gcc/testsuite/gcc.target/i386/apx-interrupt-1.c
+++ b/gcc/testsuite/gcc.target/i386/apx-interrupt-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-mapx-features=egpr -m64 -O2 -mgeneral-regs-only -mno-cld -mno-push-args -maccumulate-outgoing-args" } */
+/* { dg-options "-mapx-features=egpr -m64 -O2 -mgeneral-regs-only -mno-cld -mno-push-args -maccumulate-outgoing-args -fomit-frame-pointer" } */
/* { dg-skip-if "does not emit .cfi_xxx" "*-*-darwin*" } */
extern void foo (void *) __attribute__ ((interrupt));
diff --git a/gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c b/gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c
index d78c96d36a3..5f43b42e33f 100644
--- a/gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c
+++ b/gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mapx-features=push2pop2" } */
+/* { dg-options "-O2 -mapx-features=push2pop2 -fomit-frame-pointer" } */
/* { dg-skip-if "does not emit .cfi_xxx" "*-*-darwin*" } */
extern int bar (int);
diff --git a/gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c b/gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c
index 3cac7b10769..4e2259f0c99 100644
--- a/gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c
+++ b/gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mapx-features=push2pop2 -mforce-drap" } */
+/* { dg-options "-O2 -mapx-features=push2pop2 -fomit-frame-pointer -mforce-drap" } */
/* { dg-skip-if "does not emit .cfi_xxx" "*-*-darwin*" } */
#include "apx-push2pop2-1.c"
--
2.31.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] [i386] Fix push2pop2 test fail on non-linux target [PR112729]
2023-11-28 13:50 [PATCH] [i386] Fix push2pop2 test fail on non-linux target [PR112729] Hongyu Wang
@ 2023-11-29 0:25 ` Hongtao Liu
0 siblings, 0 replies; 2+ messages in thread
From: Hongtao Liu @ 2023-11-29 0:25 UTC (permalink / raw)
To: Hongyu Wang; +Cc: gcc-patches, hongtao.liu
On Tue, Nov 28, 2023 at 9:51 PM Hongyu Wang <hongyu.wang@intel.com> wrote:
>
> Hi,
>
> On linux x86-64, -fomit-frame-pointer was by default enabled so the
> push2pop2 tests cfi scans are based on it. On other target with
> -fno-omit-frame-pointer the cfi scan will be wrong as the frame pointer
> is pushed at first. Add -fomit-frame-pointer to these tests that related
> to cfi scan.
>
> OK for master?
Ok.
>
> gcc/testsuite/ChangeLog:
>
> PR target/112729
> * gcc.target/i386/apx-interrupt-1.c: Add -fomit-frame-pointer.
> * gcc.target/i386/apx-push2pop2-1.c: Likewise.
> * gcc.target/i386/apx-push2pop2_force_drap-1.c: Likewise.
> ---
> gcc/testsuite/gcc.target/i386/apx-interrupt-1.c | 2 +-
> gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c | 2 +-
> gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.target/i386/apx-interrupt-1.c b/gcc/testsuite/gcc.target/i386/apx-interrupt-1.c
> index ffcb8fce71c..6844e574d00 100644
> --- a/gcc/testsuite/gcc.target/i386/apx-interrupt-1.c
> +++ b/gcc/testsuite/gcc.target/i386/apx-interrupt-1.c
> @@ -1,5 +1,5 @@
> /* { dg-do compile { target { ! ia32 } } } */
> -/* { dg-options "-mapx-features=egpr -m64 -O2 -mgeneral-regs-only -mno-cld -mno-push-args -maccumulate-outgoing-args" } */
> +/* { dg-options "-mapx-features=egpr -m64 -O2 -mgeneral-regs-only -mno-cld -mno-push-args -maccumulate-outgoing-args -fomit-frame-pointer" } */
> /* { dg-skip-if "does not emit .cfi_xxx" "*-*-darwin*" } */
>
> extern void foo (void *) __attribute__ ((interrupt));
> diff --git a/gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c b/gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c
> index d78c96d36a3..5f43b42e33f 100644
> --- a/gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c
> +++ b/gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c
> @@ -1,5 +1,5 @@
> /* { dg-do compile { target { ! ia32 } } } */
> -/* { dg-options "-O2 -mapx-features=push2pop2" } */
> +/* { dg-options "-O2 -mapx-features=push2pop2 -fomit-frame-pointer" } */
> /* { dg-skip-if "does not emit .cfi_xxx" "*-*-darwin*" } */
>
> extern int bar (int);
> diff --git a/gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c b/gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c
> index 3cac7b10769..4e2259f0c99 100644
> --- a/gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c
> +++ b/gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c
> @@ -1,5 +1,5 @@
> /* { dg-do compile { target { ! ia32 } } } */
> -/* { dg-options "-O2 -mapx-features=push2pop2 -mforce-drap" } */
> +/* { dg-options "-O2 -mapx-features=push2pop2 -fomit-frame-pointer -mforce-drap" } */
> /* { dg-skip-if "does not emit .cfi_xxx" "*-*-darwin*" } */
>
> #include "apx-push2pop2-1.c"
> --
> 2.31.1
>
--
BR,
Hongtao
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-29 0:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-28 13:50 [PATCH] [i386] Fix push2pop2 test fail on non-linux target [PR112729] Hongyu Wang
2023-11-29 0:25 ` Hongtao Liu
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).