]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2097.md: Removed two incorrect bypasses.
authorWolfgang Gellerich <gellerich@de.ibm.com>
Fri, 4 Sep 2009 10:11:00 +0000 (10:11 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Fri, 4 Sep 2009 10:11:00 +0000 (10:11 +0000)
2009-09-04  Wolfgang Gellerich  <gellerich@de.ibm.com>

* config/s390/2097.md: Removed two incorrect bypasses.
(z10_fsimpdf): Fixed latency.
(z10_fhex): New insn_reservation.
(z10_floaddf): Fixed latency.
(z10_floadsf): Fixed latency.
(z10_ftrunctf): Fixed latency.
(z10_ftruncdf): Fixed latency.
* config/s390/s390.c (z10_cost): Fixed values.
(s390_adjust_priority): Added z10 path.
* config/s390/s390.md (type): Added fhex.
(*mov<mode>_64dfp): Updated type attribute.
(*mov<mode>_64): Updated type attribute.
(*mov<mode>_31): Updated type attribute.
(*mov<mode>"): Likewise.
* config/s390/2084.md (x_fsimpdf): Updated condition.

From-SVN: r151419

gcc/ChangeLog
gcc/config/s390/2084.md
gcc/config/s390/2097.md
gcc/config/s390/s390.c
gcc/config/s390/s390.md

index aa978e60cc43693cc7c3e810707ba9cedc913cb8..994c36a284d2bd502d3245427798fcf159d48cdd 100644 (file)
@@ -1,3 +1,21 @@
+2009-09-04  Wolfgang Gellerich  <gellerich@de.ibm.com>
+
+       * config/s390/2097.md: Removed two incorrect bypasses.
+       (z10_fsimpdf): Fixed latency.
+       (z10_fhex): New insn_reservation.
+       (z10_floaddf): Fixed latency.
+       (z10_floadsf): Fixed latency.
+       (z10_ftrunctf): Fixed latency.
+       (z10_ftruncdf): Fixed latency.
+       * config/s390/s390.c (z10_cost): Fixed values.
+       (s390_adjust_priority): Added z10 path.
+       * config/s390/s390.md (type): Added fhex.
+       (*mov<mode>_64dfp): Updated type attribute.
+       (*mov<mode>_64): Updated type attribute.
+       (*mov<mode>_31): Updated type attribute.
+       (*mov<mode>"): Likewise.
+       * config/s390/2084.md (x_fsimpdf): Updated condition.
+
 2009-09-04  Andreas Krebbel  <krebbel1@de.ibm.com>
 
        * config/s390/s390.md ("*fmadd<mode>", "*fmsub<mode>"): Enable mem
index 38669c23a97c7c641d1c4480c16064450a1abd8d..bedc5c322ba48a0b7ac05a49d2ed44262dc7b274 100644 (file)
 
 (define_insn_reservation "x_fsimptf" 7
   (and (eq_attr "cpu" "z990,z9_109")
-       (eq_attr "type" "fsimptf"))
+       (eq_attr "type" "fsimptf,fhex"))
   "x_e1_t*2,x-wr-fp")
 
 (define_insn_reservation "x_fsimpdf" 6
   (and (eq_attr "cpu" "z990,z9_109")
-       (eq_attr "type" "fsimpdf,fmuldf"))
+       (eq_attr "type" "fsimpdf,fmuldf,fhex"))
   "x_e1_t,x-wr-fp")
 
 (define_insn_reservation "x_fsimpsf" 6
   (and (eq_attr "cpu" "z990,z9_109")
-       (eq_attr "type" "fsimpsf,fmulsf"))
+       (eq_attr "type" "fsimpsf,fmulsf,fhex"))
   "x_e1_t,x-wr-fp")
 
 
index f27302e0a2ba1016a17ec38c5ed0cf4eb2a81abb..eb7240effd4f5cb5bb263a329d0c887308917903 100644 (file)
 
 ; BFP multiplication and general instructions
 
-(define_insn_reservation "z10_fsimpdf" 12
+(define_insn_reservation "z10_fsimpdf" 6
   (and (eq_attr "cpu" "z10")
        (eq_attr "type" "fsimpdf,fmuldf"))
   "z10_e1_BOTH, z10_Gate_FP")
-; Wg "z10_e1_T, z10_Gate_FP")
 
