re PR target/32389 (ICE in extract_constrain_insn_cached when using -msse)
PR target/32389 * config/i386/i386.h (enum ix86_stack_slot): Add SLOT_VIRTUAL. * config/i386/i386.c (assign_386_stack_local): Assert that SLOT_VIRTUAL is valid only before virtual regs are instantiated. (ix86_expand_builtin) [IX86_BUILTIN_LDMXCSR, IX86_BUILTIN_STMXCSR]: Use SLOT_VIRTUAL stack slot instead of SLOT_TEMP. * config/i386/i386.md (truncdfsf2, truncxf<mode>2): Ditto. testsuite/ChangeLog: PR target/32389 * gcc.target/i386/pr32389.c New test. From-SVN: r125830
This commit is contained in:
parent
736b81007e
commit
80dcd3aa9b
6 changed files with 36 additions and 7 deletions
|
@ -1,3 +1,13 @@
|
|||
2007-06-18 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR target/32389
|
||||
* config/i386/i386.h (enum ix86_stack_slot): Add SLOT_VIRTUAL.
|
||||
* config/i386/i386.c (assign_386_stack_local): Assert that
|
||||
SLOT_VIRTUAL is valid only before virtual regs are instantiated.
|
||||
(ix86_expand_builtin) [IX86_BUILTIN_LDMXCSR, IX86_BUILTIN_STMXCSR]:
|
||||
Use SLOT_VIRTUAL stack slot instead of SLOT_TEMP.
|
||||
* config/i386/i386.md (truncdfsf2, truncxf<mode>2): Ditto.
|
||||
|
||||
2007-06-18 Steve Ellcey <sje@cup.hp.com>
|
||||
|
||||
* config/ia64/ia64.h (LIBGCC2_TF_CEXT): New.
|
||||
|
|
|
@ -15614,6 +15614,9 @@ assign_386_stack_local (enum machine_mode mode, enum ix86_stack_slot n)
|
|||
|
||||
gcc_assert (n < MAX_386_STACK_LOCALS);
|
||||
|
||||
/* Virtual slot is valid only before vregs are instantiated. */
|
||||
gcc_assert ((n == SLOT_VIRTUAL) == !virtuals_instantiated);
|
||||
|
||||
for (s = ix86_stack_locals; s; s = s->next)
|
||||
if (s->mode == mode && s->n == n)
|
||||
return copy_rtx (s->rtl);
|
||||
|
@ -19209,13 +19212,13 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
|
|||
|
||||
case IX86_BUILTIN_LDMXCSR:
|
||||
op0 = expand_normal (CALL_EXPR_ARG (exp, 0));
|
||||
target = assign_386_stack_local (SImode, SLOT_TEMP);
|
||||
target = assign_386_stack_local (SImode, SLOT_VIRTUAL);
|
||||
emit_move_insn (target, op0);
|
||||
emit_insn (gen_sse_ldmxcsr (target));
|
||||
return 0;
|
||||
|
||||
case IX86_BUILTIN_STMXCSR:
|
||||
target = assign_386_stack_local (SImode, SLOT_TEMP);
|
||||
target = assign_386_stack_local (SImode, SLOT_VIRTUAL);
|
||||
emit_insn (gen_sse_stmxcsr (target));
|
||||
return copy_to_mode_reg (SImode, target);
|
||||
|
||||
|
|
|
@ -2334,7 +2334,8 @@ enum ix86_entity
|
|||
|
||||
enum ix86_stack_slot
|
||||
{
|
||||
SLOT_TEMP = 0,
|
||||
SLOT_VIRTUAL = 0,
|
||||
SLOT_TEMP,
|
||||
SLOT_CW_STORED,
|
||||
SLOT_CW_TRUNC,
|
||||
SLOT_CW_FLOOR,
|
||||
|
|
|
@ -3855,7 +3855,7 @@
|
|||
;
|
||||
else
|
||||
{
|
||||
rtx temp = assign_386_stack_local (SFmode, SLOT_TEMP);
|
||||
rtx temp = assign_386_stack_local (SFmode, SLOT_VIRTUAL);
|
||||
emit_insn (gen_truncdfsf2_with_temp (operands[0], operands[1], temp));
|
||||
DONE;
|
||||
}
|
||||
|
@ -3994,7 +3994,7 @@
|
|||
DONE;
|
||||
}
|
||||
else
|
||||
operands[2] = assign_386_stack_local (<MODE>mode, SLOT_TEMP);
|
||||
operands[2] = assign_386_stack_local (<MODE>mode, SLOT_VIRTUAL);
|
||||
})
|
||||
|
||||
(define_insn "*truncxfsf2_mixed"
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2007-06-18 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR target/32389
|
||||
* gcc.target/i386/pr32389.c New test.
|
||||
|
||||
2007-06-18 Simon Baldwin <simonb@google.com>
|
||||
|
||||
PR c++/31923
|
||||
|
@ -11,12 +16,12 @@
|
|||
2007-06-18 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR tree-optimization/32383
|
||||
* testsuite/g++.dg/opt/pr32383.C: New test.
|
||||
* g++.dg/opt/pr32383.C: New test.
|
||||
|
||||
2007-06-17 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR rtl-optimization/32366
|
||||
* testsuite/gcc.dg/vect/pr32366.c: New test.
|
||||
* gcc.dg/vect/pr32366.c: New test.
|
||||
|
||||
2007-06-17 Kenneth Zadeck <zadeck@naturalbridge.com>
|
||||
|
||||
|
|
10
gcc/testsuite/gcc.target/i386/pr32389.c
Normal file
10
gcc/testsuite/gcc.target/i386/pr32389.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
/* Testcase by Mike Frysinger <vapier@gentoo.org> */
|
||||
|
||||
/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
|
||||
/* { dg-options "-msse" } */
|
||||
|
||||
double f1();
|
||||
int f2() {
|
||||
__builtin_ia32_stmxcsr();
|
||||
return f1();
|
||||
}
|
Loading…
Add table
Reference in a new issue