[PATCH] Fix attribute naked
Filip Navara
xnavara at volny.cz
Sun Mar 21 13:30:54 CST 2004
Jeff Muizelaar wrote:
> The attached patch changes declspec(naked) to __attribute__(cdecl)
> from __attribute__(naked)
> As seen in the gcc documentation
> (http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function%20Attributes),
>
> __attribute__(naked) does not do the same thing as declspec(naked)
> instead __attribute__(cdecl) does.
Sure, it does the same.
> http://www.cs.cornell.edu/courses/cs412/2001sp/resources/microsoft-calling-conventions.html
>
This page is wrong.
From MSDN:
"The naked storage-class attribute is a Microsoft-specific extension to
the C language. The compiler generates code without prolog and epilog
code for functions declared with the naked storage-class attribute.
Naked functions are useful when you need to write your own prolog/epilog
code sequences using inline assembler code. Naked functions are useful
for writing virtual device drivers."
> -Jeff
- Filip
More information about the wine-devel
mailing list