forked from iains/gcc-14-branch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86: Don't enable APX_F in 32-bit mode
gcc/ChangeLog: PR target/115978 * config/i386/driver-i386.cc (host_detect_local_cpu): Enable APX_F only for 64-bit codegen. * config/i386/i386-options.cc (DEF_PTA): Skip PTA_APX_F if not in 64-bit mode. gcc/testsuite/ChangeLog: PR target/115978 * gcc.target/i386/pr115978-1.c: New test. * gcc.target/i386/pr115978-2.c: Ditto.
- Loading branch information
1 parent
7c688e0
commit ee6c5af
Showing
4 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* { dg-do run } */ | ||
/* { dg-options "-O2 -march=native" } */ | ||
|
||
int | ||
main () | ||
{ | ||
if (__builtin_cpu_supports ("apxf")) | ||
{ | ||
#ifdef __x86_64__ | ||
# ifndef __APX_F__ | ||
__builtin_abort (); | ||
# endif | ||
#else | ||
# ifdef __APX_F__ | ||
__builtin_abort (); | ||
# endif | ||
#endif | ||
return 0; | ||
} | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* { dg-do compile } */ | ||
/* { dg-options "-O2 -march=native -mno-apxf" } */ | ||
|
||
#ifdef __APX_F__ | ||
# error APX_F should be disabled | ||
#endif |