https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126237
--- Comment #5 from Stefan Schulze Frielinghaus <stefansf at gcc dot gnu.org>
---
In case of -fstrict-extended-asm we end up with optimized GIMPLE:
int main (int argc_, char * * argv)
{
long int _1;
<bb 2> [local count: 1073741824]:
_1 = (long int) argc__2(D);
__builtin_puts (&"Hello, world!"[0]);
__asm__ __volatile__(" call middle
" : : "{rdi}" _1 : "rax");
return 0;
}
which means we finally end up with
main:
pushq %rbx
movslq %edi, %rbx
movl $.LC1, %edi
call puts
movq %rbx, %rdi
#APP
...
#NO_APP
xorl %eax, %eax
popq %rbx
ret
where edi is saved in call-saved register rbx prior the call to puts and
restored after the call just before the asm.