summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-06 16:00:35 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-06 16:00:35 +0000
commite1f46a6ec85e817960d4bbd3cc606a36a40842f0 (patch)
tree50c2b75833052692c59212717be12956b42c2ac8
parentea15f77c9fbc6fd1e2bbdecb6e81b4234c099c2c (diff)
downloadgcc-e1f46a6ec85e817960d4bbd3cc606a36a40842f0.tar.gz
* config/i386/i386.c (TARGET_INSTANTIATE_DECLS): New define.
(ix86_instantiate_decls): New function. (ix86_expand_builtin) <case IX86_BUILTIN_LDMXCSR>: Use SLOT_TEMP stack slot instead of SLOT_VIRTUAL. <case IX86_BUILTIN_STMXCSR>: Ditto. (assign_386_stack_local): Do not assert when virtual slot is valid. * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_VIRTUAL. * config/i386/i386.md (truncdfsf2): Do not use SLOT_VIRTUAL stack slot. (truncxf<mode>2): Ditto. (floatunssi<mode>2): Ditto. (isinf<mode>2): Ditto. * config/i386/sync.md (atomic_load<mode>): Ditto. (atomic_store<mode>): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193244 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog92
-rw-r--r--gcc/config/i386/i386.c20
-rw-r--r--gcc/config/i386/i386.h3
-rw-r--r--gcc/config/i386/i386.md24
-rw-r--r--gcc/config/i386/sync.md8
5 files changed, 76 insertions, 71 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ad525d3d2d6..9dbc1fc2ce2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,19 @@
+2012-11-06 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.c (TARGET_INSTANTIATE_DECLS): New define.
+ (ix86_instantiate_decls): New function.
+ (ix86_expand_builtin) <case IX86_BUILTIN_LDMXCSR>: Use SLOT_TEMP
+ stack slot instead of SLOT_VIRTUAL.
+ <case IX86_BUILTIN_STMXCSR>: Ditto.
+ (assign_386_stack_local): Do not assert when virtual slot is valid.
+ * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_VIRTUAL.
+ * config/i386/i386.md (truncdfsf2): Do not use SLOT_VIRTUAL stack slot.
+ (truncxf<mode>2): Ditto.
+ (floatunssi<mode>2): Ditto.
+ (isinf<mode>2): Ditto.
+ * config/i386/sync.md (atomic_load<mode>): Ditto.
+ (atomic_store<mode>): Ditto.
+
2012-11-06 Jan Hubicka <jh@suse.cz>
* tree-vect-loop-manip.c (vect_do_peeling_for_loop_bound,
@@ -14,27 +30,27 @@
2012-11-06 Vladimir Yakovlev <vladimir.b.yakovlev@intel.com>
- * config/i386/i386-protos.h (emit_i387_cw_initialization): Deleted.
- (emit_vzero): Added prototype.
+ * config/i386/i386-protos.h (emit_i387_cw_initialization): Delete.
+ (emit_vzero): Add prototype.
(ix86_mode_entry): Likewise.
(ix86_mode_exit): Likewise.
(ix86_emit_mode_set): Likewise.
- * config/i386/i386.c (typedef struct block_info_def): Deleted.
- (define BLOCK_INFO): Deleted.
- (check_avx256_stores): Added checking for MEM_P.
- (move_or_delete_vzeroupper_2): Deleted.
- (move_or_delete_vzeroupper_1): Deleted.
- (move_or_delete_vzeroupper): Deleted.
- (ix86_maybe_emit_epilogue_vzeroupper): Deleted.
- (function_pass_avx256_p): Deleted.
- (ix86_function_ok_for_sibcall): Deleted disabling sibcall.
- (nit_cumulative_args): Deleted initialization of of avx256 fields of
+ * config/i386/i386.c (typedef struct block_info_def): Delete.
+ (define BLOCK_INFO): Delete.
+ (check_avx256_stores): Add checking for MEM_P.
+ (move_or_delete_vzeroupper_2): Delete.
+ (move_or_delete_vzeroupper_1): Delete.
+ (move_or_delete_vzeroupper): Delete.
+ (ix86_maybe_emit_epilogue_vzeroupper): Delete.
+ (function_pass_avx256_p): Delete.
+ (ix86_function_ok_for_sibcall): Remove sibcall disabling.
+ (nit_cumulative_args): Remove initialization of of avx256 fields of
cfun->machine.
- (ix86_emit_restore_sse_regs_using_mov): Deleted vzeroupper generation.
+ (ix86_emit_restore_sse_regs_using_mov): Remove vzeroupper generation.
(ix86_expand_epilogue): Likewise.
(ix86_avx_u128_mode_needed): New.
- (ix86_i387_mode_needed): Renamed ix86_mode_needed.
+ (ix86_i387_mode_needed): Rename from ix86_mode_needed.
(ix86_mode_needed): New.
(ix86_avx_u128_mode_after): New.
(ix86_mode_after): New.
@@ -43,11 +59,11 @@
(ix86_avx_u128_mode_exit): New.
(ix86_mode_exit): New.
(ix86_emit_mode_set): New.
- (ix86_expand_call): Deleted vzeroupper generation.
- (ix86_split_call_vzeroupper): Deleted.
- (ix86_init_machine_status): Initialzed optimize_mode_switching.
- (ix86_expand_special_args_builtin): Changed.
- (ix86_reorg): Deleted a call of move_or_delete_vzeroupper.
+ (ix86_expand_call): Delete vzeroupper generation.
+ (ix86_split_call_vzeroupper): Delete.
+ (ix86_init_machine_status): Initialize optimize_mode_switching.
+ (ix86_expand_special_args_builtin): Change.
+ (ix86_reorg): Delete a call of move_or_delete_vzeroupper.
* config/i386/i386.h (VALID_AVX256_REG_OR_OI_MODE): New.
(AVX_U128): New.
@@ -56,26 +72,26 @@
(MODE_AFTER): New.
(MODE_ENTRY): New.
(MODE_EXIT): New.
- (EMIT_MODE_SET): Changed.
- (machine_function): Deleted avx256 fields.
-
- * config/i386/i386.md (UNSPEC_CALL_NEEDS_VZEROUPPER): Deleted.
- (define_insn_and_split "*call_vzeroupper"): Deleted.
- (define_insn_and_split "*call_rex64_ms_sysv_vzeroupper"): Deleted.
- (define_insn_and_split "*sibcall_vzeroupper"): Deleted.
- (define_insn_and_split "*call_pop_vzeroupper"): Deleted.
- (define_insn_and_split "*sibcall_pop_vzeroupper"): Deleted.
- (define_insn_and_split "*call_value_vzeroupper"): Deleted.
- (define_insn_and_split "*sibcall_value_vzeroupper"): Deleted.
- (define_insn_and_split "*call_value_rex64_ms_sysv_vzeroupper"): Deleted.
- (define_insn_and_split "*call_value_pop_vzeroupper"): Deleted.
- (define_insn_and_split "*sibcall_value_pop_vzeroupper"): Deleted.
- (define_expand "return"): Deleted vzeroupper emitting.
- (define_expand "simple_return"): Deleted.
+ (EMIT_MODE_SET): Change.
+ (machine_function): Delete avx256 fields.
+
+ * config/i386/i386.md (UNSPEC_CALL_NEEDS_VZEROUPPER): Delete.
+ (define_insn_and_split "*call_vzeroupper"): Delete.
+ (define_insn_and_split "*call_rex64_ms_sysv_vzeroupper"): Delete.
+ (define_insn_and_split "*sibcall_vzeroupper"): Delete.
+ (define_insn_and_split "*call_pop_vzeroupper"): Delete.
+ (define_insn_and_split "*sibcall_pop_vzeroupper"): Delete.
+ (define_insn_and_split "*call_value_vzeroupper"): Delete.
+ (define_insn_and_split "*sibcall_value_vzeroupper"): Delete.
+ (define_insn_and_split "*call_value_rex64_ms_sysv_vzeroupper"): Delete.
+ (define_insn_and_split "*call_value_pop_vzeroupper"): Delete.
+ (define_insn_and_split "*sibcall_value_pop_vzeroupper"): Delete.
+ (define_expand "return"): Remove vzeroupper emitting.
+ (define_expand "simple_return"): Delete.
* config/i386/predicates.md (vzeroupper_operation): New.
- * config/i386/sse.md (avx_vzeroupper): Changed.
+ * config/i386/sse.md (avx_vzeroupper): Change.
2012-11-06 Uros Bizjak <ubizjak@gmail.com>
Kaz Kojima <kkojima@gcc.gnu.org>
@@ -86,8 +102,8 @@
2012-11-06 Andrey Turetskiy <andrey.turetskiy@gmail.com>
- * config/i386/i386.c (bdesc_args): Rename CODE_FOR_avx2_umulhrswv16hi3 to
- CODE_FOR_avx2_pmulhrswv16hi3.
+ * config/i386/i386.c (bdesc_args): Rename CODE_FOR_avx2_umulhrswv16hi3
+ to CODE_FOR_avx2_pmulhrswv16hi3.
* config/i386/predicates.md (const1_operand): Extend for vectors.
* config/i386/sse.md (ssse3_avx2): Extend.
(ssedoublemode): Ditto.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index d747a5a9387..ec40dd59bb1 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -23435,9 +23435,6 @@ 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 validize_mem (copy_rtx (s->rtl));
@@ -23451,6 +23448,16 @@ assign_386_stack_local (enum machine_mode mode, enum ix86_stack_slot n)
ix86_stack_locals = s;
return validize_mem (s->rtl);
}
+
+static void
+ix86_instantiate_decls (void)
+{
+ struct stack_local_entry *s;
+
+ for (s = ix86_stack_locals; s; s = s->next)
+ if (s->rtl != NULL_RTX)
+ instantiate_decl_rtl (s->rtl);
+}
/* Calculate the length of the memory address in the instruction encoding.
Includes addr32 prefix, does not include the one-byte modrm, opcode,
@@ -31235,13 +31242,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_VIRTUAL);
+ target = assign_386_stack_local (SImode, SLOT_TEMP);
emit_move_insn (target, op0);
emit_insn (gen_sse_ldmxcsr (target));
return 0;
case IX86_BUILTIN_STMXCSR:
- target = assign_386_stack_local (SImode, SLOT_VIRTUAL);
+ target = assign_386_stack_local (SImode, SLOT_TEMP);
emit_insn (gen_sse_stmxcsr (target));
return copy_to_mode_reg (SImode, target);
@@ -42061,6 +42068,9 @@ ix86_memmodel_check (unsigned HOST_WIDE_INT val)
#undef TARGET_MEMBER_TYPE_FORCES_BLK
#define TARGET_MEMBER_TYPE_FORCES_BLK ix86_member_type_forces_blk
+#undef TARGET_INSTANTIATE_DECLS
+#define TARGET_INSTANTIATE_DECLS ix86_instantiate_decls
+
#undef TARGET_SECONDARY_RELOAD
#define TARGET_SECONDARY_RELOAD ix86_secondary_reload
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 67403c551a9..18d476dc60f 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -2154,8 +2154,7 @@ enum ix86_entity
enum ix86_stack_slot
{
- SLOT_VIRTUAL = 0,
- SLOT_TEMP,
+ SLOT_TEMP = 0,
SLOT_CW_STORED,
SLOT_CW_TRUNC,
SLOT_CW_FLOOR,
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index f2d2cd608f3..243ab4ee2f8 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -4070,10 +4070,7 @@
;
else
{
- enum ix86_stack_slot slot = (virtuals_instantiated
- ? SLOT_TEMP
- : SLOT_VIRTUAL);
- rtx temp = assign_386_stack_local (SFmode, slot);
+ rtx temp = assign_386_stack_local (SFmode, SLOT_TEMP);
emit_insn (gen_truncdfsf2_with_temp (operands[0], operands[1], temp));
DONE;
}
@@ -4254,12 +4251,7 @@
DONE;
}
else
- {
- enum ix86_stack_slot slot = (virtuals_instantiated
- ? SLOT_TEMP
- : SLOT_VIRTUAL);
- operands[2] = assign_386_stack_local (<MODE>mode, slot);
- }
+ operands[2] = assign_386_stack_local (<MODE>mode, SLOT_TEMP);
})
(define_insn "*truncxfsf2_mixed"
@@ -5467,12 +5459,7 @@
DONE;
}
else
- {
- enum ix86_stack_slot slot = (virtuals_instantiated
- ? SLOT_TEMP
- : SLOT_VIRTUAL);
- operands[2] = assign_386_stack_local (DImode, slot);
- }
+ operands[2] = assign_386_stack_local (DImode, SLOT_TEMP);
})
(define_expand "floatunsdisf2"
@@ -15397,10 +15384,7 @@
emit_insn (gen_fxam<mode>2_i387_with_temp (scratch, operands[1]));
else
{
- enum ix86_stack_slot slot = (virtuals_instantiated
- ? SLOT_TEMP
- : SLOT_VIRTUAL);
- rtx temp = assign_386_stack_local (<MODE>mode, slot);
+ rtx temp = assign_386_stack_local (<MODE>mode, SLOT_TEMP);
emit_move_insn (temp, operands[1]);
emit_insn (gen_fxam<mode>2_i387_with_temp (scratch, temp));
diff --git a/gcc/config/i386/sync.md b/gcc/config/i386/sync.md
index 44cb5d4c070..d8555717f3d 100644
--- a/gcc/config/i386/sync.md
+++ b/gcc/config/i386/sync.md
@@ -149,9 +149,7 @@
if (<MODE>mode == DImode && !TARGET_64BIT)
emit_insn (gen_atomic_loaddi_fpu
(operands[0], operands[1],
- assign_386_stack_local (DImode,
- (virtuals_instantiated
- ? SLOT_TEMP : SLOT_VIRTUAL))));
+ assign_386_stack_local (DImode, SLOT_TEMP)));
else
emit_move_insn (operands[0], operands[1]);
DONE;
@@ -212,9 +210,7 @@
out to be significantly larger than this plus a barrier. */
emit_insn (gen_atomic_storedi_fpu
(operands[0], operands[1],
- assign_386_stack_local (DImode,
- (virtuals_instantiated
- ? SLOT_TEMP : SLOT_VIRTUAL))));
+ assign_386_stack_local (DImode, SLOT_TEMP)));
}
else
{