// Initialize
Type = isInput;
isEarlyClobber = false;
- hasMatchingInput = false;
+ MatchingInput = -1;
isCommutative = false;
isIndirect = false;
Type != isInput)
return true; // Invalid constraint number.
+ // If Operand N already has a matching input, reject this. An output
+ // can't be constrained to the same value as multiple inputs.
+ if (ConstraintsSoFar[N].hasMatchingInput())
+ return true;
+
// Note that operand #n has a matching input.
- ConstraintsSoFar[N].hasMatchingInput = true;
+ ConstraintsSoFar[N].MatchingInput = ConstraintsSoFar.size();
} else {
// Single letter constraint.
Codes.push_back(std::string(I, I+1));