[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/5] xen/wait: Use relative stack adjustments
- To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 18 Jul 2022 12:51:48 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=WFNdLlH9fkGFBzJpML3y3pKzJtzrXnf0vuGbLwFVDZQ=; b=c2WY11P7fY8AAXCBoOm16FdZsH5YtfbhimhEIyHEspriTNUg69jB6fU+A64+G6DkiGfSE6yfL0y2WbmNDpomHHSSfchVSpwetDzotdu6cOcq4W6UB5MMwtl9nLqRMQLAeetlwqb1YMv/Y8qAgX27pjSy8nCNSMt6m4OGRfhY1JHiMvUKfUMjlOmIuzt7Rqh+/BBl2eRVy3xljYbK6sberazrYw822lhZtf4Yh0886qc3+97skmrs3mTDDsVZ0znCRHmjO+QkHQJMKTX9b1i1efUwM2A9v7GQJVqkK2MSlDHlK2mYYJtQT4sluzXqpGytA+DtEQ1CS+BBNUk5DmGwYA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hly1XXVfpgSI4EAizWCtgT9YeG/6lV2ts3U0MmRFC1JmIIkcb+nj+aQ//+35XHdw6RcWoOl23F6/QltMgPCpTZnLwV8CB3ub58Bcj1ccGYaNGkETOHFMO1IdH08OkUg9vUAir61HJHV2S+k6rZNskfZW6W+AWfhgu5SJ2rBMrmtZeKwDzAkWQehR0UsvnU4bRo1MQ52wYk4aHICjoMqNLU0cDpPo9STrgz1FyqeTAK+nPOBfLIPBdczH/KrSrigWdtH5rm7wH/wa8JlFXWJJtBQS8BIPyh481UqkGlrAeaoWh40EpWYZFv+0wXWDbrWkQVbfCX8ot3MFhHB7LCuP6Q==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 18 Jul 2022 10:51:55 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 18.07.2022 12:41, Andrew Cooper wrote:
> 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.
Oh, sorry - I neglected to take into account this adding of inputs.
Jan
|