]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
arm.md (type): Add "simple_alu_shift" to attribute "type".
authorGreta Yorsh <greta.yorsh@arm.com>
Mon, 17 Dec 2012 15:49:24 +0000 (15:49 +0000)
committerGreta Yorsh <gretay@gcc.gnu.org>
Mon, 17 Dec 2012 15:49:24 +0000 (15:49 +0000)
gcc/

2012-12-17  Greta Yorsh  <Greta.Yorsh@arm.com>

        * config/arm/arm.md (type): Add "simple_alu_shift" to attribute "type".
        (core_cycles): Update for simple_alu_shift.
        (thumb1_zero_extendhisi2,arm_zero_extendhisi2_v6): Use simple_alu_shift
        instead of a CPU-speicific condition for "type" attribute.
        (thumb1_zero_extendqisi2_v6,arm_zero_extendqisi2_v6): Likewise.
        (thumb1_extendhisi2,arm_extendhisi2_v6,arm_extendqisi_v6): Likewise.
        (thumb1_extendqisi2): Likewise.
        * config/arm/thumb2.md (thumb2_extendqisi_v6): Likewise.
        (thumb2_zero_extendhisi2_v6,thumb2_zero_extendqisi2_v6) Likewise.
        * config/arm/arm1020e.md (alu_shift_op): Use simple_alu_shift.
        * config/arm/arm1026ejs.md (alu_shift_op): Likewise.
        * config/arm/arm1136jfs.md (11_alu_shift_op): Likewise.
        * config/arm/arm926ejs.md (9_alu_op): Likewise.
        * config/arm/cortex-a15.md (cortex_a15_alu_shift): Likewise.
        * config/arm/cortex-a5.md (cortex_a5_alu_shift): Likewise.
        * config/arm/cortex-a8.md (cortex_a8_alu_shift,cortex_a8_mov): Likewise.
        * config/arm/cortex-a9.md (cortex_a9_dp,cortex_a9_dp_shift): Likewise.
        * config/arm/cortex-m4.md (cortex_m4_alu): Likewise.
        * config/arm/cortex-r4.md (cortex_r4_alu_shift): Likewise.
        * config/arm/fa526.md (526_alu_shift_op): Likewise.
        * config/arm/fa606te.md (fa606te_core): Likewise.
        * config/arm/fa626te.md (626te_alu_shift_op): Likewise.
        * config/arm/fa726te.md (726te_alu_shift_op): Likewise.
        * config/arm/fmp626.md (mp626_alu_shift_op): Likewise.

From-SVN: r194557

18 files changed:
gcc/ChangeLog
gcc/config/arm/arm.md
gcc/config/arm/arm1020e.md
gcc/config/arm/arm1026ejs.md
gcc/config/arm/arm1136jfs.md
gcc/config/arm/arm926ejs.md
gcc/config/arm/cortex-a15.md
gcc/config/arm/cortex-a5.md
gcc/config/arm/cortex-a8.md
gcc/config/arm/cortex-a9.md
gcc/config/arm/cortex-m4.md
gcc/config/arm/cortex-r4.md
gcc/config/arm/fa526.md
gcc/config/arm/fa606te.md
gcc/config/arm/fa626te.md
gcc/config/arm/fa726te.md
gcc/config/arm/fmp626.md
gcc/config/arm/thumb2.md