-(define_insn_reservation "z10_fsimpsf" 12
+; LOAD ZERO produces a hex value but we need bin. Using the stage 7
+; bypass causes an exception for format conversion which is very
+; expensive. So, make sure subsequent instructions only get the zero
+; in the normal way.
+(define_insn_reservation "z10_fhex" 12
+  (and (eq_attr "cpu" "z10")
+       (eq_attr "type" "fhex"))
+  "z10_e1_BOTH, z10_Gate_FP")
+
+(define_insn_reservation "z10_fsimpsf" 6
   (and (eq_attr "cpu" "z10")
        (eq_attr "type" "fsimpsf,fmulsf"))
   "z10_e1_BOTH, z10_Gate_FP")
-; Wg "z10_e1_T, z10_Gate_FP")
 
 (define_insn_reservation "z10_fmultf" 52
   (and (eq_attr "cpu" "z10")
        (eq_attr "type" "fmultf"))
   "z10_e1_BOTH*4, z10_Gate_FP")
-; Wg  "z10_e1_T*4, z10_Gate_FP")
 
 (define_insn_reservation "z10_fsimptf" 14
   (and (eq_attr "cpu" "z10")
        (eq_attr "type" "fsimptf"))
   "z10_e1_BOTH*2, z10_Gate_FP")
-; Wg  "z10_e1_T*2, z10_Gate_FP")
 
 
 ; BFP division
        (eq_attr "type" "floadtf"))
   "z10_e1_T, z10_Gate_FP")
 
