From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: joseph_myers@mentor.com, GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] math: x86: Remove extra '%' on FP_INIT_ROUNDMODE inline asm
Date: Thu, 1 Sep 2022 12:21:44 -0300 [thread overview]
Message-ID: <02ecae64-64cf-bb6c-1adf-d680d7ab5bed@linaro.org> (raw)
In-Reply-To: <CAMe9rOppB1FN+fmSuy1ApaW_edWz_Mq_PiRfxhpyZuEHexLqHQ@mail.gmail.com>
On 01/09/22 11:51, H.J. Lu wrote:
> On Thu, Sep 1, 2022 at 6:01 AM Adhemerval Zanella Netto
> <adhemerval.zanella@linaro.org> wrote:
>>
>>
>>
>> On 31/08/22 16:33, H.J. Lu wrote:
>>> On Wed, Aug 31, 2022 at 11:16 AM Adhemerval Zanella via Libc-alpha
>>> <libc-alpha@sourceware.org> wrote:
>>>>
>>>> Checked on x86_64-linux-gnu.
>>>> ---
>>>> sysdeps/x86/fpu/sfp-machine.h | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/sysdeps/x86/fpu/sfp-machine.h b/sysdeps/x86/fpu/sfp-machine.h
>>>> index 5892f4f5fe..1cacdb4ebd 100644
>>>> --- a/sysdeps/x86/fpu/sfp-machine.h
>>>> +++ b/sysdeps/x86/fpu/sfp-machine.h
>>>> @@ -41,7 +41,7 @@ typedef unsigned int UTItype __attribute__ ((mode (TI)));
>>>>
>>>> # define FP_INIT_ROUNDMODE \
>>>> do { \
>>>> - __asm__ __volatile__ ("%vstmxcsr\t%0" : "=m" (_fcw)); \
>>>> + __asm__ __volatile__ ("vstmxcsr\t%0" : "=m" (_fcw)); \
>>>> } while (0)
>>>> #else
>>>> # define _FP_W_TYPE_SIZE 32
>>>> --
>>>> 2.34.1
>>>>
>>>
>>> The intention was to generate stmxcsr with SSE and vstmxcsr with
>>> AVX. I think we should define a special prefix, like AVX_INSN_PREFIX,
>>> which is 'v' if __AVX__ is defined and empty if __AVX__ isn't defined.
>>>
>>
>> Right, I was not aware of it. Is is documented on gcc inline assembly
>
> I need to take a look.
Thanks.
>
>> manual somewhere (I could not find it)? In any case I will follow your
>> suggestion.
>
> There is no need for it. %v is handled by compiler with an operand.
Not by all compilers in fact, that's why I proposing the change.
next prev parent reply other threads:[~2022-09-01 15:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 18:14 Adhemerval Zanella
2022-08-31 19:33 ` H.J. Lu
2022-09-01 13:01 ` Adhemerval Zanella Netto
2022-09-01 14:51 ` H.J. Lu
2022-09-01 15:21 ` Adhemerval Zanella Netto [this message]
2022-09-01 16:26 ` H.J. Lu
2022-08-31 19:35 ` Joseph Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=02ecae64-64cf-bb6c-1adf-d680d7ab5bed@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=hjl.tools@gmail.com \
--cc=joseph_myers@mentor.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).