mirror of git://gcc.gnu.org/git/gcc.git
i386.md (movmsk_df): New insn.
* config/i386/i386.md (movmsk_df): New insn. (signbitdf): Split out of signbit<mode>2. Generate movmsk_df sequence for TARGET_SSE_MATH. From-SVN: r164630
This commit is contained in:
parent
7725086e26
commit
d355d5ea50
|
@ -1,3 +1,9 @@
|
||||||
|
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>
|
2010-09-26 Richard Sandiford <rdsandiford@googlemail.com>
|
||||||
|
|
||||||
* config/mips/mips.c (mips_builtin_decls): Declare.
|
* config/mips/mips.c (mips_builtin_decls): Declare.
|
||||||
|
@ -82,8 +88,7 @@
|
||||||
const_value_known.
|
const_value_known.
|
||||||
(cgraph_externally_visible_p): Use cgraph_used_from_object_file_p.
|
(cgraph_externally_visible_p): Use cgraph_used_from_object_file_p.
|
||||||
(function_and_variable_visibility): Set resolution for local vars
|
(function_and_variable_visibility): Set resolution for local vars
|
||||||
and functions.
|
and functions; use varpool_used_from_object_file_p.
|
||||||
use varpool_used_from_object_file_p.
|
|
||||||
* varasm.c (resolution_to_local_definition_p, resolution_local_p): New
|
* varasm.c (resolution_to_local_definition_p, resolution_local_p): New
|
||||||
static functions.
|
static functions.
|
||||||
(default_binds_local_p_1): Use resolutoin info.
|
(default_binds_local_p_1): Use resolutoin info.
|
||||||
|
@ -121,16 +126,17 @@
|
||||||
* tree.c (local_define_builtin): Handle ECF_LEAF.
|
* tree.c (local_define_builtin): Handle ECF_LEAF.
|
||||||
(build_common_builtin_nodes): Set ECF_LEAF where needed.
|
(build_common_builtin_nodes): Set ECF_LEAF where needed.
|
||||||
* tree.h (ECF_LEAF): New.
|
* tree.h (ECF_LEAF): New.
|
||||||
* ipa-reference.c (propagate_bits): For leaf calls propagate ever overwrittable
|
* ipa-reference.c (propagate_bits): For leaf calls propagate ever
|
||||||
and unavailable functions.
|
overwrittable and unavailable functions.
|
||||||
(ipa_init): Put all_module_statics into optimization_summary_obstack.
|
(ipa_init): Put all_module_statics into optimization_summary_obstack.
|
||||||
(copy_global_bitmap): Do not copy all_module_statics.
|
(copy_global_bitmap): Do not copy all_module_statics.
|
||||||
(read_write_all_from_decl): Use cgraph_node argument; handle ECF_LEAF.
|
(read_write_all_from_decl): Use cgraph_node argument; handle ECF_LEAF.
|
||||||
(propagate): Handle overwritable and unavailable leaf functions;
|
(propagate): Handle overwritable and unavailable leaf functions;
|
||||||
initialize global info for overwritable and unavailable leaf functions;
|
initialize global info for overwritable and unavailable leaf functions;
|
||||||
do not free all module statics.
|
do not free all module statics.
|
||||||
(ipa_reference_get_not_read_global, ipa_reference_get_not_written_global):
|
(ipa_reference_get_not_read_global,
|
||||||
leaf calls don't clobber local statics.
|
ipa_reference_get_not_written_global): leaf calls don't clobber
|
||||||
|
local statics.
|
||||||
* calls.c (flags_from_decl_or_type): Handle leaf.
|
* calls.c (flags_from_decl_or_type): Handle leaf.
|
||||||
* tree-cfg.c (stmt_can_make_abnormal_goto): Leaf functions can't do
|
* tree-cfg.c (stmt_can_make_abnormal_goto): Leaf functions can't do
|
||||||
abnormal gotos.
|
abnormal gotos.
|
||||||
|
@ -138,9 +144,7 @@
|
||||||
2010-09-24 Basile Starynkevitch <basile@starynkevitch.net>
|
2010-09-24 Basile Starynkevitch <basile@starynkevitch.net>
|
||||||
|
|
||||||
* gengtype.c: Reindented.
|
* gengtype.c: Reindented.
|
||||||
|
|
||||||
* gengtype.h: Reindented.
|
* gengtype.h: Reindented.
|
||||||
|
|
||||||
* gengtype-parse.c: Reindented.
|
* gengtype-parse.c: Reindented.
|
||||||
|
|
||||||
2010-09-24 Jan Hubicka <jh@suse.cz>
|
2010-09-24 Jan Hubicka <jh@suse.cz>
|
||||||
|
|
|
@ -14980,18 +14980,65 @@
|
||||||
DONE;
|
DONE;
|
||||||
})
|
})
|
||||||
|
|
||||||
(define_expand "signbit<mode>2"
|
(define_expand "signbitxf2"
|
||||||
[(use (match_operand:SI 0 "register_operand" ""))
|
[(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
|
"TARGET_USE_FANCY_MATH_387"
|
||||||
&& !(SSE_FLOAT_MODE_P (<MODE>mode) && TARGET_SSE_MATH)"
|
|
||||||
{
|
{
|
||||||
rtx mask = GEN_INT (0x0200);
|
|
||||||
|
|
||||||
rtx scratch = gen_reg_rtx (HImode);
|
rtx scratch = gen_reg_rtx (HImode);
|
||||||
|
|
||||||
emit_insn (gen_fxam<mode>2_i387 (scratch, operands[1]));
|
emit_insn (gen_fxamxf2_i387 (scratch, operands[1]));
|
||||||
emit_insn (gen_andsi3 (operands[0], gen_lowpart (SImode, scratch), mask));
|
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 (DFmode) && TARGET_SSE_MATH)"
|
||||||
|
{
|
||||||
|
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_fxamsf2_i387 (scratch, operands[1]));
|
||||||
|
emit_insn (gen_andsi3 (operands[0],
|
||||||
|
gen_lowpart (SImode, scratch), GEN_INT (0x200)));
|
||||||
DONE;
|
DONE;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue