]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[i386] Fix push2pop2 test fail on non-linux target [PR112729]
authorHongyu Wang <hongyu.wang@intel.com>
Tue, 28 Nov 2023 03:24:01 +0000 (11:24 +0800)
committerHongyu Wang <hongyu.wang@intel.com>
Wed, 29 Nov 2023 00:49:03 +0000 (08:49 +0800)
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.

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
gcc/testsuite/gcc.target/i386/apx-push2pop2-1.c
gcc/testsuite/gcc.target/i386/apx-push2pop2_force_drap-1.c

index ffcb8fce71cacd19679b963036856f441ae1d79f..6844e574d0059d920f227c76aa792d40988ee676 100644 (file)
@@ -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));
index d78c96d36a3022688def814b96ead6ebeecdab24..5f43b42e33f97eeddcb8a9f472a63d7167e44c95 100644 (file)
@@ -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);
index 3cac7b10769a8dd7a5db3df188efa6b85f97ba60..4e2259f0c997128cf74f9dbff54b69e557e63ee5 100644 (file)
@@ -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"