x86: Also check _SOFT_FLOAT in <x86gprintrin.h>
Push target("general-regs-only") in <x86gprintrin.h> if x87 is enabled. gcc/ PR target/104890 * config/i386/x86gprintrin.h: Also check _SOFT_FLOAT before pushing target("general-regs-only"). gcc/testsuite/ PR target/104890 * gcc.target/i386/pr104890.c: New test.
This commit is contained in:
parent
2a5fabeb2f
commit
3117ffce4c
2 changed files with 12 additions and 1 deletions
|
@ -24,7 +24,7 @@
|
|||
#ifndef _X86GPRINTRIN_H_INCLUDED
|
||||
#define _X86GPRINTRIN_H_INCLUDED
|
||||
|
||||
#if defined __MMX__ || defined __SSE__
|
||||
#if !defined _SOFT_FLOAT || defined __MMX__ || defined __SSE__
|
||||
#pragma GCC push_options
|
||||
#pragma GCC target("general-regs-only")
|
||||
#define __DISABLE_GENERAL_REGS_ONLY__
|
||||
|
|
11
gcc/testsuite/gcc.target/i386/pr104890.c
Normal file
11
gcc/testsuite/gcc.target/i386/pr104890.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
/* { dg-do compile { target ia32 } } */
|
||||
/* { dg-options "-O2 -mshstk -march=i686" } */
|
||||
|
||||
#include <x86gprintrin.h>
|
||||
|
||||
__attribute__((target ("general-regs-only")))
|
||||
int
|
||||
foo ()
|
||||
{
|
||||
return _get_ssp ();
|
||||
}
|
Loading…
Add table
Reference in a new issue