From ca3a21650c3336d54453d63166c67f34aeb355c6 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Sat, 31 May 2008 11:48:21 +0200 Subject: [PATCH] i386.md (*fop__comm_mixed): Macroize from *fop_sf_comm_mixed and *fop_df_comm_mixed insn patterns using... * config/i386/i386.md (*fop__comm_mixed): Macroize from *fop_sf_comm_mixed and *fop_df_comm_mixed insn patterns using MODEF mode iterator. (*fop__comm_sse): Macroize from *fop_sf_comm_sse and *fop_df_comm_sse insn patterns using MODEF mode iterator. (*fop__comm_i387): Macroize from *fop_sf_comm_i387 and *fop_df_comm_i387 insn patterns using MODEF mode iterator. (*fop__1_mixed): Macroize from *fop_sf_1_mixed and *fop_df_1_mixed insn patterns using MODEF mode iterator. (*fop__1_sse): Macroize from *fop_sf_1_sse and *fop_df_1_sse insn patterns using MODEF mode iterator. (*fop__1_i387): Macroize from *fop_sf_1_i387 and *fop_df_1_i387 insn patterns using MODEF mode iterator. (*fop__2_i387): Macroize from *fop_sf_2_i387 and *fop_df_2_i387 insn patterns using MODEF mode iterator. (*fop__3_i387): Macroize from *fop_sf_3_i387 and *fop_df_3_i387 insn patterns using MODEF mode iterator. (*fop_xf_2_i387): Rename from *fop_xf_2_i387. (*fop_xf_3_i387): Rename from *fop_xf_3_i387. (*fop_xf_4_i387): Use for mode attribute. (*fop_xf_5_i387): Ditto. (*fop_xf_6_i387): Ditto. From-SVN: r136235 --- gcc/ChangeLog | 100 ++++++------- gcc/config/i386/i386.md | 308 +++++++++++----------------------------- 2 files changed, 135 insertions(+), 273 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 82739e03eff..6177e80e001 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,28 @@ +2008-05-31 Uros Bizjak + + * config/i386/i386.md (*fop__comm_mixed): Macroize from + *fop_sf_comm_mixed and *fop_df_comm_mixed insn patterns using MODEF + mode iterator. + (*fop__comm_sse): Macroize from *fop_sf_comm_sse and + *fop_df_comm_sse insn patterns using MODEF mode iterator. + (*fop__comm_i387): Macroize from *fop_sf_comm_i387 and + *fop_df_comm_i387 insn patterns using MODEF mode iterator. + (*fop__1_mixed): Macroize from *fop_sf_1_mixed and + *fop_df_1_mixed insn patterns using MODEF mode iterator. + (*fop__1_sse): Macroize from *fop_sf_1_sse and + *fop_df_1_sse insn patterns using MODEF mode iterator. + (*fop__1_i387): Macroize from *fop_sf_1_i387 and + *fop_df_1_i387 insn patterns using MODEF mode iterator. + (*fop__2_i387): Macroize from *fop_sf_2_i387 and + *fop_df_2_i387 insn patterns using MODEF mode iterator. + (*fop__3_i387): Macroize from *fop_sf_3_i387 and + *fop_df_3_i387 insn patterns using MODEF mode iterator. + (*fop_xf_2_i387): Rename from *fop_xf_2_i387. + (*fop_xf_3_i387): Rename from *fop_xf_3_i387. + (*fop_xf_4_i387): Use for mode attribute. + (*fop_xf_5_i387): Ditto. + (*fop_xf_6_i387): Ditto. + 2008-05-30 Richard Guenther * builtins.c (build_string_literal): Avoid generating @@ -32,8 +57,7 @@ * incpath.c: Use HOST_LACKS_INODE_NUMBERS conditional rather than OS names to choose INO_T_EQ definition. (DIRS_EQ) [!INO_T_EQ]: Don't worry about case in comparison. - (add_path) [!INO_T_EQ]: Use lrealpath to fill canonical_name - field. + (add_path) [!INO_T_EQ]: Use lrealpath to fill canonical_name field. 2008-05-29 Daniel Franke @@ -43,8 +67,7 @@ * config.gcc: Defined new variable, fortran_target_objs. (*-*-darwin*): Set fortran_target_objs. * Makefile.in: Defined new variable FORTRAN_TARGET_OBJS. - * configure.ac: Substitute fortran_target_objs, set - FORTRAN_TARGET_OBJS. + * configure.ac: Substitute fortran_target_objs, set FORTRAN_TARGET_OBJS. * configure: Regenerated. 2008-05-29 H.J. Lu @@ -91,8 +114,8 @@ * value-prof.c (tree_ic_transform): Print counts. * tree-profile.c (tree_gen_ic_func_profiler): - Clear __gcov_indreict_call_callee variable - to avoid misattribution of the profile. + Clear __gcov_indreict_call_callee variable to avoid misattribution + of the profile. 2008-05-28 Rafael Espindola @@ -125,8 +148,7 @@ (s390_expand_insv): Use rotate and insert selected bits instruction for insv when building for z10. (print_operand_address): Handle symbol ref addresses. - (print_operand): Output modifier 'c' added for signed byte - values. + (print_operand): Output modifier 'c' added for signed byte values. (s390_encode_section_info): Mark symbol refs with SYMBOL_FLAG_NOT_NATURALLY_ALIGNED if appropriate. @@ -173,8 +195,7 @@ 2008-05-28 Andreas Krebbel * config/s390/s390.c (z10_cost): New cost function for z10. - (s390_handle_arch_option, override_options): Support - -march=z10 switch. + (s390_handle_arch_option, override_options): Support -march=z10 switch. (s390_issue_rate): Adjust issue rate for z10. * config/s390/s390.h (processor_type): Add PROCESSOR_2097_Z10. (processor_flags): Add PF_Z10. @@ -255,8 +276,7 @@ 2008-05-27 Richard Guenther PR tree-optimization/36245 - * tree-ssa-address.c (add_to_parts): Deal with non-pointer - bases. + * tree-ssa-address.c (add_to_parts): Deal with non-pointer bases. 2008-05-27 Andreas Krebbel @@ -284,8 +304,7 @@ alternatives according to the "enabled" attribute * recog.h (struct recog_data): New field alternative_enabled_p. (skip_alternative): New inline function. - * regclass.c: (record_operand_costs): Check the "enabled" - attribute. + * regclass.c: (record_operand_costs): Check the "enabled" attribute. (record_reg_classes): Skip alternative according to the "enabled" attribute. @@ -299,15 +318,12 @@ * recog.c (asm_operand_ok, preprocess_constraints, constrain_operands): Likewise. * regclass.c (record_reg_classes): Likewise. - * reload.c (find_reloads, alternative_allows_const_pool_ref): - Likewise. + * reload.c (find_reloads, alternative_allows_const_pool_ref): Likewise. * reload1.c (maybe_fix_stack_asms): Likewise. - * stmt.c (parse_output_constraint, parse_input_constraint): - Likewise. + * stmt.c (parse_output_constraint, parse_input_constraint): Likewise. * recog.h: Adjust comment. * genpreds.c (generic_constraint_letters): Remove 'm' constraint. - * genoutput.c (note_constraint): Don't emit error for 'm' - constraint. + * genoutput.c (note_constraint): Don't emit error for 'm' constraint. * doc/md.texi: Add a note to description of 'm' constraint. * doc/tm.texi: Document the new TARGET_MEM_CONSTRAINT macro. @@ -354,7 +370,7 @@ (cgraph_decide_inlining_incrementally): Likewise. 2008-05-26 Tristan Gingold - Anatoly Sokolov + Anatoly Sokolov * config/avr/avr.md ("call_prologue_saves"): Use hi8(gs())/lo8(gs()) instead of pm_lo8/pm_hi8 to makes this call working on avr6. @@ -369,29 +385,22 @@ 2008-05-26 Richard Guenther * tree-ssa-sccvn.c (expr_has_constants): Declare. - (visit_reference_op_load): Initialize VN_INFO->has_constants - properly. + (visit_reference_op_load): Initialize VN_INFO->has_constants properly. 2008-05-26 H.J. Lu PR middle-end/36253 - * caller-save.c (insert_restore): Verify alignment of spill - space. + * caller-save.c (insert_restore): Verify alignment of spill space. (insert_save): Likewise. - * cfgexpand.c (LOCAL_ALIGNMENT): Removed. - * defaults.h (LOCAL_ALIGNMENT): New. Provide default. (STACK_SLOT_ALIGNMENT): Likewise. - * function.c (LOCAL_ALIGNMENT): Removed. (get_stack_local_alignment): New. (assign_stack_local): Use it. Set alignment on stack slot. (assign_stack_temp_for_type): Use get_stack_local_alignment. - * config/i386/i386.h (LOCAL_ALIGNMENT): Updated. (STACK_SLOT_ALIGNMENT): New. - * config/i386/i386.c (ix86_local_alignment): Handle caller-save stack slot in XFmode. @@ -421,7 +430,7 @@ 2008-05-25 Eric Botcazou - * tree-nested.c (convert_tramp_reference) : Do not + * tree-nested.c (convert_tramp_reference) : Do not build a trampoline if we don't want one. * varasm.c (initializer_constant_valid_p) : Do not return zero for nested functions if we don't want a trampoline. @@ -510,9 +519,8 @@ 2008-05-24 Richard Guenther - * tree-dfa.c (refs_may_alias_p): Re-instantiate case that - a scalar variable can be only accessed through a pointer - or a union. + * tree-dfa.c (refs_may_alias_p): Re-instantiate case that a scalar + variable can be only accessed through a pointer or a union. 2008-05-24 Kaveh R. Ghazi @@ -542,10 +550,8 @@ * target.h (gcc_target): Add allocate_stack_slots_for_args. * function.c (use_register_for_decl): Use targetm.calls.allocate_stack_slots_for_args. - * target-def.h (TARGET_CALLS): Add - TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS. - * config/arm/arm.c (arm_allocate_stack_slots_for_args): - New function. + * target-def.h (TARGET_CALLS): Add TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS. + * config/arm/arm.c (arm_allocate_stack_slots_for_args): New function. (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define. 2008-05-23 Eric Botcazou @@ -560,8 +566,7 @@ 2008-05-23 Richard Guenther - * tree-ssa-operands.c (mark_difference_for_renaming): Use - bitmap_xor. + * tree-ssa-operands.c (mark_difference_for_renaming): Use bitmap_xor. 2008-05-23 Uros Bizjak Jakub Jelinek @@ -584,8 +589,8 @@ * doc/install.texi (Options specification): Document --enable-cld. * doc/invoke.texi (Machine Dependent Options) - [i386 and x86-64 Options]: Add -mcld option. - (Intel 386 and AMD x86-64 Options): Document -mcld option. + [i386 and x86-64 Options]: Add -mcld option. + (Intel 386 and AMD x86-64 Options): Document -mcld option. 2008-05-23 Kai Tietz * config/i386/i386.c (return_in_memory_32): Add ATTRIBUTE_UNUSED. @@ -824,16 +829,15 @@ parameter. * config/mips/mips.h (MIPS_COMPARE_AND_SWAP_12): Add OPS parameter. (MIPS_COMPARE_AND_SWAP_12_0): Delete macro. - (MIPS_COMPARE_AND_SWAP_12_ZERO_OP, - MIPS_COMPARE_AND_SWAP_12_NONZERO_OP, + (MIPS_COMPARE_AND_SWAP_12_ZERO_OP, MIPS_COMPARE_AND_SWAP_12_NONZERO_OP, MIPS_SYNC_OP_12, MIPS_SYNC_OP_12_NOT_NOP, MIPS_SYNC_OP_12_NOT_NOT, MIPS_SYNC_OLD_OP_12, MIPS_SYNC_OLD_OP_12_NOT_NOP, MIPS_SYNC_OLD_OP_12_NOT_NOP_REG, MIPS_SYNC_OLD_OP_12_NOT_NOT, MIPS_SYNC_OLD_OP_12_NOT_NOT_REG, MIPS_SYNC_NEW_OP_12, MIPS_SYNC_NEW_OP_12_NOT_NOP, MIPS_SYNC_NEW_OP_12_NOT_NOT, MIPS_SYNC_EXCHANGE_12, - MIPS_SYNC_EXCHANGE_12_ZERO_OP, - MIPS_SYNC_EXCHANGE_12_NONZERO_OP): New macros. + MIPS_SYNC_EXCHANGE_12_ZERO_OP, MIPS_SYNC_EXCHANGE_12_NONZERO_OP): + New macros. 2008-05-20 H.J. Lu @@ -995,8 +999,8 @@ * config/i386/i386.c (ix86_expand_vector_init_concat): New. (ix86_expand_vector_init_interleave): Likewise. - (ix86_expand_vector_init_general): Use them. Assert word_mode - == SImode when n_words == 4. + (ix86_expand_vector_init_general): Use them. Assert + word_mode == SImode when n_words == 4. 2008-05-19 Uros Bizjak diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 885077d02b2..c245a49fd3f 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -15798,80 +15798,80 @@ ;; Gcc is slightly more smart about handling normal two address instructions ;; so use special patterns for add and mull. -(define_insn "*fop_sf_comm_mixed" - [(set (match_operand:SF 0 "register_operand" "=f,x") - (match_operator:SF 3 "binary_fp_operator" - [(match_operand:SF 1 "nonimmediate_operand" "%0,0") - (match_operand:SF 2 "nonimmediate_operand" "fm,xm")]))] - "TARGET_MIX_SSE_I387 +(define_insn "*fop__comm_mixed" + [(set (match_operand:MODEF 0 "register_operand" "=f,x") + (match_operator:MODEF 3 "binary_fp_operator" + [(match_operand:MODEF 1 "nonimmediate_operand" "%0,0") + (match_operand:MODEF 2 "nonimmediate_operand" "fm,xm")]))] + "SSE_FLOAT_MODE_P (mode) && TARGET_MIX_SSE_I387 && COMMUTATIVE_ARITH_P (operands[3]) && !(MEM_P (operands[1]) && MEM_P (operands[2]))" "* return output_387_binary_op (insn, operands);" [(set (attr "type") (if_then_else (eq_attr "alternative" "1") - (if_then_else (match_operand:SF 3 "mult_operator" "") + (if_then_else (match_operand:MODEF 3 "mult_operator" "") (const_string "ssemul") (const_string "sseadd")) - (if_then_else (match_operand:SF 3 "mult_operator" "") + (if_then_else (match_operand:MODEF 3 "mult_operator" "") (const_string "fmul") (const_string "fop")))) - (set_attr "mode" "SF")]) + (set_attr "mode" "")]) -(define_insn "*fop_sf_comm_sse" - [(set (match_operand:SF 0 "register_operand" "=x") - (match_operator:SF 3 "binary_fp_operator" - [(match_operand:SF 1 "nonimmediate_operand" "%0") - (match_operand:SF 2 "nonimmediate_operand" "xm")]))] - "TARGET_SSE_MATH +(define_insn "*fop__comm_sse" + [(set (match_operand:MODEF 0 "register_operand" "=x") + (match_operator:MODEF 3 "binary_fp_operator" + [(match_operand:MODEF 1 "nonimmediate_operand" "%0") + (match_operand:MODEF 2 "nonimmediate_operand" "xm")]))] + "SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH && COMMUTATIVE_ARITH_P (operands[3]) && !(MEM_P (operands[1]) && MEM_P (operands[2]))" "* return output_387_binary_op (insn, operands);" [(set (attr "type") - (if_then_else (match_operand:SF 3 "mult_operator" "") + (if_then_else (match_operand:MODEF 3 "mult_operator" "") (const_string "ssemul") (const_string "sseadd"))) - (set_attr "mode" "SF")]) + (set_attr "mode" "")]) -(define_insn "*fop_sf_comm_i387" - [(set (match_operand:SF 0 "register_operand" "=f") - (match_operator:SF 3 "binary_fp_operator" - [(match_operand:SF 1 "nonimmediate_operand" "%0") - (match_operand:SF 2 "nonimmediate_operand" "fm")]))] +(define_insn "*fop__comm_i387" + [(set (match_operand:MODEF 0 "register_operand" "=f") + (match_operator:MODEF 3 "binary_fp_operator" + [(match_operand:MODEF 1 "nonimmediate_operand" "%0") + (match_operand:MODEF 2 "nonimmediate_operand" "fm")]))] "TARGET_80387 && COMMUTATIVE_ARITH_P (operands[3]) && !(MEM_P (operands[1]) && MEM_P (operands[2]))" "* return output_387_binary_op (insn, operands);" [(set (attr "type") - (if_then_else (match_operand:SF 3 "mult_operator" "") + (if_then_else (match_operand:MODEF 3 "mult_operator" "") (const_string "fmul") (const_string "fop"))) - (set_attr "mode" "SF")]) + (set_attr "mode" "")]) -(define_insn "*fop_sf_1_mixed" - [(set (match_operand:SF 0 "register_operand" "=f,f,x") - (match_operator:SF 3 "binary_fp_operator" - [(match_operand:SF 1 "nonimmediate_operand" "0,fm,0") - (match_operand:SF 2 "nonimmediate_operand" "fm,0,xm")]))] - "TARGET_MIX_SSE_I387 +(define_insn "*fop__1_mixed" + [(set (match_operand:MODEF 0 "register_operand" "=f,f,x") + (match_operator:MODEF 3 "binary_fp_operator" + [(match_operand:MODEF 1 "nonimmediate_operand" "0,fm,0") + (match_operand:MODEF 2 "nonimmediate_operand" "fm,0,xm")]))] + "SSE_FLOAT_MODE_P (mode) && TARGET_MIX_SSE_I387 && !COMMUTATIVE_ARITH_P (operands[3]) && !(MEM_P (operands[1]) && MEM_P (operands[2]))" "* return output_387_binary_op (insn, operands);" [(set (attr "type") (cond [(and (eq_attr "alternative" "2") - (match_operand:SF 3 "mult_operator" "")) + (match_operand:MODEF 3 "mult_operator" "")) (const_string "ssemul") (and (eq_attr "alternative" "2") - (match_operand:SF 3 "div_operator" "")) + (match_operand:MODEF 3 "div_operator" "")) (const_string "ssediv") (eq_attr "alternative" "2") (const_string "sseadd") - (match_operand:SF 3 "mult_operator" "") + (match_operand:MODEF 3 "mult_operator" "") (const_string "fmul") - (match_operand:SF 3 "div_operator" "") + (match_operand:MODEF 3 "div_operator" "") (const_string "fdiv") ] (const_string "fop"))) - (set_attr "mode" "SF")]) + (set_attr "mode" "")]) (define_insn "*rcpsf2_sse" [(set (match_operand:SF 0 "register_operand" "=x") @@ -15882,219 +15882,75 @@ [(set_attr "type" "sse") (set_attr "mode" "SF")]) -(define_insn "*fop_sf_1_sse" - [(set (match_operand:SF 0 "register_operand" "=x") - (match_operator:SF 3 "binary_fp_operator" - [(match_operand:SF 1 "register_operand" "0") - (match_operand:SF 2 "nonimmediate_operand" "xm")]))] - "TARGET_SSE_MATH +(define_insn "*fop__1_sse" + [(set (match_operand:MODEF 0 "register_operand" "=x") + (match_operator:MODEF 3 "binary_fp_operator" + [(match_operand:MODEF 1 "register_operand" "0") + (match_operand:MODEF 2 "nonimmediate_operand" "xm")]))] + "SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH && !COMMUTATIVE_ARITH_P (operands[3])" "* return output_387_binary_op (insn, operands);" [(set (attr "type") - (cond [(match_operand:SF 3 "mult_operator" "") + (cond [(match_operand:MODEF 3 "mult_operator" "") (const_string "ssemul") - (match_operand:SF 3 "div_operator" "") + (match_operand:MODEF 3 "div_operator" "") (const_string "ssediv") ] (const_string "sseadd"))) - (set_attr "mode" "SF")]) + (set_attr "mode" "")]) ;; This pattern is not fully shadowed by the pattern above. -(define_insn "*fop_sf_1_i387" - [(set (match_operand:SF 0 "register_operand" "=f,f") - (match_operator:SF 3 "binary_fp_operator" - [(match_operand:SF 1 "nonimmediate_operand" "0,fm") - (match_operand:SF 2 "nonimmediate_operand" "fm,0")]))] +(define_insn "*fop__1_i387" + [(set (match_operand:MODEF 0 "register_operand" "=f,f") + (match_operator:MODEF 3 "binary_fp_operator" + [(match_operand:MODEF 1 "nonimmediate_operand" "0,fm") + (match_operand:MODEF 2 "nonimmediate_operand" "fm,0")]))] "TARGET_80387 && !TARGET_SSE_MATH && !COMMUTATIVE_ARITH_P (operands[3]) && !(MEM_P (operands[1]) && MEM_P (operands[2]))" "* return output_387_binary_op (insn, operands);" [(set (attr "type") - (cond [(match_operand:SF 3 "mult_operator" "") + (cond [(match_operand:MODEF 3 "mult_operator" "") (const_string "fmul") - (match_operand:SF 3 "div_operator" "") + (match_operand:MODEF 3 "div_operator" "") (const_string "fdiv") ] (const_string "fop"))) - (set_attr "mode" "SF")]) - -;; ??? Add SSE splitters for these! -(define_insn "*fop_sf_2_i387" - [(set (match_operand:SF 0 "register_operand" "=f,f") - (match_operator:SF 3 "binary_fp_operator" - [(float:SF (match_operand:X87MODEI12 1 "nonimmediate_operand" "m,?r")) - (match_operand:SF 2 "register_operand" "0,0")]))] - "TARGET_80387 && TARGET_USE_MODE_FIOP && !TARGET_SSE_MATH" - "* return which_alternative ? \"#\" : output_387_binary_op (insn, operands);" - [(set (attr "type") - (cond [(match_operand:SF 3 "mult_operator" "") - (const_string "fmul") - (match_operand:SF 3 "div_operator" "") - (const_string "fdiv") - ] - (const_string "fop"))) - (set_attr "fp_int_src" "true") (set_attr "mode" "")]) -(define_insn "*fop_sf_3_i387" - [(set (match_operand:SF 0 "register_operand" "=f,f") - (match_operator:SF 3 "binary_fp_operator" - [(match_operand:SF 1 "register_operand" "0,0") - (float:SF (match_operand:X87MODEI12 2 "nonimmediate_operand" "m,?r"))]))] - "TARGET_80387 && TARGET_USE_MODE_FIOP && !TARGET_SSE_MATH" - "* return which_alternative ? \"#\" : output_387_binary_op (insn, operands);" - [(set (attr "type") - (cond [(match_operand:SF 3 "mult_operator" "") - (const_string "fmul") - (match_operand:SF 3 "div_operator" "") - (const_string "fdiv") - ] - (const_string "fop"))) - (set_attr "fp_int_src" "true") - (set_attr "mode" "")]) - -(define_insn "*fop_df_comm_mixed" - [(set (match_operand:DF 0 "register_operand" "=f,x") - (match_operator:DF 3 "binary_fp_operator" - [(match_operand:DF 1 "nonimmediate_operand" "%0,0") - (match_operand:DF 2 "nonimmediate_operand" "fm,xm")]))] - "TARGET_SSE2 && TARGET_MIX_SSE_I387 - && COMMUTATIVE_ARITH_P (operands[3]) - && !(MEM_P (operands[1]) && MEM_P (operands[2]))" - "* return output_387_binary_op (insn, operands);" - [(set (attr "type") - (if_then_else (eq_attr "alternative" "1") - (if_then_else (match_operand:DF 3 "mult_operator" "") - (const_string "ssemul") - (const_string "sseadd")) - (if_then_else (match_operand:DF 3 "mult_operator" "") - (const_string "fmul") - (const_string "fop")))) - (set_attr "mode" "DF")]) - -(define_insn "*fop_df_comm_sse" - [(set (match_operand:DF 0 "register_operand" "=x") - (match_operator:DF 3 "binary_fp_operator" - [(match_operand:DF 1 "nonimmediate_operand" "%0") - (match_operand:DF 2 "nonimmediate_operand" "xm")]))] - "TARGET_SSE2 && TARGET_SSE_MATH - && COMMUTATIVE_ARITH_P (operands[3]) - && !(MEM_P (operands[1]) && MEM_P (operands[2]))" - "* return output_387_binary_op (insn, operands);" - [(set (attr "type") - (if_then_else (match_operand:DF 3 "mult_operator" "") - (const_string "ssemul") - (const_string "sseadd"))) - (set_attr "mode" "DF")]) - -(define_insn "*fop_df_comm_i387" - [(set (match_operand:DF 0 "register_operand" "=f") - (match_operator:DF 3 "binary_fp_operator" - [(match_operand:DF 1 "nonimmediate_operand" "%0") - (match_operand:DF 2 "nonimmediate_operand" "fm")]))] - "TARGET_80387 - && COMMUTATIVE_ARITH_P (operands[3]) - && !(MEM_P (operands[1]) && MEM_P (operands[2]))" - "* return output_387_binary_op (insn, operands);" - [(set (attr "type") - (if_then_else (match_operand:DF 3 "mult_operator" "") - (const_string "fmul") - (const_string "fop"))) - (set_attr "mode" "DF")]) - -(define_insn "*fop_df_1_mixed" - [(set (match_operand:DF 0 "register_operand" "=f,f,x") - (match_operator:DF 3 "binary_fp_operator" - [(match_operand:DF 1 "nonimmediate_operand" "0,fm,0") - (match_operand:DF 2 "nonimmediate_operand" "fm,0,xm")]))] - "TARGET_SSE2 && TARGET_SSE_MATH && TARGET_MIX_SSE_I387 - && !COMMUTATIVE_ARITH_P (operands[3]) - && !(MEM_P (operands[1]) && MEM_P (operands[2]))" - "* return output_387_binary_op (insn, operands);" - [(set (attr "type") - (cond [(and (eq_attr "alternative" "2") - (match_operand:DF 3 "mult_operator" "")) - (const_string "ssemul") - (and (eq_attr "alternative" "2") - (match_operand:DF 3 "div_operator" "")) - (const_string "ssediv") - (eq_attr "alternative" "2") - (const_string "sseadd") - (match_operand:DF 3 "mult_operator" "") - (const_string "fmul") - (match_operand:DF 3 "div_operator" "") - (const_string "fdiv") - ] - (const_string "fop"))) - (set_attr "mode" "DF")]) - -(define_insn "*fop_df_1_sse" - [(set (match_operand:DF 0 "register_operand" "=x") - (match_operator:DF 3 "binary_fp_operator" - [(match_operand:DF 1 "register_operand" "0") - (match_operand:DF 2 "nonimmediate_operand" "xm")]))] - "TARGET_SSE2 && TARGET_SSE_MATH - && !COMMUTATIVE_ARITH_P (operands[3])" - "* return output_387_binary_op (insn, operands);" - [(set_attr "mode" "DF") - (set (attr "type") - (cond [(match_operand:DF 3 "mult_operator" "") - (const_string "ssemul") - (match_operand:DF 3 "div_operator" "") - (const_string "ssediv") - ] - (const_string "sseadd")))]) - -;; This pattern is not fully shadowed by the pattern above. -(define_insn "*fop_df_1_i387" - [(set (match_operand:DF 0 "register_operand" "=f,f") - (match_operator:DF 3 "binary_fp_operator" - [(match_operand:DF 1 "nonimmediate_operand" "0,fm") - (match_operand:DF 2 "nonimmediate_operand" "fm,0")]))] - "TARGET_80387 && !(TARGET_SSE2 && TARGET_SSE_MATH) - && !COMMUTATIVE_ARITH_P (operands[3]) - && !(MEM_P (operands[1]) && MEM_P (operands[2]))" - "* return output_387_binary_op (insn, operands);" - [(set (attr "type") - (cond [(match_operand:DF 3 "mult_operator" "") - (const_string "fmul") - (match_operand:DF 3 "div_operator" "") - (const_string "fdiv") - ] - (const_string "fop"))) - (set_attr "mode" "DF")]) - ;; ??? Add SSE splitters for these! -(define_insn "*fop_df_2_i387" - [(set (match_operand:DF 0 "register_operand" "=f,f") - (match_operator:DF 3 "binary_fp_operator" - [(float:DF (match_operand:X87MODEI12 1 "nonimmediate_operand" "m,?r")) - (match_operand:DF 2 "register_operand" "0,0")]))] - "TARGET_80387 && TARGET_USE_MODE_FIOP - && !(TARGET_SSE2 && TARGET_SSE_MATH)" +(define_insn "*fop__2_i387" + [(set (match_operand:MODEF 0 "register_operand" "=f,f") + (match_operator:MODEF 3 "binary_fp_operator" + [(float:MODEF + (match_operand:X87MODEI12 1 "nonimmediate_operand" "m,?r")) + (match_operand:MODEF 2 "register_operand" "0,0")]))] + "TARGET_80387 && !TARGET_SSE_MATH + && TARGET_USE_MODE_FIOP" "* return which_alternative ? \"#\" : output_387_binary_op (insn, operands);" [(set (attr "type") - (cond [(match_operand:DF 3 "mult_operator" "") + (cond [(match_operand:MODEF 3 "mult_operator" "") (const_string "fmul") - (match_operand:DF 3 "div_operator" "") + (match_operand:MODEF 3 "div_operator" "") (const_string "fdiv") ] (const_string "fop"))) (set_attr "fp_int_src" "true") - (set_attr "mode" "")]) - -(define_insn "*fop_df_3_i387" - [(set (match_operand:DF 0 "register_operand" "=f,f") - (match_operator:DF 3 "binary_fp_operator" - [(match_operand:DF 1 "register_operand" "0,0") - (float:DF (match_operand:X87MODEI12 2 "nonimmediate_operand" "m,?r"))]))] - "TARGET_80387 && TARGET_USE_MODE_FIOP - && !(TARGET_SSE2 && TARGET_SSE_MATH)" + (set_attr "mode" "")]) + +(define_insn "*fop__3_i387" + [(set (match_operand:MODEF 0 "register_operand" "=f,f") + (match_operator:MODEF 3 "binary_fp_operator" + [(match_operand:MODEF 1 "register_operand" "0,0") + (float:MODEF + (match_operand:X87MODEI12 2 "nonimmediate_operand" "m,?r"))]))] + "TARGET_80387 && !TARGET_SSE_MATH + && TARGET_USE_MODE_FIOP" "* return which_alternative ? \"#\" : output_387_binary_op (insn, operands);" [(set (attr "type") - (cond [(match_operand:DF 3 "mult_operator" "") + (cond [(match_operand:MODEF 3 "mult_operator" "") (const_string "fmul") - (match_operand:DF 3 "div_operator" "") + (match_operand:MODEF 3 "div_operator" "") (const_string "fdiv") ] (const_string "fop"))) @@ -16184,11 +16040,12 @@ (const_string "fop"))) (set_attr "mode" "XF")]) -(define_insn "*fop_xf_2_i387" +(define_insn "*fop_xf_2_i387" [(set (match_operand:XF 0 "register_operand" "=f,f") (match_operator:XF 3 "binary_fp_operator" - [(float:XF (match_operand:X87MODEI12 1 "nonimmediate_operand" "m,?r")) - (match_operand:XF 2 "register_operand" "0,0")]))] + [(float:XF + (match_operand:X87MODEI12 1 "nonimmediate_operand" "m,?r")) + (match_operand:XF 2 "register_operand" "0,0")]))] "TARGET_80387 && TARGET_USE_MODE_FIOP" "* return which_alternative ? \"#\" : output_387_binary_op (insn, operands);" [(set (attr "type") @@ -16201,11 +16058,12 @@ (set_attr "fp_int_src" "true") (set_attr "mode" "")]) -(define_insn "*fop_xf_3_i387" +(define_insn "*fop_xf_3_i387" [(set (match_operand:XF 0 "register_operand" "=f,f") (match_operator:XF 3 "binary_fp_operator" [(match_operand:XF 1 "register_operand" "0,0") - (float:XF (match_operand:X87MODEI12 2 "nonimmediate_operand" "m,?r"))]))] + (float:XF + (match_operand:X87MODEI12 2 "nonimmediate_operand" "m,?r"))]))] "TARGET_80387 && TARGET_USE_MODE_FIOP" "* return which_alternative ? \"#\" : output_387_binary_op (insn, operands);" [(set (attr "type") @@ -16233,7 +16091,7 @@ (const_string "fdiv") ] (const_string "fop"))) - (set_attr "mode" "SF")]) + (set_attr "mode" "")]) (define_insn "*fop_xf_5_i387" [(set (match_operand:XF 0 "register_operand" "=f,f") @@ -16250,7 +16108,7 @@ (const_string "fdiv") ] (const_string "fop"))) - (set_attr "mode" "SF")]) + (set_attr "mode" "")]) (define_insn "*fop_xf_6_i387" [(set (match_operand:XF 0 "register_operand" "=f,f") @@ -16268,7 +16126,7 @@ (const_string "fdiv") ] (const_string "fop"))) - (set_attr "mode" "SF")]) + (set_attr "mode" "")]) (define_split [(set (match_operand 0 "register_operand" "") -- 2.30.2