-(define_insn_reservation "z10_floaddf" 12
+(define_insn_reservation "z10_floaddf" 1
   (and (eq_attr "cpu" "z10")
        (eq_attr "type" "floaddf"))
   "z10_e1_T, z10_Gate_FP")
 
-(define_insn_reservation "z10_floadsf" 12
+(define_insn_reservation "z10_floadsf" 1
   (and (eq_attr "cpu" "z10")
        (eq_attr "type" "floadsf"))
   "z10_e1_T, z10_Gate_FP")
 
 
 ; BFP truncate
-(define_insn_reservation "z10_ftrunctf" 12
+(define_insn_reservation "z10_ftrunctf" 16
   (and (eq_attr "cpu" "z10")
        (eq_attr "type" "ftrunctf"))
   "z10_e1_T, z10_Gate_FP")
 
-(define_insn_reservation "z10_ftruncdf" 16
+(define_insn_reservation "z10_ftruncdf" 12
   (and (eq_attr "cpu" "z10")
        (eq_attr "type" "ftruncdf"))
   "z10_e1_T, z10_Gate_FP")
 ; BFP-related bypasses.  There is no bypass for extended mode.
 (define_bypass 1 "z10_fsimpdf" "z10_fstoredf")
 (define_bypass 1 "z10_fsimpsf" "z10_fstoresf")
-(define_bypass 1 "z10_floaddf" "z10_fsimpdf, z10_fstoredf, z10_floaddf")
-(define_bypass 1 "z10_floadsf" "z10_fsimpsf, z10_fstoresf, z10_floadsf")
+(define_bypass 1 "z10_floaddf" "z10_fsimpdf, z10_fstoredf")
+(define_bypass 1 "z10_floadsf" "z10_fsimpsf, z10_fstoresf")
 
 
 ;
index 05896064d6e7ebbbc85ffae25a7b2e0c5b1cbb8c..a4ac3a38b6b2dc27f6ee68cab1bfc7a9b6b2a76b 100644 (file)
@@ -205,13 +205,13 @@ struct processor_costs z10_cost =
   COSTS_N_INSNS (10),    /* MSGFR */
   COSTS_N_INSNS (10),    /* MSGR  */
   COSTS_N_INSNS (10),    /* MSR   */
-  COSTS_N_INSNS (10),    /* multiplication in DFmode */
+  COSTS_N_INSNS (1,    /* multiplication in DFmode */
   COSTS_N_INSNS (50),    /* MXBR */
   COSTS_N_INSNS (120),   /* SQXBR */
   COSTS_N_INSNS (52),    /* SQDBR */
   COSTS_N_INSNS (38),    /* SQEBR */
-  COSTS_N_INSNS (10),    /* MADBR */
-  COSTS_N_INSNS (10),    /* MAEBR */
+  COSTS_N_INSNS (1),     /* MADBR */
+  COSTS_N_INSNS (1),     /* MAEBR */
   COSTS_N_INSNS (111),   /* DXBR */
   COSTS_N_INSNS (39),    /* DDBR */
   COSTS_N_INSNS (32),    /* DEBR */
@@ -5297,6 +5297,7 @@ s390_agen_dep_p (rtx dep_insn, rtx insn)
    A STD instruction should be scheduled earlier,
    in order to use the bypass.  */
 
+
 static int
 s390_adjust_priority (rtx insn ATTRIBUTE_UNUSED, int priority)
 {
@@ -5304,7 +5305,8 @@ s390_adjust_priority (rtx insn ATTRIBUTE_UNUSED, int priority)
     return priority;
 
   if (s390_tune != PROCESSOR_2084_Z990
-      && s390_tune != PROCESSOR_2094_Z9_109)
+      && s390_tune != PROCESSOR_2094_Z9_109
+      && s390_tune != PROCESSOR_2097_Z10)
     return priority;
 
   switch (s390_safe_attr_type (insn))
@@ -5323,6 +5325,7 @@ s390_adjust_priority (rtx insn ATTRIBUTE_UNUSED, int priority)
   return priority;
 }
 
+
 /* The number of instructions that can be issued per cycle.  */
 
 static int
index a5bddfb1af246ddc69293f4f90adf453bdf98ac9..db326ee766c075a54144938c30ab573f2d1aeaac 100644 (file)
 (define_attr "type" "none,integer,load,lr,la,larl,lm,stm,
                     cs,vs,store,sem,idiv,
                      imulhi,imulsi,imuldi,
-                    branch,jsr,fsimptf,fsimpdf,fsimpsf,
+                    branch,jsr,fsimptf,fsimpdf,fsimpsf,fhex,
                     floadtf,floaddf,floadsf,fstoredf,fstoresf,
                     fmultf,fmuldf,fmulsf,fdivtf,fdivdf,fdivsf,
                     ftoi,fsqrttf,fsqrtdf,fsqrtsf,
    #
    #"
   [(set_attr "op_type" "RRE,RRE,*,*,RSY,RSY,*,*")
-   (set_attr "type"    "fsimptf,fsimptf,*,*,lm,stm,*,*")])
+   (set_attr "type"    "fhex,fsimptf,*,*,lm,stm,*,*")])
 
 (define_insn "*mov<mode>_31"
   [(set (match_operand:TD_TF 0 "nonimmediate_operand" "=f,f,f,o")
    #
    #"
   [(set_attr "op_type" "RRE,RRE,*,*")
-   (set_attr "type"    "fsimptf,fsimptf,*,*")])
+   (set_attr "type"    "fhex,fsimptf,*,*")])
 
 ; TFmode in GPRs splitters
 
    lg\t%0,%1
    stg\t%1,%0"
   [(set_attr "op_type" "RRE,RR,RRE,RRE,RX,RXY,RX,RXY,RRE,RXY,RXY")
-   (set_attr "type" "fsimpdf,floaddf,floaddf,floaddf,floaddf,floaddf,
+   (set_attr "type" "fhex,floaddf,floaddf,floaddf,floaddf,floaddf,
                      fstoredf,fstoredf,lr,load,store")
    (set_attr "z10prop" "*,
                         *,
    lg\t%0,%1
    stg\t%1,%0"
   [(set_attr "op_type" "RRE,RR,RX,RXY,RX,RXY,RRE,RXY,RXY")
-   (set_attr "type" "fsimp<mode>,fload<mode>,fload<mode>,fload<mode>,
+   (set_attr "type" "fhex,fload<mode>,fload<mode>,fload<mode>,
                      fstore<mode>,fstore<mode>,lr,load,store")
    (set_attr "z10prop" "*,
                         *,
    #
    #"
   [(set_attr "op_type" "RRE,RR,RX,RXY,RX,RXY,RS,RSY,RS,RSY,*,*")
-   (set_attr "type" "fsimp<mode>,fload<mode>,fload<mode>,fload<mode>,
+   (set_attr "type" "fhex,fload<mode>,fload<mode>,fload<mode>,
                      fstore<mode>,fstore<mode>,lm,lm,stm,stm,*,*")])
 
 (define_split
    st\t%1,%0
    sty\t%1,%0"
   [(set_attr "op_type" "RRE,RR,RX,RXY,RX,RXY,RR,RX,RXY,RX,RXY")
-   (set_attr "type" "fsimp<mode>,fload<mode>,fload<mode>,fload<mode>,
+   (set_attr "type" "fhex,fload<mode>,fload<mode>,fload<mode>,
                      fstore<mode>,fstore<mode>,lr,load,load,store,store")
    (set_attr "z10prop" "*,
                         *,