|
49 | 49 | (match_test "IN_RANGE (INTVAL (op), 0, 31)")) |
50 | 50 | ) |
51 | 51 |
|
| 52 | +(define_predicate "rx_bitclr_operand" |
| 53 | + (and (match_code "const_int") |
| 54 | + (match_test "exact_log2 (~INTVAL (op)) != -1")) |
| 55 | +) |
| 56 | + |
| 57 | +(define_predicate "rx_bitset_operand" |
| 58 | + (and (match_code "const_int") |
| 59 | + (match_test "exact_log2 (INTVAL (op)) != -1")) |
| 60 | +) |
| 61 | + |
52 | 62 | (define_predicate "rx_restricted_mem_operand" |
53 | 63 | (and (match_code "mem") |
54 | 64 | (match_test "rx_is_restricted_memory_address (XEXP (op, 0), mode)")) |
|
64 | 74 | (match_operand 0 "rx_restricted_mem_operand")) |
65 | 75 | ) |
66 | 76 |
|
| 77 | +(define_predicate "rx_speed_source_operand" |
| 78 | + (ior (match_operand 0 "register_operand") |
| 79 | + (match_operand 0 "immediate_operand") |
| 80 | + (and (match_test "optimize_size") |
| 81 | + (match_operand 0 "rx_restricted_mem_operand"))) |
| 82 | +) |
| 83 | + |
67 | 84 | ;; Check that the operand is suitable as the source operand |
68 | 85 | ;; for a comparison instruction. This is the same as |
69 | 86 | ;; rx_source_operand except that SUBREGs are allowed but |
|
84 | 101 | (match_operand 0 "rx_restricted_mem_operand")) |
85 | 102 | ) |
86 | 103 |
|
| 104 | +(define_predicate "rx_speed_minmaxex_operand" |
| 105 | + (ior (match_operand 0 "immediate_operand") |
| 106 | + (and (match_test "optimize_size") |
| 107 | + (match_operand 0 "rx_restricted_mem_operand"))) |
| 108 | +) |
| 109 | + |
| 110 | +(define_predicate "rx_speed_compare_operand" |
| 111 | + (ior (match_operand 0 "register_operand") |
| 112 | + (and (match_test "optimize_size") |
| 113 | + (match_operand 0 "rx_restricted_mem_operand"))) |
| 114 | +) |
| 115 | + |
87 | 116 | ;; Return true if OP is a store multiple operation. This looks like: |
88 | 117 | ;; |
89 | 118 | ;; [(set (SP) (MINUS (SP) (INT))) |
|
114 | 143 | || ! CONST_INT_P (XEXP (SET_SRC (element), 1))) |
115 | 144 | return false; |
116 | 145 |
|
117 | | - /* Check that the next element is the first push. */ |
118 | | - element = XVECEXP (op, 0, 1); |
119 | | - if ( ! SET_P (element) |
120 | | - || ! REG_P (SET_SRC (element)) |
121 | | - || GET_MODE (SET_SRC (element)) != SImode |
122 | | - || ! MEM_P (SET_DEST (element)) |
123 | | - || GET_MODE (SET_DEST (element)) != SImode |
124 | | - || GET_CODE (XEXP (SET_DEST (element), 0)) != MINUS |
125 | | - || ! REG_P (XEXP (XEXP (SET_DEST (element), 0), 0)) |
126 | | - || REGNO (XEXP (XEXP (SET_DEST (element), 0), 0)) != SP_REG |
127 | | - || ! CONST_INT_P (XEXP (XEXP (SET_DEST (element), 0), 1)) |
128 | | - || INTVAL (XEXP (XEXP (SET_DEST (element), 0), 1)) |
129 | | - != GET_MODE_SIZE (SImode)) |
130 | | - return false; |
131 | | - |
132 | | - src_regno = REGNO (SET_SRC (element)); |
133 | | - |
134 | 146 | /* Check that the remaining elements use SP-<disp> |
135 | 147 | addressing and decreasing register numbers. */ |
136 | | - for (i = 2; i < count; i++) |
| 148 | + for (i = 1; i < count - 1; i++) |
137 | 149 | { |
138 | 150 | element = XVECEXP (op, 0, i); |
139 | 151 |
|
140 | 152 | if ( ! SET_P (element) |
141 | 153 | || ! REG_P (SET_SRC (element)) |
142 | 154 | || GET_MODE (SET_SRC (element)) != SImode |
143 | | - || REGNO (SET_SRC (element)) != src_regno - (i - 1) |
144 | 155 | || ! MEM_P (SET_DEST (element)) |
145 | 156 | || GET_MODE (SET_DEST (element)) != SImode |
146 | 157 | || GET_CODE (XEXP (SET_DEST (element), 0)) != MINUS |
|
0 commit comments