index 47f5a01e0ce75c7b48233759f44d5aa79d74b2d6..3c0f6c471587f9f45863f5ae0afd8225cf007d50 100644 (file)
@@ -1,3 +1,30 @@
+2012-12-17  Greta Yorsh  <Greta.Yorsh@arm.com>
+
+        * config/arm/arm.md (type): Add "simple_alu_shift" to attribute "type".
+        (core_cycles): Update for simple_alu_shift.
+        (thumb1_zero_extendhisi2,arm_zero_extendhisi2_v6): Use simple_alu_shift
+        instead of a CPU-speicific condition for "type" attribute.
+        (thumb1_zero_extendqisi2_v6,arm_zero_extendqisi2_v6): Likewise.
+        (thumb1_extendhisi2,arm_extendhisi2_v6,arm_extendqisi_v6): Likewise.
+        (thumb1_extendqisi2): Likewise.
+        * config/arm/thumb2.md (thumb2_extendqisi_v6): Likewise.
+        (thumb2_zero_extendhisi2_v6,thumb2_zero_extendqisi2_v6) Likewise.
+        * config/arm/arm1020e.md (alu_shift_op): Use simple_alu_shift.
+        * config/arm/arm1026ejs.md (alu_shift_op): Likewise.
+        * config/arm/arm1136jfs.md (11_alu_shift_op): Likewise.
+        * config/arm/arm926ejs.md (9_alu_op): Likewise.
+        * config/arm/cortex-a15.md (cortex_a15_alu_shift): Likewise.
+        * config/arm/cortex-a5.md (cortex_a5_alu_shift): Likewise.
+        * config/arm/cortex-a8.md (cortex_a8_alu_shift,cortex_a8_mov): Likewise.
+        * config/arm/cortex-a9.md (cortex_a9_dp,cortex_a9_dp_shift): Likewise.
+        * config/arm/cortex-m4.md (cortex_m4_alu): Likewise.
+        * config/arm/cortex-r4.md (cortex_r4_alu_shift): Likewise.
+        * config/arm/fa526.md (526_alu_shift_op): Likewise.
+        * config/arm/fa606te.md (fa606te_core): Likewise.
+        * config/arm/fa626te.md (626te_alu_shift_op): Likewise.
+        * config/arm/fa726te.md (726te_alu_shift_op): Likewise.
+        * config/arm/fmp626.md (mp626_alu_shift_op): Likewise.
+
 2012-12-17  Richard Biener  <rguenther@suse.de>
 
        PR middle-end/54781
index 7f38816a14a1c7852dd5367fb7b14e2f7ed20df5..649e9012004f20f6fbb260208792ed1d48fbef5c 100644 (file)
 ;               regs or have a shifted source operand
 ;               and does not have an immediate operand. This is
 ;               also the default
+; simple_alu_shift covers UXTH, UXTB, SXTH, SXTB
 ; alu_shift    any data instruction that doesn't hit memory or fp
 ;              regs, but has a source operand shifted by a constant
 ; alu_shift_reg        any data instruction that doesn't hit memory or fp
 (define_attr "type"
  "simple_alu_imm,\
   alu_reg,\
+  simple_alu_shift,\
   alu_shift,\
   alu_shift_reg,\
   mult,\
 ; than one on the main cpu execution unit.
 (define_attr "core_cycles" "single,multi"
   (if_then_else (eq_attr "type"
-                "simple_alu_imm,alu_reg,alu_shift,float,fdivd,fdivs")
+                "simple_alu_imm,alu_reg,\
+                  simple_alu_shift,alu_shift,\
+                  float,fdivd,fdivs")
                (const_string "single")
                (const_string "multi")))
 
                         [(if_then_else (eq_attr "is_arch6" "yes")
                                       (const_int 2) (const_int 4))
                         (const_int 4)])
