Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1193643

Re: ASM flags in general

From "H. Peter Anvin" <hpa@zytor.com>
Newsgroups linux.kernel
Subject Re: ASM flags in general
Date 2015-07-28 02:00 +0200
Message-ID <pR0tk-r2-13@gated-at.bofh.it> (permalink)
References (4 earlier) <pQZnA-7lN-31@gated-at.bofh.it> <pR09Z-8vE-47@gated-at.bofh.it> <pR09Z-8vE-45@gated-at.bofh.it> <pR0tj-r2-9@gated-at.bofh.it> <pR0tj-r2-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Sure... but now you have to wrap things in stac/clac.  I'm not sure I see the point since the code is already pretty much optimal.

On July 27, 2015 4:49:46 PM PDT, Andy Lutomirski <luto@amacapital.net> wrote:
>On Mon, Jul 27, 2015 at 4:46 PM, H. Peter Anvin <hpa@zytor.com> wrote:
>> Sure, but that is different than getting rid of the _ex forms.
>>
>
>If we did that and got rid of the _ex forms, though, then the code
>that matters (the no-fault case) would just be a bunch of movs, right?
> That's basically the same as the current _ex code.
>
>--Andy
>
>> On July 27, 2015 4:36:26 PM PDT, Andy Lutomirski
><luto@amacapital.net>
>> wrote:
>>>
>>> On Mon, Jul 27, 2015 at 4:22 PM, H. Peter Anvin <hpa@zytor.com>
>wrote:
>>>>
>>>>  For that to work, gcc would have to know about the extable.
>>>
>>>
>>> It could, I think:
>>>
>>> asm goto (
>>>     "1: mov ...\n\t"
>>>     _ASM_EXTABLE(1b, %l2)  /* or whatever index it is */
>>>     : ... : ... : ... : efault);
>>>
>>> return 0;
>>>
>>> efault:
>>>      return -EFAULT;
>>>
>>> I think that wrmsr_safe could get this treatment with current GCC.
>>> put_user plausibly could, too, if we were willing to mark it
>volatile
>>> and accept that we're lying a little bit about the lack of an output
>>> constraint.  get_user would need GCC to understand output
>constraints
>>> for real.
>>>
>>> --Andy
>>
>>
>> --
>> Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: ASM flags in general Andy Lutomirski <luto@amacapital.net> - 2015-07-28 00:50 +0200
  Re: ASM flags in general Andy Lutomirski <luto@amacapital.net> - 2015-07-28 01:40 +0200
    Re: ASM flags in general "H. Peter Anvin" <hpa@zytor.com> - 2015-07-28 02:00 +0200
      Re: ASM flags in general Andy Lutomirski <luto@amacapital.net> - 2015-07-28 02:00 +0200
        Re: ASM flags in general "H. Peter Anvin" <hpa@zytor.com> - 2015-07-28 02:10 +0200
        Re: ASM flags in general "H. Peter Anvin" <hpa@zytor.com> - 2015-07-28 02:40 +0200
          Re: ASM flags in general Andy Lutomirski <luto@amacapital.net> - 2015-07-28 02:50 +0200
    Re: ASM flags in general Andy Lutomirski <luto@amacapital.net> - 2015-07-28 02:00 +0200

csiph-web