On 06/21/16 00:06, Jeff Law wrote: > On 06/09/2016 10:45 AM, Jakub Jelinek wrote: >> On Thu, Jun 09, 2016 at 06:43:04PM +0200, Jakub Jelinek wrote: >>> Yes, I'm all in favor in disabling X constraint for inline asm. >>> Especially if people actually try to print it as well, rather than >>> make it >>> unused. That is a sure path to ICEs. >> >> Though, on the other side, even our documentation mentions >> asm volatile ("mtfsf 255,%1" : "=X"(sum): "f"(fpenv)); >> So perhaps we need to error just in case such an argument is printed? > Are you thinking to scan the output string for %<N> for the appropriate > <N>? That shouldn't be too hard. But that's not sufficient to address > the problem Bernd is trying to tackle AFAICT.
Correct. And furthermore, the use case with matching X input & output that Marc wanted to use, seems to be a valid one. Because "+X" allows more registers than "+g" or "+r", it should create less register pressure. And although it is probably unpredictable if a register of the class "ALL_REGISTERS" will work for an assembler instruction, it is still interesting to print it in an assembler comment. Bernd.