Linus Torvalds writes: (Summary) Do something like
#ifdef CONFIG_FRAME_POINTER
# define EXTRA_ASM_CLOBBERS "rsp"
#else
# define EXTRA_ASM_CLOBBERS
#endif
#endif
and then replace the nasty
and then replace the nasty
register void *__sp asm(_ASM_SP);
..
"+r" (__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.
all users do that anyway.
I dunno.
I dunno.
Linus
Linus
Linus
#ifdef CONFIG_FRAME_POINTER
# define EXTRA_ASM_CLOBBERS "rsp"
#else
# define EXTRA_ASM_CLOBBERS
#endif
#endif
and then replace the nasty
and then replace the nasty
register void *__sp asm(_ASM_SP);
..
"+r" (__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.
all users do that anyway.
I dunno.
I dunno.
Linus
Linus
Linus