summaryrefslogtreecommitdiff
path: root/recipes/gcc/gcc-4.2.1/arm-crunch-predicates3.patch
blob: 99e1e6c88c2a690f63832543985c2eee91714431 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
diff -urN ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/arm.md gcc-4.1.2/gcc/config/arm/arm.md
--- ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/arm.md	2007-06-14 11:50:53.000000000 +1000
+++ gcc-4.1.2/gcc/config/arm/arm.md	2007-06-14 11:43:17.000000000 +1000
@@ -7488,6 +7488,22 @@
 				      arm_compare_op1);"
 )
 
+;(define_expand "suneq"
+;  [(set (match_operand:SI 0 "s_register_operand" "")
+;	(uneq:SI (match_dup 1) (const_int 0)))]
+;  "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)"
+;  "operands[1] = arm_gen_compare_reg (UNEQ, arm_compare_op0,
+;				      arm_compare_op1);"
+;)
+
+;(define_expand "sltgt"
+;  [(set (match_operand:SI 0 "s_register_operand" "")
+;	(ltgt:SI (match_dup 1) (const_int 0)))]
+;  "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)"
+;  "operands[1] = arm_gen_compare_reg (LTGT, arm_compare_op0,
+;				      arm_compare_op1);"
+;)
+
 ;;; DO NOT add patterns for SUNEQ or SLTGT, these can't be represented with
 ;;; simple ARM instructions. 
 ;
@@ -10284,13 +10284,73 @@
   "TARGET_ARM && arm_arch5e"
   "pld\\t%a0")
 
+;; Special predication pattern for Maverick Crunch floating-point
+
+(define_cond_exec
+  [(match_operator 0 "maverick_comparison_operator"
+    [(match_operand:CCFP 1 "cc_register" "")
+     (const_int 0)])]
+  "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+  ""
+)
+
+;; Special predication pattern for Maverick Crunch - !CCFP
+
+(define_cond_exec
+  [(match_operator 0 "arm_comparison_operator"
+    [(match_operand:CC_NOOV 1 "cc_register" "")
+     (const_int 0)])]
+  "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+  ""
+)
+
+(define_cond_exec
+  [(match_operator 0 "arm_comparison_operator"
+    [(match_operand:CC_Z 1 "cc_register" "")
+     (const_int 0)])]
+  "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+  ""
+)
+
+(define_cond_exec
+  [(match_operator 0 "arm_comparison_operator"
+    [(match_operand:CC_SWP 1 "cc_register" "")
+     (const_int 0)])]
+  "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+  ""
+)
+
+(define_cond_exec
+  [(match_operator 0 "arm_comparison_operator"
+    [(match_operand:CC_C 1 "cc_register" "")
+     (const_int 0)])]
+  "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+  ""
+)
+
+(define_cond_exec
+  [(match_operator 0 "arm_comparison_operator"
+    [(match_operand:CC_N 1 "cc_register" "")
+     (const_int 0)])]
+  "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+  ""
+)
+
+(define_cond_exec
+  [(match_operator 0 "arm_comparison_operator"
+    [(match_operand:CC 1 "cc_register" "")
+     (const_int 0)])]
+  "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+  ""
+)
+
 ;; General predication pattern
 
 (define_cond_exec
   [(match_operator 0 "arm_comparison_operator"
     [(match_operand 1 "cc_register" "")
      (const_int 0)])]
-  "TARGET_ARM"
+  "TARGET_ARM && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)"
   ""
 )
 
diff -urN ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/predicates.md gcc-4.1.2/gcc/config/arm/predicates.md
--- ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/predicates.md	2005-09-11 17:38:02.000000000 +1000
+++ gcc-4.1.2/gcc/config/arm/predicates.md	2007-06-14 11:46:13.000000000 +1000
@@ -172,7 +172,11 @@
 
 ;; True for comparisons other than LTGT or UNEQ.
 (define_special_predicate "arm_comparison_operator"
   (match_code "eq,ne,le,lt,ge,gt,geu,gtu,leu,ltu,unordered,ordered,unlt,unle,unge,ungt"))
+
+;; True for comparisons other than GE, GEU, UNLT, UNORDERED or ORDERED - TODO add LTGT and UNEQ - needs extra support elsewhere 
+(define_special_predicate "maverick_comparison_operator"
+(match_code "eq,ne,le,lt,gt,gtu,leu,ltu,unle,unge,ungt"))
 
 (define_special_predicate "minmax_operator"
   (and (match_code "smin,smax,umin,umax")