diff options
Diffstat (limited to 'gcc/config/arm/vfp.md')
-rw-r--r-- | gcc/config/arm/vfp.md | 66 |
1 files changed, 38 insertions, 28 deletions
diff --git a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md index c6ace731e66..443562b629e 100644 --- a/gcc/config/arm/vfp.md +++ b/gcc/config/arm/vfp.md @@ -55,53 +55,63 @@ (define_cpu_unit "vfp_ls" "vfp11") +(define_cpu_unit "fmstat" "vfp11") + +(exclusion_set "fmac,ds" "fmstat") + ;; The VFP "type" attributes differ from those used in the FPA model. ;; ffarith Fast floating point insns, e.g. abs, neg, cpy, cmp. ;; farith Most arithmetic insns. ;; fmul Double precision multiply. ;; fdivs Single precision sqrt or division. ;; fdivd Double precision sqrt or division. -;; f_load Floating point load from memory. -;; f_store Floating point store to memory. +;; f_flag fmstat operation +;; f_load[sd] Floating point load from memory. +;; f_store[sd] Floating point store to memory. ;; f_2_r Transfer vfp to arm reg. ;; r_2_f Transfer arm to vfp reg. +;; f_cvt Convert floating<->integral (define_insn_reservation "vfp_ffarith" 4 - (and (eq_attr "fpu" "vfp") + (and (eq_attr "generic_vfp" "yes") (eq_attr "type" "ffarith")) "fmac") (define_insn_reservation "vfp_farith" 8 - (and (eq_attr "fpu" "vfp") - (eq_attr "type" "farith")) + (and (eq_attr "generic_vfp" "yes") + (eq_attr "type" "farith,f_cvt")) "fmac") (define_insn_reservation "vfp_fmul" 9 - (and (eq_attr "fpu" "vfp") + (and (eq_attr "generic_vfp" "yes") (eq_attr "type" "fmul")) "fmac*2") (define_insn_reservation "vfp_fdivs" 19 - (and (eq_attr "fpu" "vfp") + (and (eq_attr "generic_vfp" "yes") (eq_attr "type" "fdivs")) "ds*15") (define_insn_reservation "vfp_fdivd" 33 - (and (eq_attr "fpu" "vfp") + (and (eq_attr "generic_vfp" "yes") (eq_attr "type" "fdivd")) "fmac+ds*29") ;; Moves to/from arm regs also use the load/store pipeline. (define_insn_reservation "vfp_fload" 4 - (and (eq_attr "fpu" "vfp") - (eq_attr "type" "f_load,r_2_f")) + (and (eq_attr "generic_vfp" "yes") + (eq_attr "type" "f_loads,f_loadd,r_2_f")) "vfp_ls") (define_insn_reservation "vfp_fstore" 4 - (and (eq_attr "fpu" "vfp") - (eq_attr "type" "f_load,f_2_r")) + (and (eq_attr "generic_vfp" "yes") + (eq_attr "type" "f_stores,f_stored,f_2_r")) "vfp_ls") +(define_insn_reservation "vfp_to_cpsr" 4 + (and (eq_attr "generic_vfp" "yes") + (eq_attr "type" "f_flag")) + "fmstat,vfp_ls*3") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Insn pattern @@ -127,7 +137,7 @@ flds%?\\t%0, %1\\t%@ int fsts%?\\t%1, %0\\t%@ int" [(set_attr "predicable" "yes") - (set_attr "type" "*,*,load1,store1,r_2_f,f_2_r,ffarith,f_load,f_store") + (set_attr "type" "*,*,load1,store1,r_2_f,f_2_r,ffarith,f_loads,f_stores") (set_attr "pool_range" "*,*,4096,*,*,*,*,1020,*") (set_attr "neg_pool_range" "*,*,4084,*,*,*,*,1008,*")] ) @@ -161,7 +171,7 @@ gcc_unreachable (); } " - [(set_attr "type" "*,load2,store2,r_2_f,f_2_r,ffarith,f_load,f_store") + [(set_attr "type" "*,load2,store2,r_2_f,f_2_r,ffarith,f_loadd,f_stored") (set_attr "length" "8,8,8,4,4,4,4,4") (set_attr "pool_range" "*,1020,*,*,*,*,1020,*") (set_attr "neg_pool_range" "*,1008,*,*,*,*,1008,*")] @@ -186,7 +196,7 @@ fcpys%?\\t%0, %1 mov%?\\t%0, %1\\t%@ float" [(set_attr "predicable" "yes") - (set_attr "type" "r_2_f,f_2_r,ffarith,*,f_load,f_store,load1,store1") + (set_attr "type" "r_2_f,f_2_r,ffarith,*,f_loads,f_stores,load1,store1") (set_attr "pool_range" "*,*,1020,*,4096,*,*,*") (set_attr "neg_pool_range" "*,*,1008,*,4080,*,*,*")] ) @@ -221,7 +231,7 @@ } } " - [(set_attr "type" "r_2_f,f_2_r,ffarith,*,load2,store2,f_load,f_store") + [(set_attr "type" "r_2_f,f_2_r,ffarith,*,load2,store2,f_loadd,f_stored") (set_attr "length" "4,4,8,8,4,4,4,8") (set_attr "pool_range" "*,*,1020,*,1020,*,*,*") (set_attr "neg_pool_range" "*,*,1008,*,1008,*,*,*")] @@ -572,7 +582,7 @@ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP" "fcvtds%?\\t%P0, %1" [(set_attr "predicable" "yes") - (set_attr "type" "farith")] + (set_attr "type" "f_cvt")] ) (define_insn "*truncdfsf2_vfp" @@ -581,7 +591,7 @@ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP" "fcvtsd%?\\t%0, %P1" [(set_attr "predicable" "yes") - (set_attr "type" "farith")] + (set_attr "type" "f_cvt")] ) (define_insn "*truncsisf2_vfp" @@ -590,7 +600,7 @@ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP" "ftosizs%?\\t%0, %1" [(set_attr "predicable" "yes") - (set_attr "type" "farith")] + (set_attr "type" "f_cvt")] ) (define_insn "*truncsidf2_vfp" @@ -599,7 +609,7 @@ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP" "ftosizd%?\\t%0, %P1" [(set_attr "predicable" "yes") - (set_attr "type" "farith")] + (set_attr "type" "f_cvt")] ) @@ -609,7 +619,7 @@ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP" "ftouizs%?\\t%0, %1" [(set_attr "predicable" "yes") - (set_attr "type" "farith")] + (set_attr "type" "f_cvt")] ) (define_insn "fixuns_truncdfsi2" @@ -618,7 +628,7 @@ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP" "ftouizd%?\\t%0, %P1" [(set_attr "predicable" "yes") - (set_attr "type" "farith")] + (set_attr "type" "f_cvt")] ) @@ -628,7 +638,7 @@ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP" "fsitos%?\\t%0, %1" [(set_attr "predicable" "yes") - (set_attr "type" "farith")] + (set_attr "type" "f_cvt")] ) (define_insn "*floatsidf2_vfp" @@ -637,7 +647,7 @@ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP" "fsitod%?\\t%P0, %1" [(set_attr "predicable" "yes") - (set_attr "type" "farith")] + (set_attr "type" "f_cvt")] ) @@ -647,7 +657,7 @@ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP" "fuitos%?\\t%0, %1" [(set_attr "predicable" "yes") - (set_attr "type" "farith")] + (set_attr "type" "f_cvt")] ) (define_insn "floatunssidf2" @@ -656,7 +666,7 @@ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP" "fuitod%?\\t%P0, %1" [(set_attr "predicable" "yes") - (set_attr "type" "farith")] + (set_attr "type" "f_cvt")] ) @@ -689,7 +699,7 @@ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP" "fmstat%?" [(set_attr "conds" "set") - (set_attr "type" "ffarith")] + (set_attr "type" "f_flag")] ) (define_insn_and_split "*cmpsf_split_vfp" @@ -813,7 +823,7 @@ UNSPEC_PUSH_MULT))])] "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP" "* return vfp_output_fstmx (operands);" - [(set_attr "type" "f_store")] + [(set_attr "type" "f_stored")] ) |