This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch 1/2][ARM]: New CPU support for Marvell Whitney


Hi Xingxing,

On 18/12/14 10:13, Xingxing Pan wrote:
+
+(define_attr "tune_marvell_whitney" "yes,no"
+  (const (if_then_else (eq_attr "tune" "marvell_whitney")
+                       (const_string "yes")
+                       (const_string "no"))))

Why do you need this? The canonical way we do this in the other .md files is check
for the "tune" attribute directly.

+
+(define_automaton "whitney_pipe")
+
+(define_cpu_unit "wCU1" "whitney_pipe")
+(define_cpu_unit "wCU2" "whitney_pipe")
+(define_cpu_unit "wCU3" "whitney_pipe")
+(define_cpu_unit "wCU4" "whitney_pipe")
+(define_cpu_unit "wCU5" "whitney_pipe")
+(define_cpu_unit "wCU6" "whitney_pipe")
+(define_cpu_unit "wCU7" "whitney_pipe")
+(define_cpu_unit "wCU8" "whitney_pipe")
+(define_cpu_unit "wCU9" "whitney_pipe")
+(define_cpu_unit "wCU10" "whitney_pipe")
+(define_cpu_unit "wCU11" "whitney_pipe")
+(define_cpu_unit "wCU12" "whitney_pipe")
+(define_cpu_unit "wCU13" "whitney_pipe")
+
+(define_insn_reservation "wIR1" 1
+  (and (eq_attr "tune_marvell_whitney" "yes")
+       (eq_attr "whitney_type" "wTP1"))
+  "wCU1|wCU2|(wCU3+wCU4)"
+)

Further to the comment above, this could be written as:

+(define_insn_reservation "wIR1" 1
+  (and (eq_attr "tune" "marvell_whitney")
+       (eq_attr "whitney_type" "wTP1"))
+  "wCU1|wCU2|(wCU3+wCU4)"
+)


Same with the other reservations in this file.

Kyrill

+
+(define_insn_reservation "wIR2" 2
+  (and (eq_attr "tune_marvell_whitney" "yes")
+       (eq_attr "whitney_type" "wTP2"))
+  "wCU1|wCU2|(wCU3+wCU4)"
+)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]