diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-07-17 07:44:45 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-08-05 06:23:03 -0700 |
commit | 72264a639729a5dcc21dbee304717ce22b338bfd (patch) | |
tree | 73cabc983d20be9db8531a3138a5d66fc5756322 /libcpp | |
parent | c04bb6d93f3bd009800cb99e56c779a69d832691 (diff) | |
download | gcc-72264a639729a5dcc21dbee304717ce22b338bfd.zip gcc-72264a639729a5dcc21dbee304717ce22b338bfd.tar.gz gcc-72264a639729a5dcc21dbee304717ce22b338bfd.tar.bz2 |
<x86gprintrin.h>: Add pragma GCC target("general-regs-only")
1. Intrinsics in <x86gprintrin.h> only require GPR ISAs. Add
#if defined __MMX__ || defined __SSE__
#pragma GCC push_options
#pragma GCC target("general-regs-only")
#define __DISABLE_GENERAL_REGS_ONLY__
#endif
and
#ifdef __DISABLE_GENERAL_REGS_ONLY__
#undef __DISABLE_GENERAL_REGS_ONLY__
#pragma GCC pop_options
#endif /* __DISABLE_GENERAL_REGS_ONLY__ */
to <x86gprintrin.h> to disable non-GPR ISAs so that they can be used in
functions with __attribute__ ((target("general-regs-only"))).
2. When checking always_inline attribute, if callee only uses GPRs,
ignore MASK_80387 since enable MASK_80387 in caller has no impact on
callee inline.
gcc/
PR target/99744
* config/i386/i386.c (ix86_can_inline_p): Ignore MASK_80387 if
callee only uses GPRs.
* config/i386/ia32intrin.h: Revert commit 5463cee2770.
* config/i386/serializeintrin.h: Revert commit 71958f740f1.
* config/i386/x86gprintrin.h: Add
#pragma GCC target("general-regs-only") and #pragma GCC pop_options
to disable non-GPR ISAs.
gcc/testsuite/
PR target/99744
* gcc.target/i386/pr99744-3.c: New test.
* gcc.target/i386/pr99744-4.c: Likewise.
* gcc.target/i386/pr99744-5.c: Likewise.
* gcc.target/i386/pr99744-6.c: Likewise.
* gcc.target/i386/pr99744-7.c: Likewise.
* gcc.target/i386/pr99744-8.c: Likewise.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions