lkml.org 
[lkml]   [2009]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 0/6] x86 tip asm ENTRY,ENDPROC cleanup
[H. Peter Anvin - Fri, Feb 13, 2009 at 04:34:00PM -0800]
> Alexander van Heukelum wrote:
>>
>> Hi Cyrill,
>>
>> I like this direction. If I understand correctly:
>>
>> ENTRY/END or GLOBAL/END for data.
>> ENTRY/ENDPROC or GLOBAL/ENDPROC for functions.
>>
>
> Fine for functions, but it's really not okay to use the same macros for
> data. Furthermore, we need to consider special entry points that don't
> behave like normal functions -- like system call or interrupt entry.
>
> Why? Because if we're compiling with frame pointers, we would like the
> wrapper macros for functions to handle setting up and tearing down the
> frame pointer, at least in the common case.
>
> -hpa
>

Peter, Alexander -- thanks for review!

>> ENTRY/END or GLOBAL/END for data.
>> ENTRY/ENDPROC or GLOBAL/ENDPROC for functions.

Well, there are nuances I believe. Plain .size without .cfi_...
for functions would not help in frame unwinding I think (in *.S
under debugger).

I wish we have strict rules for functions and data but it's not
that simple :)

For example, trampoline_64.S:
...
.org 0x1000
trampoline_stack_end:
ENTRY(trampoline_level4_pgt)
...

we could use plain .globl (or new GLOBAL) here since we
have .org and ALIGN in ENTRY just not needed.

Same file:
...
ENTRY(trampoline_end)
...

I think we could have plain .globl here as well
(and we do that for 32bit version). Moreover TRAMPOLINE_SIZE
is page rounded anyway.

But in general I think you're right -- which means:
start with END for data and ENDPROC for functions and
then checkout the details as Peter mentioned. At least
I do ratiocinate like this. But I could be wrong :)

- Cyrill -


\
 
 \ /
  Last update: 2009-02-14 09:25    [W:0.059 / U:9.264 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site