]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
x86: Pass -mno-80387 to compile pr121208-1(a|b).c
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 29 Jul 2025 16:11:34 +0000 (09:11 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 14 Aug 2025 02:42:38 +0000 (19:42 -0700)
Pass -mno-80387 to compile pr121208-1(a|b).c to silence

.../pr121208-1a.c:11:1: sorry, unimplemented: 80387 instructions aren’t allowed in a function with the ‘no_caller_saved_registers’ attribute

Partially backport the PR target/121540 fix

9d7f45e9806 x86: Disallow MMX and 80387 in no_caller_saved_registers function

to also add -mno-sse -mno-mmx.

PR target/121208
* gcc.target/i386/pr121208-1a.c (dg-options): Add
-mno-sse -mno-mmx -mno-80387.
* gcc.target/i386/pr121208-1b.c (dg-options): Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit c6d1f58da7eb72e8bac307d342e4655012b36a89)

gcc/testsuite/gcc.target/i386/pr121208-1a.c
gcc/testsuite/gcc.target/i386/pr121208-1b.c

index ac851cb50d86b2ea2de05ff352efc9363374b266..db8d3481622523459d203a4f800781c8b6409e4b 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile { target *-*-linux* } } */
-/* { dg-options "-O2 -fPIC -mtls-dialect=gnu" } */
+/* { dg-options "-O2 -fPIC -mno-sse -mno-mmx -mno-80387 -mtls-dialect=gnu" } */
 
 extern __thread int bar;
 extern void func (void);
index b97ac715c6559bfe9ec3dd21e4fa371074d74e05..1591f7d3feddd928ab4d5a2d025668230782edd5 100644 (file)
@@ -1,4 +1,4 @@
 /* { dg-do compile { target *-*-linux* } } */
-/* { dg-options "-O2 -fPIC -mtls-dialect=gnu2" } */
+/* { dg-options "-O2 -fPIC -mno-sse -mno-mmx -mno-80387 -mtls-dialect=gnu2" } */
 
 #include "pr121208-1a.c"