-   (set_attr_alternative "type"
-                         [(if_then_else (eq_attr "tune" "cortexa7")
-                                        (const_string "simple_alu_imm")
-                                        (const_string "alu_shift"))
-                          (const_string "load_byte")])]
+   (set_attr "type" "simple_alu_shift, load_byte")]
 )
 
 (define_insn "*arm_zero_extendhisi2"
    uxth%?\\t%0, %1
    ldr%(h%)\\t%0, %1"
   [(set_attr "predicable" "yes")
-   (set_attr_alternative "type"
-                         [(if_then_else (eq_attr "tune" "cortexa7")
-                                        (const_string "simple_alu_imm")
-                                        (const_string "alu_shift"))
-                          (const_string "load_byte")])]
+   (set_attr "type" "simple_alu_shift,load_byte")]
 )
 
 (define_insn "*arm_zero_extendhisi2addsi"
    uxtb\\t%0, %1
    ldrb\\t%0, %1"
   [(set_attr "length" "2")
-   (set_attr_alternative "type"
-                         [(if_then_else (eq_attr "tune" "cortexa7")
-                                        (const_string "simple_alu_imm")
-                                        (const_string "alu_shift"))
-                          (const_string "load_byte")])]
+   (set_attr "type" "simple_alu_shift,load_byte")]
 )
 
 (define_insn "*arm_zero_extendqisi2"
   "@
    uxtb%(%)\\t%0, %1
    ldr%(b%)\\t%0, %1\\t%@ zero_extendqisi2"
-  [(set_attr_alternative "type"
-                         [(if_then_else (eq_attr "tune" "cortexa7")
-                                        (const_string "simple_alu_imm")
-                                        (const_string "alu_shift"))
-                          (const_string "load_byte")])
+  [(set_attr "type" "simple_alu_shift,load_byte")
    (set_attr "predicable" "yes")]
 )
 
                         [(if_then_else (eq_attr "is_arch6" "yes")
                                        (const_int 2) (const_int 4))
                          (const_int 4)])
-   (set_attr_alternative "type"
-                         [(if_then_else (eq_attr "tune" "cortexa7")
-                                        (const_string "simple_alu_imm")
-                                        (const_string "alu_shift"))
-                          (const_string "load_byte")])
+   (set_attr "type" "simple_alu_shift,load_byte")
    (set_attr "pool_range" "*,1018")]
 )
 
   "@
    sxth%?\\t%0, %1
    ldr%(sh%)\\t%0, %1"
-  [(set_attr_alternative "type"
-                         [(if_then_else (eq_attr "tune" "cortexa7")
-                                        (const_string "simple_alu_imm")
-                                        (const_string "alu_shift"))
-                          (const_string "load_byte")])
+  [(set_attr "type" "simple_alu_shift,load_byte")
    (set_attr "predicable" "yes")
    (set_attr "pool_range" "*,256")
    (set_attr "neg_pool_range" "*,244")]
   "@
    sxtb%?\\t%0, %1
    ldr%(sb%)\\t%0, %1"
-  [(set_attr_alternative "type"
-                         [(if_then_else (eq_attr "tune" "cortexa7")
-                                        (const_string "simple_alu_imm")
-                                        (const_string "alu_shift"))
-                          (const_string "load_byte")])
+  [(set_attr "type" "simple_alu_shift,load_byte")
    (set_attr "predicable" "yes")
    (set_attr "pool_range" "*,256")
    (set_attr "neg_pool_range" "*,244")]
                          (const_int 2)
                          (if_then_else (eq_attr "is_arch6" "yes")
                                        (const_int 4) (const_int 6))])
-   (set_attr_alternative "type"
-                         [(if_then_else (eq_attr "tune" "cortexa7")
-                                        (const_string "simple_alu_imm")
-                                        (const_string "alu_shift"))
-                          (const_string "load_byte")
-                          (const_string "load_byte")])]
+   (set_attr "type" "simple_alu_shift,load_byte,load_byte")]
 )
 
 (define_expand "extendsfdf2"
index 3d3ff23e7c64edfb6579a23ecb2cdf31b113cb15..9a41d30573605d845385e79966737f44ee61e168 100644 (file)
@@ -72,7 +72,7 @@
 ;; ALU operations with a shift-by-constant operand
 (define_insn_reservation "1020alu_shift_op" 1 
  (and (eq_attr "tune" "arm1020e,arm1022e")
-      (eq_attr "type" "alu_shift"))
+      (eq_attr "type" "simple_alu_shift,alu_shift"))
  "1020a_e,1020a_m,1020a_w")
 
 ;; ALU operations with a shift-by-register operand
