+2010-09-26 Uros Bizjak <ubizjak@gmail.com>
+
+ * config/i386/i386.md (movmsk_df): New insn.
+ (signbitdf): Split out of signbit<mode>2. Generate movmsk_df
+ sequence for TARGET_SSE_MATH.
+
2010-09-26 Richard Sandiford <rdsandiford@googlemail.com>
* config/mips/mips.c (mips_builtin_decls): Declare.
const_value_known.
(cgraph_externally_visible_p): Use cgraph_used_from_object_file_p.
(function_and_variable_visibility): Set resolution for local vars
- and functions.
- use varpool_used_from_object_file_p.
+ and functions; use varpool_used_from_object_file_p.
* varasm.c (resolution_to_local_definition_p, resolution_local_p): New
static functions.
(default_binds_local_p_1): Use resolutoin info.
* tree.c (local_define_builtin): Handle ECF_LEAF.
(build_common_builtin_nodes): Set ECF_LEAF where needed.
* tree.h (ECF_LEAF): New.
- * ipa-reference.c (propagate_bits): For leaf calls propagate ever overwrittable
- and unavailable functions.
+ * ipa-reference.c (propagate_bits): For leaf calls propagate ever
+ overwrittable and unavailable functions.
(ipa_init): Put all_module_statics into optimization_summary_obstack.
(copy_global_bitmap): Do not copy all_module_statics.
(read_write_all_from_decl): Use cgraph_node argument; handle ECF_LEAF.
(propagate): Handle overwritable and unavailable leaf functions;
initialize global info for overwritable and unavailable leaf functions;
do not free all module statics.
- (ipa_reference_get_not_read_global, ipa_reference_get_not_written_global):
- leaf calls don't clobber local statics.
+ (ipa_reference_get_not_read_global,
+ ipa_reference_get_not_written_global): leaf calls don't clobber
+ local statics.
* calls.c (flags_from_decl_or_type): Handle leaf.
* tree-cfg.c (stmt_can_make_abnormal_goto): Leaf functions can't do
abnormal gotos.
2010-09-24 Basile Starynkevitch <basile@starynkevitch.net>
* gengtype.c: Reindented.
-
* gengtype.h: Reindented.
-
* gengtype-parse.c: Reindented.
2010-09-24 Jan Hubicka <jh@suse.cz>
2010-09-24 Iain Sandoe <iains@gcc.gnu.org>
Dominique Dhumieres <dominiq@lps.ens.fr>
-
+
PR bootstrap/45751
* gcc/config/darwin-driver.c (darwin_default_min_version):
Adjust size passed to memcpy in two places.
-
+
2010-09-24 Richard Guenther <rguenther@suse.de>
* c-decl.c (pop_scope): Always set file-scope DECL_CONTEXT.
DONE;
})
-(define_expand "signbit<mode>2"
+(define_expand "signbitxf2"
[(use (match_operand:SI 0 "register_operand" ""))
- (use (match_operand:X87MODEF 1 "register_operand" ""))]
+ (use (match_operand:XF 1 "register_operand" ""))]
+ "TARGET_USE_FANCY_MATH_387"
+{
+ rtx scratch = gen_reg_rtx (HImode);
+
+ emit_insn (gen_fxamxf2_i387 (scratch, operands[1]));
+ emit_insn (gen_andsi3 (operands[0],
+ gen_lowpart (SImode, scratch), GEN_INT (0x200)));
+ DONE;
+})
+
+(define_insn "movmsk_df"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (unspec:SI
+ [(match_operand:DF 1 "register_operand" "x")]
+ UNSPEC_MOVMSK))]
+ "SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH"
+ "%vmovmskpd\t{%1, %0|%0, %1}"
+ [(set_attr "type" "ssemov")
+ (set_attr "prefix" "maybe_vex")
+ (set_attr "mode" "DF")])
+
+;; Use movmskpd in SSE mode to avoid store forwarding stall
+;; for 32bit targets and movq+shrq sequence for 64bit targets.
+(define_expand "signbitdf2"
+ [(use (match_operand:SI 0 "register_operand" ""))
+ (use (match_operand:DF 1 "register_operand" ""))]
"TARGET_USE_FANCY_MATH_387
- && !(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)"
+ || (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH)"
{
- rtx mask = GEN_INT (0x0200);
+ if (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH)
+ {
+ emit_insn (gen_movmsk_df (operands[0], operands[1]));
+ emit_insn (gen_andsi3 (operands[0], operands[0], const1_rtx));
+ }
+ else
+ {
+ rtx scratch = gen_reg_rtx (HImode);
+ emit_insn (gen_fxamdf2_i387 (scratch, operands[1]));
+ emit_insn (gen_andsi3 (operands[0],
+ gen_lowpart (SImode, scratch), GEN_INT (0x200)));
+ }
+ DONE;
+})
+
+(define_expand "signbitsf2"
+ [(use (match_operand:SI 0 "register_operand" ""))
+ (use (match_operand:SF 1 "register_operand" ""))]
+ "TARGET_USE_FANCY_MATH_387
+ && !(SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH)"
+{
rtx scratch = gen_reg_rtx (HImode);
- emit_insn (gen_fxam<mode>2_i387 (scratch, operands[1]));
- emit_insn (gen_andsi3 (operands[0], gen_lowpart (SImode, scratch), mask));
+ emit_insn (gen_fxamsf2_i387 (scratch, operands[1]));
+ emit_insn (gen_andsi3 (operands[0],
+ gen_lowpart (SImode, scratch), GEN_INT (0x200)));
DONE;
})
\f