[lkml]   [2017]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH 3/4] x86/asm: Make alternative macro interfaces more clear and consistent
On Thu, Sep 14, 2017 at 10:33 AM, Josh Poimboeuf <> wrote:
>> a) uglifying the 15 or so relevant inline asm locations with ifdefs; or
> Actually I guess we could put the "sp" in a macro... I'll try it.

Exactly. Do something like

# define EXTRA_ASM_CLOBBERS "rsp"

and then replace the nasty

register void *__sp asm(_ASM_SP);
"+r" (__sp)

games with just that EXTRA_ASM_CLOBBERS thing at the end of the clobbers.

Yes, you'd probably have to document that the alternative_call_2()
thing doesn't take a "input" argument, but a input_and_clobbers, but
all users do that anyway.

I dunno.


 \ /
  Last update: 2017-09-14 20:29    [W:0.062 / U:3.928 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site