index d9ed858f8614de04a80d08e2036873bdb020f84d..52f6241d7ddbcafc4b80dad29cce9133dca851c6 100644 (file)
@@ -72,7 +72,7 @@
 ;; ALU operations with a shift-by-constant operand
 (define_insn_reservation "alu_shift_op" 1 
  (and (eq_attr "tune" "arm1026ejs")
-      (eq_attr "type" "alu_shift"))
+      (eq_attr "type" "simple_alu_shift,alu_shift"))
  "a_e,a_m,a_w")
 
 ;; ALU operations with a shift-by-register operand
index ff5e614b37b6fe2a05ccc8c6f134838cfb3ea74d..9e885586072dc385169116d190e6fe40df2f037a 100644 (file)
@@ -81,7 +81,7 @@
 ;; ALU operations with a shift-by-constant operand
 (define_insn_reservation "11_alu_shift_op" 2
  (and (eq_attr "tune" "arm1136js,arm1136jfs")
-      (eq_attr "type" "alu_shift"))
+      (eq_attr "type" "simple_alu_shift,alu_shift"))
  "e_1,e_2,e_3,e_wb")
 
 ;; ALU operations with a shift-by-register operand
index 656a90e41af750134e8521d1b35e7d6b226b2ea8..4c94e3337ab7ee7c5657408ab606c0fd41b162d0 100644 (file)
@@ -58,7 +58,7 @@
 ;; ALU operations with no shifted operand
 (define_insn_reservation "9_alu_op" 1 
  (and (eq_attr "tune" "arm926ejs")
-      (eq_attr "type" "alu_reg,simple_alu_imm,alu_shift"))
+      (eq_attr "type" "alu_reg,simple_alu_imm,simple_alu_shift,alu_shift"))
  "e,m,w")
 
 ;; ALU operations with a shift-by-register operand
index f25fcee9f01f024ee3302bc154112347396fc6c2..33e53df2b55851d43a5c87545612d89432d0a7d0 100644 (file)
@@ -68,7 +68,7 @@
 ;; ALU ops with immediate shift
 (define_insn_reservation "cortex_a15_alu_shift" 3
   (and (eq_attr "tune" "cortexa15")
-       (and (eq_attr "type" "alu_shift")
+       (and (eq_attr "type" "simple_alu_shift,alu_shift")
             (eq_attr "neon_type" "none")))
   "ca15_issue1,(ca15_sx1,ca15_sx1+ca15_sx1_shf,ca15_sx1_alu)\
               |(ca15_sx2,ca15_sx2+ca15_sx2_shf,ca15_sx2_alu)")
index 1121c7effcf281e8bb0d9dd8c655864427b3b2ba..2b5abe524a63a6c90fc3da1b255b163d44c1455b 100644 (file)
@@ -63,7 +63,7 @@
 
 (define_insn_reservation "cortex_a5_alu_shift" 2
   (and (eq_attr "tune" "cortexa5")
-       (eq_attr "type" "alu_shift,alu_shift_reg"))
+       (eq_attr "type" "simple_alu_shift,alu_shift,alu_shift_reg"))
   "cortex_a5_ex1")
 
 ;; Forwarding path for unshifted operands.
