On 18/07/2022 11:29, Jan Beulich wrote:
> On 18.07.2022 09:18, Andrew Cooper wrote:
>> -        "mov %%rsp,%%rsi;"
>> +
>> +        "mov %%ecx, %%eax;"
>> +        "mov %%rsp, %%rsi;" /* Copy from the stack, into wqv->stack */
>>  
>>          /* check_wakeup_from_wait() longjmp()'s to this point. */
>>          ".L_wq_resume: rep movsb;"
>> -        "mov %%rsp,%%rsi;"
>>  
>>          ".L_skip:"
>>          "pop %%r15; pop %%r14; pop %%r13;"
>>          "pop %%r12; pop %%rbp; pop %%rbx;"
>> -        : "=&S" (wqv->esp), "=&c" (dummy), "=&D" (dummy)
>> -        : "0" (0), "1" (cpu_info), "2" (wqv->stack),
>> +        : "=a" (used), "=D" (dummy),     "=c" (dummy),         "=&S" (dummy)
> You can't validly drop & from =D and =c.

On the contrary, GCC demands it.

& is only relevant, and only permitted, when there is not an explicit
input tied to the same register.

When there is an explicit input tied to the same register, of course it
can't be reused for another input before being used as an output.

https://godbolt.org/z/4vWP4PKc5

~Andrew

Reply via email to