Commit ea9cf9e4 authored by Alexandre Julliard's avatar Alexandre Julliard

configure: Add a macro to define an stdcall function in assembly.

parent 9cebf090
...@@ -17867,19 +17867,19 @@ case "$ac_cv_asm_func_def" in ...@@ -17867,19 +17867,19 @@ case "$ac_cv_asm_func_def" in
#define __ASM_FUNC(name) ".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef" #define __ASM_FUNC(name) ".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"
_ACEOF _ACEOF
asm_func_header=".def $asm_name_prefix\" #name \"; .scl 2; .type 32; .endef" ;; asm_func_header=".def $asm_name_prefix\" #name suffix \"; .scl 2; .type 32; .endef" ;;
".type @function") ".type @function")
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
#define __ASM_FUNC(name) ".type " __ASM_NAME(name) ",@function" #define __ASM_FUNC(name) ".type " __ASM_NAME(name) ",@function"
_ACEOF _ACEOF
asm_func_header=".type $asm_name_prefix\" #name \",@function" ;; asm_func_header=".type $asm_name_prefix\" #name suffix \",@function" ;;
".type 2") ".type 2")
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
#define __ASM_FUNC(name) ".type " __ASM_NAME(name) ",2" #define __ASM_FUNC(name) ".type " __ASM_NAME(name) ",2"
_ACEOF _ACEOF
asm_func_header=".type $asm_name_prefix\" #name \",2" ;; asm_func_header=".type $asm_name_prefix\" #name suffix \",2" ;;
*) *)
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
#define __ASM_FUNC(name) "" #define __ASM_FUNC(name) ""
...@@ -18046,7 +18046,7 @@ fi ...@@ -18046,7 +18046,7 @@ fi
{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_cfi_support" >&5 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_cfi_support" >&5
$as_echo "$ac_cv_c_cfi_support" >&6; } $as_echo "$ac_cv_c_cfi_support" >&6; }
asm_func_header=".globl $asm_name_prefix\" #name \"\\n\\t$asm_func_header\\n$asm_name_prefix\" #name \":\\n\\t" asm_func_header=".globl $asm_name_prefix\" #name suffix \"\\n\\t$asm_func_header\\n$asm_name_prefix\" #name suffix \":\\n\\t"
asm_func_trailer="" asm_func_trailer=""
if test "$ac_cv_c_dot_previous" = "yes" if test "$ac_cv_c_dot_previous" = "yes"
then then
...@@ -18065,16 +18065,26 @@ asm_func_code="$asm_func_header\" code \"$asm_func_trailer" ...@@ -18065,16 +18065,26 @@ asm_func_code="$asm_func_header\" code \"$asm_func_trailer"
if test "$ac_cv_c_asm_outside_funcs" = "yes" if test "$ac_cv_c_asm_outside_funcs" = "yes"
then then
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define __ASM_GLOBAL_FUNC(name,code) asm(".text\n\t.align 4\n\t$asm_func_code"); #define __ASM_DEFINE_FUNC(name,suffix,code) asm(".text\n\t.align 4\n\t$asm_func_code");
_ACEOF _ACEOF
else else
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
#define __ASM_GLOBAL_FUNC(name,code) void __asm_dummy_##name(void) { asm(".text\n\t.align 4\n\t$asm_func_code"); } #define __ASM_DEFINE_FUNC(name,suffix,code) void __asm_dummy_##name(void) { asm(".text\n\t.align 4\n\t$asm_func_code"); }
_ACEOF _ACEOF
fi fi
cat >>confdefs.h <<\_ACEOF
#define __ASM_GLOBAL_FUNC(name,code) __ASM_DEFINE_FUNC(name,"",code)
_ACEOF
cat >>confdefs.h <<\_ACEOF
#define __ASM_STDCALL_FUNC(name,args,code) __ASM_DEFINE_FUNC(name,__ASM_STDCALL(args),code)
_ACEOF
LDPATH="" LDPATH=""
......
...@@ -1447,13 +1447,13 @@ AH_TEMPLATE(__ASM_FUNC,[Define to a macro to generate an assembly function direc ...@@ -1447,13 +1447,13 @@ AH_TEMPLATE(__ASM_FUNC,[Define to a macro to generate an assembly function direc
case "$ac_cv_asm_func_def" in case "$ac_cv_asm_func_def" in
".def") ".def")
AC_DEFINE([__ASM_FUNC(name)], [".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"]) AC_DEFINE([__ASM_FUNC(name)], [".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"])
asm_func_header=".def $asm_name_prefix\" #name \"; .scl 2; .type 32; .endef" ;; asm_func_header=".def $asm_name_prefix\" #name suffix \"; .scl 2; .type 32; .endef" ;;
".type @function") ".type @function")
AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",@function"]) AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",@function"])
asm_func_header=".type $asm_name_prefix\" #name \",@function" ;; asm_func_header=".type $asm_name_prefix\" #name suffix \",@function" ;;
".type 2") ".type 2")
AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",2"]) AC_DEFINE([__ASM_FUNC(name)], [".type " __ASM_NAME(name) ",2"])
asm_func_header=".type $asm_name_prefix\" #name \",2" ;; asm_func_header=".type $asm_name_prefix\" #name suffix \",2" ;;
*) *)
AC_DEFINE([__ASM_FUNC(name)], [""]) AC_DEFINE([__ASM_FUNC(name)], [""])
asm_func_header="" ;; asm_func_header="" ;;
...@@ -1471,7 +1471,7 @@ AC_CACHE_CHECK([whether CFI directives are supported in assembly code], ac_cv_c_ ...@@ -1471,7 +1471,7 @@ AC_CACHE_CHECK([whether CFI directives are supported in assembly code], ac_cv_c_
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[asm(".text\nac_test:\t.cfi_startproc\n\t.long 0\n\t.cfi_endproc");]])], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[asm(".text\nac_test:\t.cfi_startproc\n\t.long 0\n\t.cfi_endproc");]])],
ac_cv_c_cfi_support="yes",ac_cv_c_cfi_support="no")) ac_cv_c_cfi_support="yes",ac_cv_c_cfi_support="no"))
asm_func_header=".globl $asm_name_prefix\" #name \"\\n\\t$asm_func_header\\n$asm_name_prefix\" #name \":\\n\\t" asm_func_header=".globl $asm_name_prefix\" #name suffix \"\\n\\t$asm_func_header\\n$asm_name_prefix\" #name suffix \":\\n\\t"
asm_func_trailer="" asm_func_trailer=""
if test "$ac_cv_c_dot_previous" = "yes" if test "$ac_cv_c_dot_previous" = "yes"
then then
...@@ -1485,13 +1485,17 @@ fi ...@@ -1485,13 +1485,17 @@ fi
asm_func_code="$asm_func_header\" code \"$asm_func_trailer" asm_func_code="$asm_func_header\" code \"$asm_func_trailer"
AH_TEMPLATE(__ASM_GLOBAL_FUNC,[Define to a macro to generate an assembly function]) AH_TEMPLATE(__ASM_DEFINE_FUNC,[Define to a macro to define an assembly function])
if test "$ac_cv_c_asm_outside_funcs" = "yes" if test "$ac_cv_c_asm_outside_funcs" = "yes"
then then
AC_DEFINE_UNQUOTED([__ASM_GLOBAL_FUNC(name,code)],[asm(".text\n\t.align 4\n\t$asm_func_code");]) AC_DEFINE_UNQUOTED([__ASM_DEFINE_FUNC(name,suffix,code)],[asm(".text\n\t.align 4\n\t$asm_func_code");])
else else
AC_DEFINE_UNQUOTED([__ASM_GLOBAL_FUNC(name,code)],[void __asm_dummy_##name(void) { asm(".text\n\t.align 4\n\t$asm_func_code"); }]) AC_DEFINE_UNQUOTED([__ASM_DEFINE_FUNC(name,suffix,code)],[void __asm_dummy_##name(void) { asm(".text\n\t.align 4\n\t$asm_func_code"); }])
fi fi
AC_DEFINE([__ASM_GLOBAL_FUNC(name,code)],[__ASM_DEFINE_FUNC(name,"",code)],
[Define to a macro to generate an assembly function with C calling convention])
AC_DEFINE([__ASM_STDCALL_FUNC(name,args,code)],[__ASM_DEFINE_FUNC(name,__ASM_STDCALL(args),code)],
[Define to a macro to generate an assembly function with stdcall calling convention])
dnl **** Platform-specific checks **** dnl **** Platform-specific checks ****
......
...@@ -1188,10 +1188,14 @@ ...@@ -1188,10 +1188,14 @@
/* Define to 1 if the X Window System is missing or not being used. */ /* Define to 1 if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING #undef X_DISPLAY_MISSING
/* Define to a macro to define an assembly function */
#undef __ASM_DEFINE_FUNC
/* Define to a macro to generate an assembly function directive */ /* Define to a macro to generate an assembly function directive */
#undef __ASM_FUNC #undef __ASM_FUNC
/* Define to a macro to generate an assembly function */ /* Define to a macro to generate an assembly function with C calling
convention */
#undef __ASM_GLOBAL_FUNC #undef __ASM_GLOBAL_FUNC
/* Define to a macro to generate an assembly name from a C symbol */ /* Define to a macro to generate an assembly name from a C symbol */
...@@ -1200,6 +1204,10 @@ ...@@ -1200,6 +1204,10 @@
/* Define to a macro to generate an stdcall suffix */ /* Define to a macro to generate an stdcall suffix */
#undef __ASM_STDCALL #undef __ASM_STDCALL
/* Define to a macro to generate an assembly function with stdcall calling
convention */
#undef __ASM_STDCALL_FUNC
/* Define to empty if `const' does not conform to ANSI C. */ /* Define to empty if `const' does not conform to ANSI C. */
#undef const #undef const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment