+2008-04-16 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/35944
+ * config/i386/i386.md (fmodxf3): Copy operand 1 and operand 2 into
+ temporary registers. Change operand predicate to general_operand.
+ (remainderxf3): Ditto.
+
2008-04-16 Richard Guenther <rguenther@suse.de>
* Makefile.in (tree-affine.o): Add $(FLAGS_H) dependency.
sjlj_build_landing_pads, finish_eh_generation,
remove_exception_handler_label, remove_eh_handler,
maybe_remove_eh_handler, add_reachable_handler,
- reachable_handlers, expand_builtin_eh_return,
- expand_eh_return, add_action_record, collect_one_action_chain,
- add_call_site, convert_to_eh_region_ranges, sjlj_size_of_call_site_table,
+ reachable_handlers, expand_builtin_eh_return, expand_eh_return,
+ add_action_record, collect_one_action_chain, add_call_site,
+ convert_to_eh_region_ranges, sjlj_size_of_call_site_table,
sjlj_output_call_site_table, output_function_exception_table,
* except.h (note_current_region_may_contain_throw): Remove
(get_exception_pointer, get_exception_filter): Do not take struct
(define_expand "fmodxf3"
[(use (match_operand:XF 0 "register_operand" ""))
- (use (match_operand:XF 1 "register_operand" ""))
- (use (match_operand:XF 2 "register_operand" ""))]
+ (use (match_operand:XF 1 "general_operand" ""))
+ (use (match_operand:XF 2 "general_operand" ""))]
"TARGET_USE_FANCY_MATH_387"
{
rtx label = gen_label_rtx ();
- rtx op2;
+ rtx op1 = gen_reg_rtx (XFmode);
+ rtx op2 = gen_reg_rtx (XFmode);
- if (rtx_equal_p (operands[1], operands[2]))
- {
- op2 = gen_reg_rtx (XFmode);
- emit_move_insn (op2, operands[2]);
- }
- else
- op2 = operands[2];
+ emit_move_insn (op1, operands[1]);
+ emit_move_insn (op2, operands[2]);
emit_label (label);
- emit_insn (gen_fpremxf4_i387 (operands[1], op2, operands[1], op2));
+ emit_insn (gen_fpremxf4_i387 (op1, op2, op1, op2));
ix86_emit_fp_unordered_jump (label);
LABEL_NUSES (label) = 1;
- emit_move_insn (operands[0], operands[1]);
+ emit_move_insn (operands[0], op1);
DONE;
})
(define_expand "remainderxf3"
[(use (match_operand:XF 0 "register_operand" ""))
- (use (match_operand:XF 1 "register_operand" ""))
- (use (match_operand:XF 2 "register_operand" ""))]
+ (use (match_operand:XF 1 "general_operand" ""))
+ (use (match_operand:XF 2 "general_operand" ""))]
"TARGET_USE_FANCY_MATH_387"
{
rtx label = gen_label_rtx ();
- rtx op2;
+ rtx op1 = gen_reg_rtx (XFmode);
+ rtx op2 = gen_reg_rtx (XFmode);
- if (rtx_equal_p (operands[1], operands[2]))
- {
- op2 = gen_reg_rtx (XFmode);
- emit_move_insn (op2, operands[2]);
- }
- else
- op2 = operands[2];
+ emit_move_insn (op1, operands[1]);
+ emit_move_insn (op2, operands[2]);
emit_label (label);
- emit_insn (gen_fprem1xf4_i387 (operands[1], op2, operands[1], op2));
+ emit_insn (gen_fprem1xf4_i387 (op1, op2, op1, op2));
ix86_emit_fp_unordered_jump (label);
LABEL_NUSES (label) = 1;
- emit_move_insn (operands[0], operands[1]);
+ emit_move_insn (operands[0], op1);
DONE;
})