diff options
author | Uros Bizjak <uros@kss-loka.si> | 2005-06-19 10:51:54 +0200 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2005-06-19 01:51:54 -0700 |
commit | af12f8ea01180c592d6ab79407b0d6781f86eea7 (patch) | |
tree | dcc93a09ca405ae50d45a3e689b4bfc3dcb7e636 /gcc | |
parent | aa941a60d7d6f3f8ebfa84731d89b701ff2527be (diff) | |
download | gcc-af12f8ea01180c592d6ab79407b0d6781f86eea7.zip gcc-af12f8ea01180c592d6ab79407b0d6781f86eea7.tar.gz gcc-af12f8ea01180c592d6ab79407b0d6781f86eea7.tar.bz2 |
i386.md (*cmpfp_0_sf, [...]): Remove instruction patterns.
2005-06-19 Uros Bizjak <uros@kss-loka.si>
* config/i386/i386.md (*cmpfp_0_sf, *cmpfp_0_df, cmpfp_0_xf):
Remove instruction patterns.
(*cmpfp_0): New instruction pattern. Set "unit" attribute to "i387".
(*cmpfp_sf, *cmpfp_df, *cmpfp_xf, *cmpfp_u, *_cmpfp_<mode>):
Set "unit" attribute to "i387".
(*pushsf, *pushsf_rex64, *pushdf_nointeger, *pushdf_integer)
(*pushxf_nointeger, *pushxf_integer): Set "unit" attribute to "i387"
for alternative 0.
(*truncdfsf_mixed, *truncdfsf_i387, *truncxfsf2_mixed)
(*truncxfsf2_i387, *truncxfdf2_mixed, *truncxfdf2_i387): Set "unit"
attribute to "i387" when "type" attribute equals "multi".
(*floathisf2_i387, *floatsisf2_mixed, *floatsisf2_i387)
(*floatdisf2_mixed, *floatdisf2_i387, *floathidf2_i387)
(*floatsidf2_mixed, *floatsidf2_i387, *floatdidf2_mixed)
(*floatdidf2_i387, floathixf2, floatsixf2, floatdixf2): Set "unit"
attribute to "i387" when "type" attribute equals "multi".
* config/i386/mmx.md (*mov<mode>_internal_rex64)
(*mov<mode>_internal, *movv2sf_internal_rex64, *movv2sf_internal):
Set "unit" attribute to "mmx" when "type" attribute equals "ssecvt".
(mmx_pmovmskb): Correct wrong "type" and "mode" attributes.
* config/i386/sse.md (sse_cvtps2pi, sse_cvttps2pi, sse_cvtpd2di)
(sse_cvttpd2pi): Set "unit" attribute to "mmx".
(sse2_cvtpi2pd): Split register constraints. Set "unit" attribute
to "mmx" for "y" operand 1.
From-SVN: r101180
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 27 | ||||
-rw-r--r-- | gcc/config/i386/i386.md | 73 | ||||
-rw-r--r-- | gcc/config/i386/mmx.md | 8 | ||||
-rw-r--r-- | gcc/config/i386/sse.md | 9 |
4 files changed, 84 insertions, 33 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c527a5d..cedf800 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,32 @@ 2005-06-19 Uros Bizjak <uros@kss-loka.si> + * config/i386/i386.md (*cmpfp_0_sf, *cmpfp_0_df, cmpfp_0_xf): + Remove instruction patterns. + (*cmpfp_0): New instruction pattern. Set "unit" attribute to "i387". + (*cmpfp_sf, *cmpfp_df, *cmpfp_xf, *cmpfp_u, *_cmpfp_<mode>): + Set "unit" attribute to "i387". + (*pushsf, *pushsf_rex64, *pushdf_nointeger, *pushdf_integer) + (*pushxf_nointeger, *pushxf_integer): Set "unit" attribute to "i387" + for alternative 0. + (*truncdfsf_mixed, *truncdfsf_i387, *truncxfsf2_mixed) + (*truncxfsf2_i387, *truncxfdf2_mixed, *truncxfdf2_i387): Set "unit" + attribute to "i387" when "type" attribute equals "multi". + (*floathisf2_i387, *floatsisf2_mixed, *floatsisf2_i387) + (*floatdisf2_mixed, *floatdisf2_i387, *floathidf2_i387) + (*floatsidf2_mixed, *floatsidf2_i387, *floatdidf2_mixed) + (*floatdidf2_i387, floathixf2, floatsixf2, floatdixf2): Set "unit" + attribute to "i387" when "type" attribute equals "multi". + * config/i386/mmx.md (*mov<mode>_internal_rex64) + (*mov<mode>_internal, *movv2sf_internal_rex64, *movv2sf_internal): + Set "unit" attribute to "mmx" when "type" attribute equals "ssecvt". + (mmx_pmovmskb): Correct wrong "type" and "mode" attributes. + * config/i386/sse.md (sse_cvtps2pi, sse_cvttps2pi, sse_cvtpd2di) + (sse_cvttpd2pi): Set "unit" attribute to "mmx". + (sse2_cvtpi2pd): Split register constraints. Set "unit" attribute + to "mmx" for "y" operand 1. + +2005-06-19 Uros Bizjak <uros@kss-loka.si> + * config/i386/i386.c (ix86_function_arg_regno_p): Add MMX_REGNO_P for TARGET_MMX. Use MMX_REGPARM_MAX and SSE_REGPARM_MAX for MMX and SSE registers to determine if regno is valid. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 000a18e..5ab7e84 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -814,41 +814,26 @@ ;; We may not use "#" to split and emit these, since the REG_DEAD notes ;; used to manage the reg stack popping would not be preserved. -(define_insn "*cmpfp_0_sf" +(define_insn "*cmpfp_0" [(set (match_operand:HI 0 "register_operand" "=a") (unspec:HI [(compare:CCFP - (match_operand:SF 1 "register_operand" "f") - (match_operand:SF 2 "const0_operand" "X"))] - UNSPEC_FNSTSW))] - "TARGET_80387" - "* return output_fp_compare (insn, operands, 0, 0);" - [(set_attr "type" "multi") - (set_attr "mode" "SF")]) - -(define_insn "*cmpfp_0_df" - [(set (match_operand:HI 0 "register_operand" "=a") - (unspec:HI - [(compare:CCFP - (match_operand:DF 1 "register_operand" "f") - (match_operand:DF 2 "const0_operand" "X"))] - UNSPEC_FNSTSW))] - "TARGET_80387" - "* return output_fp_compare (insn, operands, 0, 0);" - [(set_attr "type" "multi") - (set_attr "mode" "DF")]) - -(define_insn "*cmpfp_0_xf" - [(set (match_operand:HI 0 "register_operand" "=a") - (unspec:HI - [(compare:CCFP - (match_operand:XF 1 "register_operand" "f") - (match_operand:XF 2 "const0_operand" "X"))] + (match_operand 1 "register_operand" "f") + (match_operand 2 "const0_operand" "X"))] UNSPEC_FNSTSW))] - "TARGET_80387" + "TARGET_80387 + && FLOAT_MODE_P (GET_MODE (operands[1])) + && GET_MODE (operands[1]) == GET_MODE (operands[2])" "* return output_fp_compare (insn, operands, 0, 0);" [(set_attr "type" "multi") - (set_attr "mode" "XF")]) + (set_attr "unit" "i387") + (set (attr "mode") + (cond [(match_operand:SF 1 "" "") + (const_string "SF") + (match_operand:DF 1 "" "") + (const_string "DF") + ] + (const_string "XF")))]) (define_insn "*cmpfp_sf" [(set (match_operand:HI 0 "register_operand" "=a") @@ -860,6 +845,7 @@ "TARGET_80387" "* return output_fp_compare (insn, operands, 0, 0);" [(set_attr "type" "multi") + (set_attr "unit" "i387") (set_attr "mode" "SF")]) (define_insn "*cmpfp_df" @@ -872,6 +858,7 @@ "TARGET_80387" "* return output_fp_compare (insn, operands, 0, 0);" [(set_attr "type" "multi") + (set_attr "unit" "i387") (set_attr "mode" "DF")]) (define_insn "*cmpfp_xf" @@ -884,6 +871,7 @@ "TARGET_80387" "* return output_fp_compare (insn, operands, 0, 0);" [(set_attr "type" "multi") + (set_attr "unit" "i387") (set_attr "mode" "XF")]) (define_insn "*cmpfp_u" @@ -898,6 +886,7 @@ && GET_MODE (operands[1]) == GET_MODE (operands[2])" "* return output_fp_compare (insn, operands, 0, 1);" [(set_attr "type" "multi") + (set_attr "unit" "i387") (set (attr "mode") (cond [(match_operand:SF 1 "" "") (const_string "SF") @@ -919,6 +908,7 @@ && (GET_MODE (operands [3]) == GET_MODE (operands[1]))" "* return output_fp_compare (insn, operands, 0, 0);" [(set_attr "type" "multi") + (set_attr "unit" "i387") (set_attr "fp_int_src" "true") (set_attr "mode" "<MODE>")]) @@ -2209,6 +2199,7 @@ return "push{l}\t%1"; } [(set_attr "type" "multi,push,multi") + (set_attr "unit" "i387,*,*") (set_attr "mode" "SF,SI,SF")]) (define_insn "*pushsf_rex64" @@ -2221,6 +2212,7 @@ return "push{q}\t%q1"; } [(set_attr "type" "multi,push,multi") + (set_attr "unit" "i387,*,*") (set_attr "mode" "SF,DI,SF")]) (define_split @@ -2374,6 +2366,7 @@ gcc_unreachable (); } [(set_attr "type" "multi") + (set_attr "unit" "i387,*,*,*") (set_attr "mode" "DF,SI,SI,DF")]) (define_insn "*pushdf_integer" @@ -2385,6 +2378,7 @@ gcc_unreachable (); } [(set_attr "type" "multi") + (set_attr "unit" "i387,*,*") (set_attr "mode" "DF,SI,DF")]) ;; %%% Kill this when call knows how to work this out. @@ -2707,6 +2701,7 @@ gcc_unreachable (); } [(set_attr "type" "multi") + (set_attr "unit" "i387,*,*") (set_attr "mode" "XF,SI,SI")]) (define_insn "*pushxf_integer" @@ -2718,6 +2713,7 @@ gcc_unreachable (); } [(set_attr "type" "multi") + (set_attr "unit" "i387,*") (set_attr "mode" "XF,SI")]) (define_split @@ -3745,6 +3741,7 @@ } } [(set_attr "type" "fmov,multi,ssecvt") + (set_attr "unit" "*,i387,*") (set_attr "mode" "SF")]) (define_insn "*truncdfsf_i387" @@ -3768,6 +3765,7 @@ } } [(set_attr "type" "fmov,multi") + (set_attr "unit" "*,i387") (set_attr "mode" "SF")]) (define_insn "*truncdfsf2_i387_1" @@ -3833,6 +3831,7 @@ return "fst%z0\t%y0"; } [(set_attr "type" "fmov,multi,multi,multi") + (set_attr "unit" "*,i387,i387,i387") (set_attr "mode" "SF")]) (define_insn "truncxfsf2_i387_noop" @@ -3859,6 +3858,7 @@ return "fst%z0\t%y0"; } [(set_attr "type" "fmov,multi,multi") + (set_attr "unit" "*,i387,i387") (set_attr "mode" "SF")]) (define_insn "*truncxfsf2_i387_1" @@ -3929,6 +3929,7 @@ return "fst%z0\t%y0"; } [(set_attr "type" "fmov,multi,multi,multi") + (set_attr "unit" "*,i387,i387,i387") (set_attr "mode" "DF")]) (define_insn "truncxfdf2_i387_noop" @@ -3955,6 +3956,7 @@ return "fst%z0\t%y0"; } [(set_attr "type" "fmov,multi,multi") + (set_attr "unit" "*,i387,i387") (set_attr "mode" "DF")]) (define_insn "*truncxfdf2_i387_1" @@ -4405,6 +4407,7 @@ #" [(set_attr "type" "fmov,multi") (set_attr "mode" "SF") + (set_attr "unit" "*,i387") (set_attr "fp_int_src" "true")]) (define_expand "floatsisf2" @@ -4424,6 +4427,7 @@ cvtsi2ss\t{%1, %0|%0, %1}" [(set_attr "type" "fmov,multi,sseicvt,sseicvt") (set_attr "mode" "SF") + (set_attr "unit" "*,i387,*,*") (set_attr "athlon_decode" "*,*,vector,double") (set_attr "fp_int_src" "true")]) @@ -4446,6 +4450,7 @@ #" [(set_attr "type" "fmov,multi") (set_attr "mode" "SF") + (set_attr "unit" "*,i387") (set_attr "fp_int_src" "true")]) (define_expand "floatdisf2" @@ -4465,6 +4470,7 @@ cvtsi2ss{q}\t{%1, %0|%0, %1}" [(set_attr "type" "fmov,multi,sseicvt,sseicvt") (set_attr "mode" "SF") + (set_attr "unit" "*,i387,*,*") (set_attr "athlon_decode" "*,*,vector,double") (set_attr "fp_int_src" "true")]) @@ -4487,6 +4493,7 @@ #" [(set_attr "type" "fmov,multi") (set_attr "mode" "SF") + (set_attr "unit" "*,i387") (set_attr "fp_int_src" "true")]) (define_expand "floathidf2" @@ -4511,6 +4518,7 @@ #" [(set_attr "type" "fmov,multi") (set_attr "mode" "DF") + (set_attr "unit" "*,i387") (set_attr "fp_int_src" "true")]) (define_expand "floatsidf2" @@ -4530,6 +4538,7 @@ cvtsi2sd\t{%1, %0|%0, %1}" [(set_attr "type" "fmov,multi,sseicvt,sseicvt") (set_attr "mode" "DF") + (set_attr "unit" "*,i387,*,*") (set_attr "athlon_decode" "*,*,double,direct") (set_attr "fp_int_src" "true")]) @@ -4552,6 +4561,7 @@ #" [(set_attr "type" "fmov,multi") (set_attr "mode" "DF") + (set_attr "unit" "*,i387") (set_attr "fp_int_src" "true")]) (define_expand "floatdidf2" @@ -4571,6 +4581,7 @@ cvtsi2sd{q}\t{%1, %0|%0, %1}" [(set_attr "type" "fmov,multi,sseicvt,sseicvt") (set_attr "mode" "DF") + (set_attr "unit" "*,i387,*,*") (set_attr "athlon_decode" "*,*,double,direct") (set_attr "fp_int_src" "true")]) @@ -4593,6 +4604,7 @@ #" [(set_attr "type" "fmov,multi") (set_attr "mode" "DF") + (set_attr "unit" "*,i387") (set_attr "fp_int_src" "true")]) (define_insn "floathixf2" @@ -4604,6 +4616,7 @@ #" [(set_attr "type" "fmov,multi") (set_attr "mode" "XF") + (set_attr "unit" "*,i387") (set_attr "fp_int_src" "true")]) (define_insn "floatsixf2" @@ -4615,6 +4628,7 @@ #" [(set_attr "type" "fmov,multi") (set_attr "mode" "XF") + (set_attr "unit" "*,i387") (set_attr "fp_int_src" "true")]) (define_insn "floatdixf2" @@ -4626,6 +4640,7 @@ #" [(set_attr "type" "fmov,multi") (set_attr "mode" "XF") + (set_attr "unit" "*,i387") (set_attr "fp_int_src" "true")]) ;; %%% Kill these when reload knows how to do it. diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md index ceb520c..ffb8d541 100644 --- a/gcc/config/i386/mmx.md +++ b/gcc/config/i386/mmx.md @@ -83,6 +83,7 @@ movd\t{%1, %0|%0, %1} movd\t{%1, %0|%0, %1}" [(set_attr "type" "imov,imov,mmxmov,mmxmov,mmxmov,ssecvt,ssecvt,ssemov,ssemov,ssemov,ssemov,ssemov") + (set_attr "unit" "*,*,*,*,*,mmx,mmx,*,*,*,*,*") (set_attr "mode" "DI")]) (define_insn "*mov<mode>_internal" @@ -108,6 +109,7 @@ # #" [(set_attr "type" "mmxmov,mmxmov,mmxmov,ssecvt,ssecvt,ssemov,ssemov,ssemov,ssemov,ssemov,ssemov,ssemov,*,*") + (set_attr "unit" "*,*,*,mmx,mmx,*,*,*,*,*,*,*,*,*") (set_attr "mode" "DI,DI,DI,DI,DI,TI,DI,DI,V4SF,V4SF,V2SF,V2SF,DI,DI")]) (define_expand "movv2sf" @@ -141,6 +143,7 @@ movd\t{%1, %0|%0, %1} movd\t{%1, %0|%0, %1}" [(set_attr "type" "imov,imov,mmxmov,mmxmov,mmxmov,ssecvt,ssecvt,ssemov,ssemov,ssemov,ssemov,ssemov,ssemov") + (set_attr "unit" "*,*,*,*,*,mmx,mmx,*,*,*,*,*,*") (set_attr "mode" "DI,DI,DI,DI,DI,DI,DI,V4SF,V4SF,V2SF,V2SF,DI,DI")]) (define_insn "*movv2sf_internal" @@ -163,6 +166,7 @@ # #" [(set_attr "type" "mmxmov,mmxmov,mmxmov,ssecvt,ssecvt,ssemov,ssemov,ssemov,ssemov,*,*") + (set_attr "unit" "*,*,*,mmx,mmx,*,*,*,*,*,*") (set_attr "mode" "DI,DI,DI,DI,DI,V4SF,V4SF,V2SF,V2SF,DI,DI")]) ;; %%% This multiword shite has got to go. @@ -1346,8 +1350,8 @@ UNSPEC_MOVMSK))] "TARGET_SSE || TARGET_3DNOW_A" "pmovmskb\t{%1, %0|%0, %1}" - [(set_attr "type" "ssecvt") - (set_attr "mode" "V4SF")]) + [(set_attr "type" "mmxcvt") + (set_attr "mode" "DI")]) (define_expand "mmx_maskmovq" [(set (match_operand:V8QI 0 "memory_operand" "") diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index e323937..35a07ce 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -891,6 +891,7 @@ "TARGET_SSE" "cvtps2pi\t{%1, %0|%0, %1}" [(set_attr "type" "ssecvt") + (set_attr "unit" "mmx") (set_attr "mode" "DI")]) (define_insn "sse_cvttps2pi" @@ -901,6 +902,7 @@ "TARGET_SSE" "cvttps2pi\t{%1, %0|%0, %1}" [(set_attr "type" "ssecvt") + (set_attr "unit" "mmx") (set_attr "mode" "SF")]) (define_insn "sse_cvtsi2ss" @@ -1825,11 +1827,12 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (define_insn "sse2_cvtpi2pd" - [(set (match_operand:V2DF 0 "register_operand" "=x") - (float:V2DF (match_operand:V2SI 1 "nonimmediate_operand" "ym")))] + [(set (match_operand:V2DF 0 "register_operand" "=x,x") + (float:V2DF (match_operand:V2SI 1 "nonimmediate_operand" "y,m")))] "TARGET_SSE2" "cvtpi2pd\t{%1, %0|%0, %1}" [(set_attr "type" "ssecvt") + (set_attr "unit" "mmx,*") (set_attr "mode" "V2DF")]) (define_insn "sse2_cvtpd2pi" @@ -1839,6 +1842,7 @@ "TARGET_SSE2" "cvtpd2pi\t{%1, %0|%0, %1}" [(set_attr "type" "ssecvt") + (set_attr "unit" "mmx") (set_attr "mode" "DI")]) (define_insn "sse2_cvttpd2pi" @@ -1847,6 +1851,7 @@ "TARGET_SSE2" "cvttpd2pi\t{%1, %0|%0, %1}" [(set_attr "type" "ssecvt") + (set_attr "unit" "mmx") (set_attr "mode" "TI")]) (define_insn "sse2_cvtsi2sd" |