mirror of git://gcc.gnu.org/git/gcc.git
re PR target/85511 ([X86] Using __builtin_ia32_writeeflags_u32 in 64-bit mode causes internal compiler error)
PR target/85511 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32 if TARGET_64BIT. * gcc.target/i386/pr85511.c: New test. From-SVN: r259609
This commit is contained in:
parent
8624f8685d
commit
e8ac3359dc
|
|
@ -1,5 +1,10 @@
|
||||||
2018-04-24 Jakub Jelinek <jakub@redhat.com>
|
2018-04-24 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR target/85511
|
||||||
|
* config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
|
||||||
|
__builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
|
||||||
|
if TARGET_64BIT.
|
||||||
|
|
||||||
PR target/85503
|
PR target/85503
|
||||||
* config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
|
* config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
|
||||||
const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
|
const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
|
||||||
|
|
|
||||||
|
|
@ -31934,14 +31934,20 @@ ix86_init_mmx_sse_builtins (void)
|
||||||
IX86_BUILTIN_SBB64);
|
IX86_BUILTIN_SBB64);
|
||||||
|
|
||||||
/* Read/write FLAGS. */
|
/* Read/write FLAGS. */
|
||||||
def_builtin (0, "__builtin_ia32_readeflags_u32",
|
if (TARGET_64BIT)
|
||||||
UNSIGNED_FTYPE_VOID, IX86_BUILTIN_READ_FLAGS);
|
{
|
||||||
def_builtin (OPTION_MASK_ISA_64BIT, "__builtin_ia32_readeflags_u64",
|
def_builtin (OPTION_MASK_ISA_64BIT, "__builtin_ia32_readeflags_u64",
|
||||||
UINT64_FTYPE_VOID, IX86_BUILTIN_READ_FLAGS);
|
UINT64_FTYPE_VOID, IX86_BUILTIN_READ_FLAGS);
|
||||||
def_builtin (0, "__builtin_ia32_writeeflags_u32",
|
def_builtin (OPTION_MASK_ISA_64BIT, "__builtin_ia32_writeeflags_u64",
|
||||||
VOID_FTYPE_UNSIGNED, IX86_BUILTIN_WRITE_FLAGS);
|
VOID_FTYPE_UINT64, IX86_BUILTIN_WRITE_FLAGS);
|
||||||
def_builtin (OPTION_MASK_ISA_64BIT, "__builtin_ia32_writeeflags_u64",
|
}
|
||||||
VOID_FTYPE_UINT64, IX86_BUILTIN_WRITE_FLAGS);
|
else
|
||||||
|
{
|
||||||
|
def_builtin (0, "__builtin_ia32_readeflags_u32",
|
||||||
|
UNSIGNED_FTYPE_VOID, IX86_BUILTIN_READ_FLAGS);
|
||||||
|
def_builtin (0, "__builtin_ia32_writeeflags_u32",
|
||||||
|
VOID_FTYPE_UNSIGNED, IX86_BUILTIN_WRITE_FLAGS);
|
||||||
|
}
|
||||||
|
|
||||||
/* CLFLUSHOPT. */
|
/* CLFLUSHOPT. */
|
||||||
def_builtin (OPTION_MASK_ISA_CLFLUSHOPT, "__builtin_ia32_clflushopt",
|
def_builtin (OPTION_MASK_ISA_CLFLUSHOPT, "__builtin_ia32_clflushopt",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
2018-04-24 Jakub Jelinek <jakub@redhat.com>
|
2018-04-24 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR target/85511
|
||||||
|
* gcc.target/i386/pr85511.c: New test.
|
||||||
|
|
||||||
PR target/85503
|
PR target/85503
|
||||||
* g++.dg/ext/pr85503.C: New test.
|
* g++.dg/ext/pr85503.C: New test.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
/* PR target/85511 */
|
||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-Wimplicit-function-declaration" } */
|
||||||
|
|
||||||
|
unsigned int
|
||||||
|
foo (void)
|
||||||
|
{
|
||||||
|
return __builtin_ia32_readeflags_u32 (); /* { dg-warning "implicit declaration of function" "" { target { ! ia32 } } } */
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
bar (unsigned int x)
|
||||||
|
{
|
||||||
|
__builtin_ia32_writeeflags_u32 (x); /* { dg-warning "implicit declaration of function" "" { target { ! ia32 } } } */
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue