diff options
Diffstat (limited to 'meta/packages/gcc/gcc-4.2.3/arm-crunch-compare-unordered.patch')
-rw-r--r-- | meta/packages/gcc/gcc-4.2.3/arm-crunch-compare-unordered.patch | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/meta/packages/gcc/gcc-4.2.3/arm-crunch-compare-unordered.patch b/meta/packages/gcc/gcc-4.2.3/arm-crunch-compare-unordered.patch new file mode 100644 index 0000000000..c4fcdb3746 --- /dev/null +++ b/meta/packages/gcc/gcc-4.2.3/arm-crunch-compare-unordered.patch | |||
@@ -0,0 +1,98 @@ | |||
1 | --- gcc-4.1.2/gcc/config/arm/arm.md-original 2007-06-07 14:45:22.000000000 +1000 | ||
2 | +++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-07 15:13:58.000000000 +1000 | ||
3 | @@ -7001,16 +7001,16 @@ | ||
4 | (if_then_else (unordered (match_dup 1) (const_int 0)) | ||
5 | (label_ref (match_operand 0 "" "")) | ||
6 | (pc)))] | ||
7 | - "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)" | ||
8 | + "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)" | ||
9 | "operands[1] = arm_gen_compare_reg (UNORDERED, arm_compare_op0, | ||
10 | arm_compare_op1);" | ||
11 | ) | ||
12 | |||
13 | (define_expand "bordered" | ||
14 | [(set (pc) | ||
15 | (if_then_else (ordered (match_dup 1) (const_int 0)) | ||
16 | (label_ref (match_operand 0 "" "")) | ||
17 | (pc)))] | ||
18 | - "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)" | ||
19 | + "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)" | ||
20 | "operands[1] = arm_gen_compare_reg (ORDERED, arm_compare_op0, | ||
21 | arm_compare_op1);" | ||
22 | @@ -7141,6 +7141,38 @@ | ||
23 | (set_attr "length" "8")] | ||
24 | ) | ||
25 | |||
26 | +; Special pattern to match UNORDERED for MAVERICK - UGLY since we need to test for Z=0 && N=0. | ||
27 | +(define_insn "*arm_bunordered" | ||
28 | + [(set (pc) | ||
29 | + (if_then_else (unordered (match_operand:CCFP 1 "cc_register" "") (const_int 0)) | ||
30 | + (label_ref (match_operand 0 "" "")) | ||
31 | + (pc)))] | ||
32 | + "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)" | ||
33 | + "* | ||
34 | + gcc_assert (!arm_ccfsm_state); | ||
35 | + | ||
36 | + return \"beq\\t.+12\;bmi\\t.+8\;b\\t%l0\"; | ||
37 | + " | ||
38 | + [(set_attr "conds" "jump_clob") | ||
39 | + (set_attr "length" "12")] | ||
40 | +) | ||
41 | + | ||
42 | +; Special pattern to match ORDERED for MAVERICK. | ||
43 | +(define_insn "*arm_bordered" | ||
44 | + [(set (pc) | ||
45 | + (if_then_else (ordered (match_operand:CCFP 1 "cc_register" "") (const_int 0)) | ||
46 | + (label_ref (match_operand 0 "" "")) | ||
47 | + (pc)))] | ||
48 | + "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)" | ||
49 | + "* | ||
50 | + gcc_assert (!arm_ccfsm_state); | ||
51 | + | ||
52 | + return \"beq\\t%l0\;bmi\\t%l0\"; | ||
53 | + " | ||
54 | + [(set_attr "conds" "jump_clob") | ||
55 | + (set_attr "length" "8")] | ||
56 | +) | ||
57 | + | ||
58 | (define_insn "*arm_cond_branch" | ||
59 | [(set (pc) | ||
60 | (if_then_else (match_operator 1 "arm_comparison_operator" | ||
61 | @@ -7224,6 +7256,37 @@ | ||
62 | (set_attr "length" "8")] | ||
63 | ) | ||
64 | |||
65 | +; Special pattern to match reversed UNORDERED for MAVERICK. | ||
66 | +(define_insn "*arm_bunordered_reversed" | ||
67 | + [(set (pc) | ||
68 | + (if_then_else (unordered (match_operand:CCFP 1 "cc_register" "") (const_int 0)) | ||
69 | + (pc) | ||
70 | + (label_ref (match_operand 0 "" ""))))] | ||
71 | + "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)" | ||
72 | + "* | ||
73 | + gcc_assert (!arm_ccfsm_state); | ||
74 | + | ||
75 | + return \"beq\\t%l0\;bmi\\t%l0\"; | ||
76 | + " | ||
77 | + [(set_attr "conds" "jump_clob") | ||
78 | + (set_attr "length" "8")] | ||
79 | +) | ||
80 | + | ||
81 | +; Special pattern to match reversed ORDERED for MAVERICK - UGLY since we need to test for Z=0 && N=0. | ||
82 | +(define_insn "*arm_bordered_reversed" | ||
83 | + [(set (pc) | ||
84 | + (if_then_else (ordered (match_operand:CCFP 1 "cc_register" "") (const_int 0)) | ||
85 | + (pc) | ||
86 | + (label_ref (match_operand 0 "" ""))))] | ||
87 | + "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)" | ||
88 | + "* | ||
89 | + gcc_assert (!arm_ccfsm_state); | ||
90 | + | ||
91 | + return \"beq\\t.+12\;bmi\\t.+8\;b\\t%l0\"; | ||
92 | + " | ||
93 | + [(set_attr "conds" "jump_clob") | ||
94 | + (set_attr "length" "12")] | ||
95 | +) | ||
96 | |||
97 | (define_insn "*arm_cond_branch_reversed" | ||
98 | [(set (pc) | ||