lkml.org 
[lkml]   [2015]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH 13/21] x86/asm/crypto: Fix frame pointer usage in aesni-intel_asm.S
On Fri, Jul 17, 2015 at 12:43 PM, Ingo Molnar <mingo@kernel.org> wrote:
>
> * Josh Poimboeuf <jpoimboe@redhat.com> wrote:
>
>> ENTRY(aesni_set_key)
>> + FRAME
>> #ifndef __x86_64__
>> pushl KEYP
>> movl 8(%esp), KEYP # ctx
>> @@ -1905,6 +1907,7 @@ ENTRY(aesni_set_key)
>> #ifndef __x86_64__
>> popl KEYP
>> #endif
>> + ENDFRAME
>> ret
>> ENDPROC(aesni_set_key)
>
> So cannot we make this a bit more compact and less fragile?
>
> Instead of:
>
> ENTRY(aesni_set_key)
> FRAME
> ...
> ENDFRAME
> ret
> ENDPROC(aesni_set_key)
>
>
> How about writing this as:
>
> FUNCTION_ENTRY(aesni_set_key)
> ...
> FUNCTION_RETURN(aesni_set_key)
>
> which does the same thing in a short, symmetric construct?
>
> One potential problem with this approach would be that what 'looks' like an entry
> declaration, but it will now generate real code.
>
> OTOH if people find this intuitive enough then it's a lot harder to mess it up,
> and I think 'RETURN' makes it clear enough that there's a real instruction
> generated there.
>

How about FUNCTION_PROLOGUE and FUNCTION_EPILOGUE?

-Andy


\
 
 \ /
  Last update: 2015-07-17 22:01    [W:0.101 / U:1.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site