On 09/22/2015 01:20 PM, Richard Henderson wrote:
On 09/22/2015 12:18 PM, Jeff Law wrote:
On 09/22/2015 01:15 PM, Richard Henderson wrote:
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))
Wow, learn something every day.  In that case, I think we do have to search a
little harder than just peeking at the first two letters of the constraint :(

We wouldn't be.  He's adding this check at the beginning of each alternative.
So why would we want to search the entire rest of the string now?
If he's walking down each alternative (I didn't look), then just checking the start of each alternative would obviously be OK.

I made the assumption he was searching the entire constraint string.

Jeff

Reply via email to