index 7c266d3b71fd35f2bee263429108b6a9442b1913..73c61b15d0ba43a93d0f7d39ab3fe3a798bc9ee8 100644 (file)
@@ -93,7 +93,7 @@
 
 (define_insn_reservation "cortex_a8_alu_shift" 2
   (and (eq_attr "tune" "cortexa8")
-       (and (eq_attr "type" "alu_shift")
+       (and (eq_attr "type" "simple_alu_shift,alu_shift")
             (not (eq_attr "insn" "mov,mvn"))))
   "cortex_a8_default")
 
 
 (define_insn_reservation "cortex_a8_mov" 1
   (and (eq_attr "tune" "cortexa8")
-       (and (eq_attr "type" "alu_reg,simple_alu_imm,alu_shift,alu_shift_reg")
+       (and (eq_attr "type" "alu_reg,simple_alu_imm,simple_alu_shift,alu_shift,alu_shift_reg")
             (eq_attr "insn" "mov,mvn")))
   "cortex_a8_default")
 
index 336c4fcefae5ad05f5d31382bece8931b10a848e..f1bd7cfa91a5875069fcdf14da230112eb28d32e 100644 (file)
@@ -82,7 +82,7 @@ cortex_a9_p1_e2 + cortex_a9_p0_e1 + cortex_a9_p1_e1")
   (and (eq_attr "tune" "cortexa9")
          (ior (and (eq_attr "type" "alu_reg,simple_alu_imm")
                         (eq_attr "neon_type" "none"))
-             (and (and (eq_attr "type" "alu_shift_reg, alu_shift")
+             (and (and (eq_attr "type" "alu_shift_reg, simple_alu_shift,alu_shift")
                        (eq_attr "insn" "mov"))
                  (eq_attr "neon_type" "none"))))
   "cortex_a9_p0_default|cortex_a9_p1_default")
@@ -90,7 +90,7 @@ cortex_a9_p1_e2 + cortex_a9_p0_e1 + cortex_a9_p1_e1")
 ;; An instruction using the shifter will go down E1.
 (define_insn_reservation "cortex_a9_dp_shift" 3
    (and (eq_attr "tune" "cortexa9")
-       (and (eq_attr "type" "alu_shift_reg, alu_shift")
+       (and (eq_attr "type" "alu_shift_reg, simple_alu_shift,alu_shift")
             (not (eq_attr "insn" "mov"))))
    "cortex_a9_p0_shift | cortex_a9_p1_shift")
 
index bff17dd77fba06384363b2d9f8796deb81c4f76e..063fe5fabdd70d9c5b856d31dee14c4d3bf6ae92 100644 (file)
@@ -31,7 +31,7 @@
 ;; ALU and multiply is one cycle.
 (define_insn_reservation "cortex_m4_alu" 1
   (and (eq_attr "tune" "cortexm4")
-       (eq_attr "type" "alu_reg,simple_alu_imm,alu_shift,alu_shift_reg,mult"))
+       (eq_attr "type" "alu_reg,simple_alu_imm,simple_alu_shift,alu_shift,alu_shift_reg,mult"))
   "cortex_m4_ex")
 
 ;; Byte, half-word and word load is two cycles.
index 26de65aa1b3d89c949b24d203e93d1497ed1593f..a870dc06f517dcfd27d837b01d13c2f82c6a9f49 100644 (file)
@@ -90,7 +90,7 @@
 
 (define_insn_reservation "cortex_r4_alu_shift" 2
   (and (eq_attr "tune_cortexr4" "yes")
-       (eq_attr "type" "alu_shift"))
+       (eq_attr "type" "simple_alu_shift,alu_shift"))
   "cortex_r4_alu")
 
 (define_insn_reservation "cortex_r4_alu_shift_reg" 2
index 2b89bb5429b41e9183bc55949f2a54bf55fec7fd..810852257532038dcc53b85a076b3208ee2dbe76 100644 (file)
@@ -67,7 +67,7 @@
 
 (define_insn_reservation "526_alu_shift_op" 2
  (and (eq_attr "tune" "fa526")
-      (eq_attr "type" "alu_shift,alu_shift_reg"))
+      (eq_attr "type" "simple_alu_shift,alu_shift,alu_shift_reg"))
  "fa526_core")
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
index 4725b93b6cc5bf13d375103e8769db05591661e2..d995b1d96637b83df829a13ed670d7eb1275958d 100644 (file)
@@ -62,7 +62,7 @@
 ;; ALU operations
 (define_insn_reservation "606te_alu_op" 1
  (and (eq_attr "tune" "fa606te")
-      (eq_attr "type" "alu_reg,simple_alu_imm,alu_shift,alu_shift_reg"))
+      (eq_attr "type" "alu_reg,simple_alu_imm,simple_alu_shift,alu_shift,alu_shift_reg"))
  "fa606te_core")
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
index bed3995a5e2548cf63f1055c3d0d7c757c479b5d..6b01b06aaaf74e63057a26967c4f140445d959f6 100644 (file)
@@ -73,7 +73,7 @@
 
 (define_insn_reservation "626te_alu_shift_op" 2
  (and (eq_attr "tune" "fa626,fa626te")
-      (eq_attr "type" "alu_shift,alu_shift_reg"))
+      (eq_attr "type" "simple_alu_shift,alu_shift,alu_shift_reg"))
  "fa626te_core")
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
index a4c256ce22e7f9fdf33cdf81821ca6588c8583b3..7c898ab3b171e33f03ca51b5840313efb99dd0fc 100644 (file)
@@ -95,7 +95,7 @@
 ;; it takes 3 cycles.
 (define_insn_reservation "726te_alu_shift_op" 3
  (and (eq_attr "tune" "fa726te")
-      (and (eq_attr "type" "alu_shift")
+      (and (eq_attr "type" "simple_alu_shift,alu_shift")
            (not (eq_attr "insn" "mov,mvn"))))
   "fa726te_issue+(fa726te_alu0_pipe|fa726te_alu1_pipe)")
 
index 228817c85e5c5fa07b7a9c83d752005017eb8da4..f63b6bf54a2b713461ff33117c7378cc9b78ca0f 100644 (file)
@@ -68,7 +68,7 @@
 
 (define_insn_reservation "mp626_alu_shift_op" 2
  (and (eq_attr "tune" "fmp626")
-      (eq_attr "type" "alu_shift,alu_shift_reg"))
+      (eq_attr "type" "simple_alu_shift,alu_shift,alu_shift_reg"))
  "fmp626_core")
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
index f22666cf9a99d46b1491c8894c9e80f16964088f..d4dd1b9364c302905ea6295b0618632258d71e85 100644 (file)
   "@
    sxtb%?\\t%0, %1
    ldr%(sb%)\\t%0, %1"
