I am not very familiar with this feature entirely so please bear with me
during review and will find some time to do some experiments with the
feature during this week, but a couple of things with respect to the
patch immediately spring to mind.
+(define_insn "probe_stack_range"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (unspec_volatile:SI [(match_operand:SI 1 "register_operand" "0")
+ (match_operand:SI 2 "register_operand" "r")]
+ UNSPEC_PROBE_STACK_RANGE))]
+ "TARGET_32BIT"
+{
+ return output_probe_stack_range (operands[0], operands[2]);
+})
+
Please mark this pattern with (set_attr "type" "multiple").
While I suspect that stack probing is done before any insns with invalid
constants in the function, it would be better to model the length of
this insn so that the minipool logic is not confused later in terms of
placement of constant pools.
Shouldn't the pattern contain clobbers for the CC register or is that
unnecessary for the same reason as above ?
Additionally please add
(set_attr "conds" "clob")
to this pattern so that the CCFSM state machine doesn't go awry in any
of these cases.
regards
Ramana