On 09/22/2015 12:12 PM, Jeff Law wrote:
> On 09/22/2015 12:50 PM, Richard Henderson wrote:
>>
>>> +asm_constraint_earlyclobber (const char *constraint)
>>> +{
>>> +  while (*constraint != 0)
>>> +    {
>>> +      if (*constraint == '&')
>>> +    return true;
>>> +      ++constraint;
>>> +    }
>>> +  return false;
>>> +}
>>
>> This would be
>>
>>    return strchr (constraint, '&') != NULL;
>>
>> but we don't actually have to search the whole string, surely.  I'd be
>> surprised if early clobber could be anywhere except at the start of the
>> constraint.
> And doesn't it have to be =& and always at the start for an asm constraint? 
> For operands in patterns, we have to consider operand alternatives, but that's
> not on issue here.

Technically we do support alternatives on asms.  Not usefully except for CISC,
since all alternatives have to use the same output pattern, but one can write
things like

  asm("add %0,%1" : "=r,m"(x) : "rim,ri"(y))


r~

Reply via email to