Modified winebuild to use the __ASM_FUNC macro for greater portability.
This commit is contained in:
parent
7afce0e6d6
commit
31b6d090df
|
@ -722,16 +722,16 @@ typedef HANDLE *PHANDLE;
|
|||
#endif
|
||||
|
||||
#ifdef NEED_TYPE_IN_DEF
|
||||
# define __ASM_TYPE(name) ".def " __ASM_NAME(#name) "; .scl 2; .type 32; .endef\n"
|
||||
# define __ASM_FUNC(name) ".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"
|
||||
#else
|
||||
# define __ASM_TYPE(name) ".type " __ASM_NAME(#name) ",@function\n"
|
||||
# define __ASM_FUNC(name) ".type " __ASM_NAME(name) ",@function"
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define __ASM_GLOBAL_FUNC(name,code) \
|
||||
__asm__( ".align 4\n\t" \
|
||||
".globl " __ASM_NAME(#name) "\n\t" \
|
||||
__ASM_TYPE(name) \
|
||||
__ASM_FUNC(#name) "\n" \
|
||||
__ASM_NAME(#name) ":\n\t" \
|
||||
code );
|
||||
#else /* __GNUC__ */
|
||||
|
@ -739,7 +739,7 @@ typedef HANDLE *PHANDLE;
|
|||
void __asm_dummy_##name(void) { \
|
||||
asm( ".align 4\n\t" \
|
||||
".globl " __ASM_NAME(#name) "\n\t" \
|
||||
__ASM_TYPE(name) \
|
||||
__ASM_FUNC(#name) "\n" \
|
||||
__ASM_NAME(#name) ":\n\t" \
|
||||
code ); \
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "winnt.h"
|
||||
#include "build.h"
|
||||
|
||||
|
@ -324,7 +325,7 @@ int output_imports( FILE *outfile )
|
|||
{
|
||||
for (j = 0; j < dll_imports[i]->nb_imports; j++, pos += 4)
|
||||
{
|
||||
fprintf( outfile, " \"\\t.type " PREFIX "%s,@function\\n\"\n",
|
||||
fprintf( outfile, " \"\\t" __ASM_FUNC("%s") "\\n\"\n",
|
||||
dll_imports[i]->imports[j] );
|
||||
fprintf( outfile, " \"\\t.globl " PREFIX "%s\\n\"\n",
|
||||
dll_imports[i]->imports[j] );
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "winnt.h"
|
||||
#include "thread.h"
|
||||
#include "stackframe.h"
|
||||
|
@ -94,7 +95,7 @@ static void BuildCallFrom16Core( FILE *outfile, int reg_func, int thunk, int sho
|
|||
#ifdef USE_STABS
|
||||
fprintf( outfile, ".stabs \"__wine_call_from_16_%s:F1\",36,0,0," PREFIX "__wine_call_from_16_%s\n", name, name);
|
||||
#endif
|
||||
fprintf( outfile, "\t.type " PREFIX "__wine_call_from_16_%s,@function\n", name );
|
||||
fprintf( outfile, "\t" __ASM_FUNC("__wine_call_from_16_%s") "\n", name );
|
||||
fprintf( outfile, "\t.globl " PREFIX "__wine_call_from_16_%s\n", name );
|
||||
fprintf( outfile, PREFIX "__wine_call_from_16_%s:\n", name );
|
||||
|
||||
|
@ -452,7 +453,7 @@ static void BuildCallTo16Core( FILE *outfile, int short_ret, int reg_func )
|
|||
fprintf( outfile, ".stabs \"wine_call_to_16_%s:F1\",36,0,0," PREFIX "wine_call_to_16_%s\n",
|
||||
name, name);
|
||||
#endif
|
||||
fprintf( outfile, "\t.type " PREFIX "wine_call_to_16_%s,@function\n", name );
|
||||
fprintf( outfile, "\t" __ASM_FUNC("wine_call_to_16_%s") "\n", name );
|
||||
fprintf( outfile, "\t.globl " PREFIX "wine_call_to_16_%s\n", name );
|
||||
fprintf( outfile, PREFIX "wine_call_to_16_%s:\n", name );
|
||||
|
||||
|
@ -688,7 +689,7 @@ static void BuildRet16Func( FILE *outfile )
|
|||
* run-time relocation of the SYSLEVEL_Win16CurrentTeb symbol
|
||||
*/
|
||||
|
||||
fprintf( outfile, "\n\t.type " PREFIX "CallTo16_Ret,@function\n" );
|
||||
fprintf( outfile, "\n\t" __ASM_FUNC("CallTo16_Ret") "\n" );
|
||||
fprintf( outfile, "\t.globl " PREFIX "CallTo16_Ret\n" );
|
||||
fprintf( outfile, PREFIX "CallTo16_Ret:\n" );
|
||||
|
||||
|
|
|
@ -389,7 +389,7 @@ static void output_register_funcs( FILE *outfile )
|
|||
name = make_internal_name( odp, "regs" );
|
||||
fprintf( outfile,
|
||||
"asm(\".align 4\\n\\t\"\n"
|
||||
" \".type " PREFIX "%s,@function\\n\\t\"\n"
|
||||
" \"" __ASM_FUNC("%s") "\\n\\t\"\n"
|
||||
" \"" PREFIX "%s:\\n\\t\"\n"
|
||||
" \"call " PREFIX "CALL32_Regs\\n\\t\"\n"
|
||||
" \".long " PREFIX "%s\\n\\t\"\n"
|
||||
|
|
Loading…
Reference in New Issue