diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 9d7310b..ab0373d 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -10699,6 +10699,49 @@ " ) +(define_expand "doloop_end" + [(use (match_operand 0 "arm_general_register_operand" "")) ; loop pseudo + (use (match_operand 1 "" "")) ; iterations; zero if unknown + (use (match_operand 2 "" "")) ; max iterations + (use (match_operand 3 "" "")) ; loop level + (use (match_operand 4 "" ""))] ; label + "" + " + { + if (optimize > 0 && flag_modulo_sched) + { + /* Only use this on innermost loops. */ + if (INTVAL (operands[3]) > 1) + FAIL; + if (GET_MODE (operands[0]) != SImode) + FAIL; + emit_jump_insn (gen_doloop_end_internal(operands[0], operands[4])); + DONE; + }else + FAIL; + }") + +(define_insn "doloop_end_internal" + [(set (pc) (if_then_else + (ne (match_operand:SI 0 "arm_general_register_operand" "") + (const_int 1)) + (label_ref (match_operand 1 "" "")) + (pc))) + (set (match_dup 0) + (plus:SI (match_dup 0) + (const_int -1)))] + "TARGET_32BIT && optimize > 0 && flag_modulo_sched" + "* + if (arm_ccfsm_state == 1 || arm_ccfsm_state == 2) + { + arm_ccfsm_state += 2; + } + return \"subs\\t%0, %0, #1\;bne\\t%l1\"; + " + [(set_attr "length" "8") + (set_attr "type" "branch")] +) + ;; Load the load/store multiple patterns (include "ldmstm.md") ;; Load the FPA co-processor patterns