-  [(set_attr_alternative "type"
-                         [(if_then_else (eq_attr "tune" "cortexa7")
-                                        (const_string "simple_alu_imm")
-                                        (const_string "alu_shift"))
-                          (const_string "load_byte")])
+  [(set_attr "type" "simple_alu_shift,load_byte")
    (set_attr "predicable" "yes")
    (set_attr "pool_range" "*,4094")
    (set_attr "neg_pool_range" "*,250")]
   "@
    uxth%?\\t%0, %1
    ldr%(h%)\\t%0, %1"
-  [(set_attr_alternative "type"
-                         [(if_then_else (eq_attr "tune" "cortexa7")
-                                        (const_string "simple_alu_imm")
-                                        (const_string "alu_shift"))
-                          (const_string "load_byte")])
+  [(set_attr "type" "simple_alu_shift,load_byte")
    (set_attr "predicable" "yes")
    (set_attr "pool_range" "*,4094")
    (set_attr "neg_pool_range" "*,250")]
   "@
    uxtb%(%)\\t%0, %1
    ldr%(b%)\\t%0, %1\\t%@ zero_extendqisi2"
-  [(set_attr_alternative "type"
-                         [(if_then_else (eq_attr "tune" "cortexa7")
-                                        (const_string "simple_alu_imm")
-                                        (const_string "alu_shift"))
-                          (const_string "load_byte")])
+  [(set_attr "type" "simple_alu_shift,load_byte")
    (set_attr "predicable" "yes")
    (set_attr "pool_range" "*,4094")
    (set_attr "neg_pool_range" "*,250")]