Module: wine Branch: master Commit: e9fa452ba3c25646b7275e22252f056367fbb31f URL: https://source.winehq.org/git/wine.git/?a=commit;h=e9fa452ba3c25646b7275e222...
Author: Martin Storsjo martin@martin.st Date: Sat Dec 19 00:34:34 2020 +0200
asm: Separate .def/.scl/.type/.endef with newlines instead of semicolons.
When targeting arm64 in MSVC mode, LLVM treats semicolons in assembly as comment char, instead of as statement separator (contrary to in mingw mode, where semicolons still work as separator). In generated code, there's no need to keep these directives on one single line though, so just separate them with newlines.
Signed-off-by: Martin Storsjo martin@martin.st Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
include/wine/asm.h | 2 +- tools/winebuild/utils.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/wine/asm.h b/include/wine/asm.h index b5e6c6efd3d..ed44a7dd6dd 100644 --- a/include/wine/asm.h +++ b/include/wine/asm.h @@ -56,7 +56,7 @@ #endif
#ifdef _WIN32 -# define __ASM_FUNC_TYPE(name) ".def " name "; .scl 2; .type 32; .endef" +# define __ASM_FUNC_TYPE(name) ".def " name "\n\t.scl 2\n\t.type 32\n\t.endef" #elif defined(__APPLE__) # define __ASM_FUNC_TYPE(name) "" #elif defined(__arm__) || defined(__arm64__) diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index 1af42f10005..5cffc74accd 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -686,7 +686,7 @@ void output_standard_file_header(void) output( "/* This file can be copied, modified and distributed without restriction. */\n\n" ); if (safe_seh) { - output( "\t.def @feat.00; .scl 3; .type 0; .endef\n" ); + output( "\t.def @feat.00\n\t.scl 3\n\t.type 0\n\t.endef\n" ); output( "\t.globl @feat.00\n" ); output( ".set @feat.00, 1\n" ); } @@ -1119,7 +1119,7 @@ const char *func_declaration( const char *func ) return ""; case PLATFORM_WINDOWS: free( buffer ); - buffer = strmake( ".def %s; .scl 2; .type 32; .endef", asm_name(func) ); + buffer = strmake( ".def %s\n\t.scl 2\n\t.type 32\n\t.endef", asm_name(func) ); break; default: free( buffer );