lkml.org 
[lkml]   [2015]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: ASM flags in general
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


\
 
 \ /
  Last update: 2015-07-28 02:01    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog