forked from Mirrors/wine-wine
include: Move inline assembly definitions to a new wine/asm.h header.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>stable
parent
132cf25ed6
commit
d5a372abbb
|
@ -17271,215 +17271,6 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether external symbols need an underscore prefix" >&5
|
|
||||||
$as_echo_n "checking whether external symbols need an underscore prefix... " >&6; }
|
|
||||||
if ${ac_cv_c_extern_prefix+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
extern int ac_test;
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
asm(".globl _ac_test\n_ac_test:\t.long 0"); if (ac_test) return 1
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
|
||||||
ac_cv_c_extern_prefix="yes"
|
|
||||||
else
|
|
||||||
ac_cv_c_extern_prefix="no"
|
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
fi
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_extern_prefix" >&5
|
|
||||||
$as_echo "$ac_cv_c_extern_prefix" >&6; }
|
|
||||||
|
|
||||||
case $host_cpu in
|
|
||||||
*i[3456789]86*)
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether external symbols need stdcall decoration" >&5
|
|
||||||
$as_echo_n "checking whether external symbols need stdcall decoration... " >&6; }
|
|
||||||
if ${ac_cv_c_stdcall_suffix+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
#ifndef _MSC_VER
|
|
||||||
#define __stdcall __attribute__((__stdcall__))
|
|
||||||
#endif
|
|
||||||
int __stdcall ac_test(int i) { return i; }
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
asm("jmp _ac_test@4"); if (ac_test(1)) return 1
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
|
||||||
ac_cv_c_stdcall_suffix="yes"
|
|
||||||
else
|
|
||||||
ac_cv_c_stdcall_suffix="no"
|
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
fi
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stdcall_suffix" >&5
|
|
||||||
$as_echo "$ac_cv_c_stdcall_suffix" >&6; } ;;
|
|
||||||
*) ac_cv_c_stdcall_suffix="no" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
if test "$ac_cv_c_extern_prefix" = "yes"
|
|
||||||
then
|
|
||||||
$as_echo "#define __ASM_NAME(name) \"_\" name" >>confdefs.h
|
|
||||||
|
|
||||||
asm_name_prefix="_"
|
|
||||||
else
|
|
||||||
$as_echo "#define __ASM_NAME(name) name" >>confdefs.h
|
|
||||||
|
|
||||||
asm_name_prefix=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if test "$ac_cv_c_stdcall_suffix" = "yes"
|
|
||||||
then
|
|
||||||
$as_echo "#define __ASM_STDCALL(args) \"@\" #args" >>confdefs.h
|
|
||||||
|
|
||||||
else
|
|
||||||
$as_echo "#define __ASM_STDCALL(args) \"\"" >>confdefs.h
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to define a function in assembly code" >&5
|
|
||||||
$as_echo_n "checking how to define a function in assembly code... " >&6; }
|
|
||||||
if ${ac_cv_asm_func_def+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
asm("\t.globl _ac_test\n\t.def _ac_test; .scl 2; .type 32; .endef\n_ac_test:\t.long 0");
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
|
||||||
ac_cv_asm_func_def=".def"
|
|
||||||
else
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
asm("\t.globl _ac_test\n\t.type _ac_test,@function\n_ac_test:\t.long 0");
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
|
||||||
ac_cv_asm_func_def=".type @function"
|
|
||||||
else
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
asm("\t.globl _ac_test\n\t.type _ac_test,2\n_ac_test:\t.long 0");
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
|
||||||
ac_cv_asm_func_def=".type 2"
|
|
||||||
else
|
|
||||||
ac_cv_asm_func_def="unknown"
|
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
fi
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_asm_func_def" >&5
|
|
||||||
$as_echo "$ac_cv_asm_func_def" >&6; }
|
|
||||||
|
|
||||||
case "$ac_cv_asm_func_def" in
|
|
||||||
".def")
|
|
||||||
asm_func_header=".def $asm_name_prefix\" #name suffix \"; .scl 2; .type 32; .endef" ;;
|
|
||||||
".type @function")
|
|
||||||
asm_func_header=".type $asm_name_prefix\" #name suffix \",@function" ;;
|
|
||||||
".type 2")
|
|
||||||
asm_func_header=".type $asm_name_prefix\" #name suffix \",2" ;;
|
|
||||||
*)
|
|
||||||
asm_func_header="" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether asm() works outside of functions" >&5
|
|
||||||
$as_echo_n "checking whether asm() works outside of functions... " >&6; }
|
|
||||||
if ${ac_cv_c_asm_outside_funcs+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
asm(".text\n\t.long 0");
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
if ac_fn_c_try_compile "$LINENO"; then :
|
|
||||||
ac_cv_c_asm_outside_funcs="yes"
|
|
||||||
else
|
|
||||||
ac_cv_c_asm_outside_funcs="no"
|
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
|
||||||
fi
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_asm_outside_funcs" >&5
|
|
||||||
$as_echo "$ac_cv_c_asm_outside_funcs" >&6; }
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether .previous is supported in assembly code" >&5
|
|
||||||
$as_echo_n "checking whether .previous is supported in assembly code... " >&6; }
|
|
||||||
if ${ac_cv_c_dot_previous+:} false; then :
|
|
||||||
$as_echo_n "(cached) " >&6
|
|
||||||
else
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
asm(".text\nac_test:\t.long 0\n\t.previous");
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
|
||||||
ac_cv_c_dot_previous="yes"
|
|
||||||
else
|
|
||||||
ac_cv_c_dot_previous="no"
|
|
||||||
fi
|
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
fi
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_dot_previous" >&5
|
|
||||||
$as_echo "$ac_cv_c_dot_previous" >&6; }
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CFI directives are supported in assembly code" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CFI directives are supported in assembly code" >&5
|
||||||
$as_echo_n "checking whether CFI directives are supported in assembly code... " >&6; }
|
$as_echo_n "checking whether CFI directives are supported in assembly code... " >&6; }
|
||||||
if ${ac_cv_c_cfi_support+:} false; then :
|
if ${ac_cv_c_cfi_support+:} false; then :
|
||||||
|
@ -17505,52 +17296,16 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_cfi_support" >&5
|
{ $as_echo "$as_me:${as_lineno-$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 suffix \"\\n\\t$asm_func_header\\n$asm_name_prefix\" #name suffix \":\\n\\t"
|
|
||||||
asm_func_trailer=""
|
|
||||||
if test "$ac_cv_c_dot_previous" = "yes"
|
|
||||||
then
|
|
||||||
asm_func_trailer="\\n\\t.previous"
|
|
||||||
fi
|
|
||||||
if test "$ac_cv_c_cfi_support" = "yes"
|
if test "$ac_cv_c_cfi_support" = "yes"
|
||||||
then
|
then
|
||||||
asm_func_header="$asm_func_header.cfi_startproc\\n\\t"
|
|
||||||
asm_func_trailer="\\n\\t.cfi_endproc$asm_func_trailer"
|
|
||||||
|
|
||||||
$as_echo "#define __ASM_CFI(str) str" >>confdefs.h
|
|
||||||
|
|
||||||
LDDLLFLAGS="$LDDLLFLAGS -fasynchronous-unwind-tables"
|
LDDLLFLAGS="$LDDLLFLAGS -fasynchronous-unwind-tables"
|
||||||
else
|
else
|
||||||
$as_echo "#define __ASM_CFI(str) \"\"" >>confdefs.h
|
|
||||||
|
|
||||||
if test "x$enable_win64" = "xyes"
|
if test "x$enable_win64" = "xyes"
|
||||||
then
|
then
|
||||||
as_fn_append wine_warnings "|building 64-bit Wine without support for CFI directives; exception handling will not work properly."
|
as_fn_append wine_warnings "|building 64-bit Wine without support for CFI directives; exception handling will not work properly."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
asm_func_code="$asm_func_header\" code \"$asm_func_trailer"
|
|
||||||
|
|
||||||
|
|
||||||
if test "$ac_cv_c_asm_outside_funcs" = "yes"
|
|
||||||
then
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
|
||||||
#define __ASM_DEFINE_FUNC(name,suffix,code) asm(".text\n\t.align 4\n\t$asm_func_code");
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
else
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
|
||||||
#define __ASM_DEFINE_FUNC(name,suffix,code) void __asm_dummy_##name(void) { asm(".text\n\t.align 4\n\t$asm_func_code"); }
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
$as_echo "#define __ASM_GLOBAL_FUNC(name,code) __ASM_DEFINE_FUNC(name,\"\",code)" >>confdefs.h
|
|
||||||
|
|
||||||
|
|
||||||
$as_echo "#define __ASM_STDCALL_FUNC(name,args,code) __ASM_DEFINE_FUNC(name,__ASM_STDCALL(args),code)" >>confdefs.h
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
case $build_os in
|
case $build_os in
|
||||||
cygwin*|mingw32*) TOOLSEXT=".exe"
|
cygwin*|mingw32*) TOOLSEXT=".exe"
|
||||||
|
|
95
configure.ac
95
configure.ac
|
@ -2046,114 +2046,21 @@ then
|
||||||
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"
|
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl **** Check for underscore on external symbols ****
|
dnl **** Check for CFI directives support ****
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether external symbols need an underscore prefix], ac_cv_c_extern_prefix,
|
|
||||||
WINE_TRY_ASM_LINK([".globl _ac_test\n_ac_test:\t.long 0"],
|
|
||||||
[extern int ac_test;],
|
|
||||||
[if (ac_test) return 1],
|
|
||||||
ac_cv_c_extern_prefix="yes",ac_cv_c_extern_prefix="no"))
|
|
||||||
|
|
||||||
case $host_cpu in
|
|
||||||
*i[[3456789]]86*)
|
|
||||||
AC_CACHE_CHECK([whether external symbols need stdcall decoration], ac_cv_c_stdcall_suffix,
|
|
||||||
WINE_TRY_ASM_LINK(["jmp _ac_test@4"],
|
|
||||||
[#ifndef _MSC_VER
|
|
||||||
#define __stdcall __attribute__((__stdcall__))
|
|
||||||
#endif
|
|
||||||
int __stdcall ac_test(int i) { return i; }],
|
|
||||||
[if (ac_test(1)) return 1],
|
|
||||||
ac_cv_c_stdcall_suffix="yes",ac_cv_c_stdcall_suffix="no")) ;;
|
|
||||||
*) ac_cv_c_stdcall_suffix="no" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AH_TEMPLATE(__ASM_NAME,[Define to a macro to generate an assembly name from a C symbol])
|
|
||||||
if test "$ac_cv_c_extern_prefix" = "yes"
|
|
||||||
then
|
|
||||||
AC_DEFINE([__ASM_NAME(name)], ["_" name])
|
|
||||||
asm_name_prefix="_"
|
|
||||||
else
|
|
||||||
AC_DEFINE([__ASM_NAME(name)], [name])
|
|
||||||
asm_name_prefix=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
AH_TEMPLATE(__ASM_STDCALL,[Define to a macro to generate an stdcall suffix])
|
|
||||||
if test "$ac_cv_c_stdcall_suffix" = "yes"
|
|
||||||
then
|
|
||||||
AC_DEFINE([__ASM_STDCALL(args)],["@" #args])
|
|
||||||
else
|
|
||||||
AC_DEFINE([__ASM_STDCALL(args)],[""])
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl **** Check how to define a function in assembly code ****
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([how to define a function in assembly code], ac_cv_asm_func_def,
|
|
||||||
WINE_TRY_ASM_LINK(
|
|
||||||
["\t.globl _ac_test\n\t.def _ac_test; .scl 2; .type 32; .endef\n_ac_test:\t.long 0"],,,
|
|
||||||
ac_cv_asm_func_def=".def",
|
|
||||||
[WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,@function\n_ac_test:\t.long 0"],,,
|
|
||||||
ac_cv_asm_func_def=".type @function",
|
|
||||||
[WINE_TRY_ASM_LINK(["\t.globl _ac_test\n\t.type _ac_test,2\n_ac_test:\t.long 0"],,,
|
|
||||||
ac_cv_asm_func_def=".type 2",
|
|
||||||
ac_cv_asm_func_def="unknown")])]))
|
|
||||||
|
|
||||||
case "$ac_cv_asm_func_def" in
|
|
||||||
".def")
|
|
||||||
asm_func_header=".def $asm_name_prefix\" #name suffix \"; .scl 2; .type 32; .endef" ;;
|
|
||||||
".type @function")
|
|
||||||
asm_func_header=".type $asm_name_prefix\" #name suffix \",@function" ;;
|
|
||||||
".type 2")
|
|
||||||
asm_func_header=".type $asm_name_prefix\" #name suffix \",2" ;;
|
|
||||||
*)
|
|
||||||
asm_func_header="" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether asm() works outside of functions], ac_cv_c_asm_outside_funcs,
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[asm(".text\n\t.long 0");]],)],
|
|
||||||
ac_cv_c_asm_outside_funcs="yes",ac_cv_c_asm_outside_funcs="no"))
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether .previous is supported in assembly code], ac_cv_c_dot_previous,
|
|
||||||
WINE_TRY_ASM_LINK([".text\nac_test:\t.long 0\n\t.previous"],,,
|
|
||||||
ac_cv_c_dot_previous="yes",ac_cv_c_dot_previous="no"))
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([whether CFI directives are supported in assembly code], ac_cv_c_cfi_support,
|
AC_CACHE_CHECK([whether CFI directives are supported in assembly code], ac_cv_c_cfi_support,
|
||||||
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 suffix \"\\n\\t$asm_func_header\\n$asm_name_prefix\" #name suffix \":\\n\\t"
|
|
||||||
asm_func_trailer=""
|
|
||||||
if test "$ac_cv_c_dot_previous" = "yes"
|
|
||||||
then
|
|
||||||
asm_func_trailer="\\n\\t.previous"
|
|
||||||
fi
|
|
||||||
if test "$ac_cv_c_cfi_support" = "yes"
|
if test "$ac_cv_c_cfi_support" = "yes"
|
||||||
then
|
then
|
||||||
asm_func_header="$asm_func_header.cfi_startproc\\n\\t"
|
|
||||||
asm_func_trailer="\\n\\t.cfi_endproc$asm_func_trailer"
|
|
||||||
AC_DEFINE([__ASM_CFI(str)],[str],[Define to a macro to output a .cfi assembly pseudo-op])
|
|
||||||
LDDLLFLAGS="$LDDLLFLAGS -fasynchronous-unwind-tables"
|
LDDLLFLAGS="$LDDLLFLAGS -fasynchronous-unwind-tables"
|
||||||
else
|
else
|
||||||
AC_DEFINE([__ASM_CFI(str)],[""])
|
|
||||||
if test "x$enable_win64" = "xyes"
|
if test "x$enable_win64" = "xyes"
|
||||||
then
|
then
|
||||||
WINE_WARNING([building 64-bit Wine without support for CFI directives; exception handling will not work properly.])
|
WINE_WARNING([building 64-bit Wine without support for CFI directives; exception handling will not work properly.])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
asm_func_code="$asm_func_header\" code \"$asm_func_trailer"
|
|
||||||
|
|
||||||
AH_TEMPLATE(__ASM_DEFINE_FUNC,[Define to a macro to define an assembly function])
|
|
||||||
if test "$ac_cv_c_asm_outside_funcs" = "yes"
|
|
||||||
then
|
|
||||||
AC_DEFINE_UNQUOTED([__ASM_DEFINE_FUNC(name,suffix,code)],[asm(".text\n\t.align 4\n\t$asm_func_code");])
|
|
||||||
else
|
|
||||||
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
|
|
||||||
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 ****
|
||||||
|
|
||||||
case $build_os in
|
case $build_os in
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "dbghelp_private.h"
|
#include "dbghelp_private.h"
|
||||||
#include "winternl.h"
|
#include "winternl.h"
|
||||||
#include "psapi.h"
|
#include "psapi.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
|
WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include "winternl.h"
|
#include "winternl.h"
|
||||||
#include "excpt.h"
|
#include "excpt.h"
|
||||||
#include "ddk/ntddk.h"
|
#include "ddk/ntddk.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(ntoskrnl);
|
WINE_DEFAULT_DEBUG_CHANNEL(ntoskrnl);
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "winerror.h"
|
#include "winerror.h"
|
||||||
#include "wine/server.h"
|
#include "wine/server.h"
|
||||||
#include "kernel_private.h"
|
#include "kernel_private.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/exception.h"
|
#include "wine/exception.h"
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
|
|
||||||
#include "wine/exception.h"
|
#include "wine/exception.h"
|
||||||
#include "wine/list.h"
|
#include "wine/list.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@
|
||||||
#include "wine/library.h"
|
#include "wine/library.h"
|
||||||
#include "wine/server.h"
|
#include "wine/server.h"
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(process);
|
WINE_DEFAULT_DEBUG_CHANNEL(process);
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "winioctl.h"
|
#include "winioctl.h"
|
||||||
#include "ddk/wdm.h"
|
#include "ddk/wdm.h"
|
||||||
|
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/library.h"
|
#include "wine/library.h"
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
#include "kernel_private.h"
|
#include "kernel_private.h"
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
#include "wine/exception.h"
|
#include "wine/exception.h"
|
||||||
#include "wine/library.h"
|
#include "wine/library.h"
|
||||||
#include "wine/server.h"
|
#include "wine/server.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
#include "kernel_private.h"
|
#include "kernel_private.h"
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "wine/winbase16.h"
|
#include "wine/winbase16.h"
|
||||||
#include "winreg.h"
|
#include "winreg.h"
|
||||||
#include "winternl.h"
|
#include "winternl.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
|
|
||||||
#include "pshpack1.h"
|
#include "pshpack1.h"
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "ole2.h"
|
#include "ole2.h"
|
||||||
|
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
#include "mshtml_private.h"
|
#include "mshtml_private.h"
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "shlobj.h"
|
#include "shlobj.h"
|
||||||
#include "shlwapi.h"
|
#include "shlwapi.h"
|
||||||
|
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
#include "mshtml_private.h"
|
#include "mshtml_private.h"
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
#include "msipriv.h"
|
#include "msipriv.h"
|
||||||
#include "winemsi.h"
|
#include "winemsi.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/heap.h"
|
#include "wine/heap.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "wine/asm.h"
|
||||||
|
|
||||||
/* Copied from dlls/msvcrt/cxx.h */
|
/* Copied from dlls/msvcrt/cxx.h */
|
||||||
#undef __thiscall
|
#undef __thiscall
|
||||||
#ifdef __i386__ /* thiscall functions are i386-specific */
|
#ifdef __i386__ /* thiscall functions are i386-specific */
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
#ifndef __MSVCRT_CPPEXCEPT_H
|
#ifndef __MSVCRT_CPPEXCEPT_H
|
||||||
#define __MSVCRT_CPPEXCEPT_H
|
#define __MSVCRT_CPPEXCEPT_H
|
||||||
|
|
||||||
|
#include "wine/asm.h"
|
||||||
|
|
||||||
#define CXX_FRAME_MAGIC_VC6 0x19930520
|
#define CXX_FRAME_MAGIC_VC6 0x19930520
|
||||||
#define CXX_FRAME_MAGIC_VC7 0x19930521
|
#define CXX_FRAME_MAGIC_VC7 0x19930521
|
||||||
#define CXX_FRAME_MAGIC_VC8 0x19930522
|
#define CXX_FRAME_MAGIC_VC8 0x19930522
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "wine/asm.h"
|
||||||
|
|
||||||
#undef __thiscall
|
#undef __thiscall
|
||||||
#ifdef __i386__ /* thiscall functions are i386-specific */
|
#ifdef __i386__ /* thiscall functions are i386-specific */
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
#include "msvcrt.h"
|
#include "msvcrt.h"
|
||||||
|
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "ntsecapi.h"
|
#include "ntsecapi.h"
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#define WIN32_NO_STATUS
|
#define WIN32_NO_STATUS
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
#include "winternl.h"
|
#include "winternl.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
|
|
||||||
#ifndef _WIN64
|
#ifndef _WIN64
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "winnt.h"
|
#include "winnt.h"
|
||||||
#include "winternl.h"
|
#include "winternl.h"
|
||||||
#include "wine/server.h"
|
#include "wine/server.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
|
|
||||||
#define MAX_NT_PATH_LENGTH 277
|
#define MAX_NT_PATH_LENGTH 277
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "winnt.h"
|
#include "winnt.h"
|
||||||
#include "winternl.h"
|
#include "winternl.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/exception.h"
|
#include "wine/exception.h"
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
#ifndef __WINE_NTOSKRNL_PRIVATE_H
|
#ifndef __WINE_NTOSKRNL_PRIVATE_H
|
||||||
#define __WINE_NTOSKRNL_PRIVATE_H
|
#define __WINE_NTOSKRNL_PRIVATE_H
|
||||||
|
|
||||||
|
#include "wine/asm.h"
|
||||||
|
|
||||||
struct _OBJECT_TYPE
|
struct _OBJECT_TYPE
|
||||||
{
|
{
|
||||||
const WCHAR *name; /* object type name used for type validation */
|
const WCHAR *name; /* object type name used for type validation */
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "ddk/wdm.h"
|
#include "ddk/wdm.h"
|
||||||
#include "ddk/ntifs.h"
|
#include "ddk/ntifs.h"
|
||||||
|
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/heap.h"
|
#include "wine/heap.h"
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
#include "winnls.h"
|
#include "winnls.h"
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "dictionary.h"
|
#include "dictionary.h"
|
||||||
#include "storage32.h"
|
#include "storage32.h"
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
#include "typelib.h"
|
#include "typelib.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "variant.h"
|
#include "variant.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/heap.h"
|
#include "wine/heap.h"
|
||||||
#include "wine/list.h"
|
#include "wine/list.h"
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "richole.h"
|
#include "richole.h"
|
||||||
#include "imm.h"
|
#include "imm.h"
|
||||||
#include "textserv.h"
|
#include "textserv.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "editstr.h"
|
#include "editstr.h"
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include "tom.h"
|
#include "tom.h"
|
||||||
#include "imm.h"
|
#include "imm.h"
|
||||||
#include "textserv.h"
|
#include "textserv.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "editstr.h"
|
#include "editstr.h"
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#include "cpsf.h"
|
#include "cpsf.h"
|
||||||
#include "ndr_misc.h"
|
#include "ndr_misc.h"
|
||||||
#include "ndr_stubless.h"
|
#include "ndr_stubless.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
WINE_DEFAULT_DEBUG_CHANNEL(ole);
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include "rpcproxy.h"
|
#include "rpcproxy.h"
|
||||||
|
|
||||||
#include "wine/exception.h"
|
#include "wine/exception.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
#include "cpsf.h"
|
#include "cpsf.h"
|
||||||
|
|
|
@ -77,6 +77,7 @@
|
||||||
#include "user_private.h"
|
#include "user_private.h"
|
||||||
#include "wine/server.h"
|
#include "wine/server.h"
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "winternl.h"
|
#include "winternl.h"
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include "user_private.h"
|
#include "user_private.h"
|
||||||
#include "wine/gdi_driver.h"
|
#include "wine/gdi_driver.h"
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(system);
|
WINE_DEFAULT_DEBUG_CHANNEL(system);
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "winver.h"
|
#include "winver.h"
|
||||||
#include "wine/server.h"
|
#include "wine/server.h"
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
#include "user_private.h"
|
#include "user_private.h"
|
||||||
#include "controls.h"
|
#include "controls.h"
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
#include "win.h"
|
#include "win.h"
|
||||||
#include "user_private.h"
|
#include "user_private.h"
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DECLARE_DEBUG_CHANNEL(msg);
|
WINE_DECLARE_DEBUG_CHANNEL(msg);
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "winternl.h"
|
#include "winternl.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/list.h"
|
#include "wine/list.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(vcomp);
|
WINE_DEFAULT_DEBUG_CHANNEL(vcomp);
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "vss.h"
|
#include "vss.h"
|
||||||
#include "vswriter.h"
|
#include "vswriter.h"
|
||||||
#include "vsbackup.h"
|
#include "vsbackup.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL( vssapi );
|
WINE_DEFAULT_DEBUG_CHANNEL( vssapi );
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
#include "winspool.h"
|
#include "winspool.h"
|
||||||
#include "setupapi.h"
|
#include "setupapi.h"
|
||||||
|
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wbemprox_private.h"
|
#include "wbemprox_private.h"
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include "winternl.h"
|
#include "winternl.h"
|
||||||
#include "wine/exception.h"
|
#include "wine/exception.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
|
|
||||||
#if defined(__x86_64__) && defined(__ASM_GLOBAL_FUNC)
|
#ifdef __x86_64__
|
||||||
extern void __wine_unwind_trampoline(void);
|
extern void __wine_unwind_trampoline(void);
|
||||||
/* we need an extra call to make sure the stack is correctly aligned */
|
/* we need an extra call to make sure the stack is correctly aligned */
|
||||||
__ASM_GLOBAL_FUNC( __wine_unwind_trampoline, "callq *%rax" );
|
__ASM_GLOBAL_FUNC( __wine_unwind_trampoline, "callq *%rax" );
|
||||||
|
@ -47,7 +47,7 @@ void __wine_rtl_unwind( EXCEPTION_REGISTRATION_RECORD* frame, EXCEPTION_RECORD *
|
||||||
: "=a" (dummy1), "=S" (dummy2), "=D" (dummy3), "=c" (dummy4)
|
: "=a" (dummy1), "=S" (dummy2), "=D" (dummy3), "=c" (dummy4)
|
||||||
: "0" (RtlUnwind), "1" (frame), "2" (target), "3" (record)
|
: "0" (RtlUnwind), "1" (frame), "2" (target), "3" (record)
|
||||||
: "edx", "memory" );
|
: "edx", "memory" );
|
||||||
#elif defined(__x86_64__) && defined(__ASM_GLOBAL_FUNC)
|
#elif defined(__x86_64__)
|
||||||
RtlUnwind( frame, __wine_unwind_trampoline, record, target );
|
RtlUnwind( frame, __wine_unwind_trampoline, record, target );
|
||||||
#else
|
#else
|
||||||
RtlUnwind( frame, target, record, 0 );
|
RtlUnwind( frame, target, record, 0 );
|
||||||
|
|
|
@ -1469,26 +1469,6 @@
|
||||||
/* Define for large files, on AIX-style hosts. */
|
/* Define for large files, on AIX-style hosts. */
|
||||||
#undef _LARGE_FILES
|
#undef _LARGE_FILES
|
||||||
|
|
||||||
/* Define to a macro to output a .cfi assembly pseudo-op */
|
|
||||||
#undef __ASM_CFI
|
|
||||||
|
|
||||||
/* Define to a macro to define an assembly function */
|
|
||||||
#undef __ASM_DEFINE_FUNC
|
|
||||||
|
|
||||||
/* Define to a macro to generate an assembly function with C calling
|
|
||||||
convention */
|
|
||||||
#undef __ASM_GLOBAL_FUNC
|
|
||||||
|
|
||||||
/* Define to a macro to generate an assembly name from a C symbol */
|
|
||||||
#undef __ASM_NAME
|
|
||||||
|
|
||||||
/* Define to a macro to generate an stdcall suffix */
|
|
||||||
#undef __ASM_STDCALL
|
|
||||||
|
|
||||||
/* Define to a macro to generate an assembly function with stdcall calling
|
|
||||||
convention */
|
|
||||||
#undef __ASM_STDCALL_FUNC
|
|
||||||
|
|
||||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
/*
|
||||||
|
* Inline assembly support
|
||||||
|
*
|
||||||
|
* Copyright 2019 Alexandre Julliard
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __WINE_WINE_ASM_H
|
||||||
|
#define __WINE_WINE_ASM_H
|
||||||
|
|
||||||
|
#if defined(__APPLE__) || (defined(_WIN32) && defined(__i386__))
|
||||||
|
# define __ASM_NAME(name) "_" name
|
||||||
|
#else
|
||||||
|
# define __ASM_NAME(name) name
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_WIN32) && defined(__i386__)
|
||||||
|
# define __ASM_STDCALL(args) "@" #args
|
||||||
|
#else
|
||||||
|
# define __ASM_STDCALL(args) ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GCC_HAVE_DWARF2_CFI_ASM
|
||||||
|
# define __ASM_CFI(str) str
|
||||||
|
#else
|
||||||
|
# define __ASM_CFI(str) str
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
# define __ASM_FUNC_TYPE(name) ".def " name "; .scl 2; .type 32; .endef"
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
# define __ASM_FUNC_TYPE(name) ""
|
||||||
|
#elif defined(__arm__) || defined(__arm64__)
|
||||||
|
# define __ASM_FUNC_TYPE(name) ".type " name ",%function"
|
||||||
|
#else
|
||||||
|
# define __ASM_FUNC_TYPE(name) ".type " name ",@function"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
# define __ASM_DEFINE_FUNC(name,code) \
|
||||||
|
asm(".text\n\t.align 4\n\t.globl " name "\n\t" __ASM_FUNC_TYPE(name) "\n" name ":\n\t" \
|
||||||
|
__ASM_CFI(".cfi_startproc\n\t") code __ASM_CFI("\n\t.cfi_endproc") );
|
||||||
|
#else
|
||||||
|
# define __ASM_DEFINE_FUNC(name,code) void __asm_dummy_##__LINE__(void) { \
|
||||||
|
asm(".text\n\t.align 4\n\t.globl " name "\n\t" __ASM_FUNC_TYPE(name) "\n" name ":\n\t" \
|
||||||
|
__ASM_CFI(".cfi_startproc\n\t") code __ASM_CFI("\n\t.cfi_endproc") ); }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define __ASM_GLOBAL_FUNC(name,code) __ASM_DEFINE_FUNC(__ASM_NAME(#name),code)
|
||||||
|
|
||||||
|
#define __ASM_STDCALL_FUNC(name,args,code) __ASM_DEFINE_FUNC(__ASM_NAME(#name) __ASM_STDCALL(args),code)
|
||||||
|
|
||||||
|
#endif /* __WINE_WINE_ASM_H */
|
|
@ -18,9 +18,9 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "wine/port.h"
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include "basetsd.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "wine/library.h"
|
#include "wine/library.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#define WINE_UNICODE_INLINE /* nothing */
|
#define WINE_UNICODE_INLINE /* nothing */
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
#include "wine/library.h"
|
#include "wine/library.h"
|
||||||
|
#include "wine/asm.h"
|
||||||
|
|
||||||
/* functions from libwine_port that are also exported from libwine for backwards compatibility,
|
/* functions from libwine_port that are also exported from libwine for backwards compatibility,
|
||||||
* on platforms that require it */
|
* on platforms that require it */
|
||||||
|
|
|
@ -93,6 +93,7 @@
|
||||||
# include <sys/link.h>
|
# include <sys/link.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
/* ELF definitions */
|
/* ELF definitions */
|
||||||
|
|
|
@ -51,6 +51,7 @@
|
||||||
#include <mach-o/ldsyms.h>
|
#include <mach-o/ldsyms.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wine/asm.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
#ifndef LC_MAIN
|
#ifndef LC_MAIN
|
||||||
|
|
|
@ -75,6 +75,7 @@
|
||||||
#include <wine/svcctl.h>
|
#include <wine/svcctl.h>
|
||||||
#include <wine/unicode.h>
|
#include <wine/unicode.h>
|
||||||
#include <wine/library.h>
|
#include <wine/library.h>
|
||||||
|
#include <wine/asm.h>
|
||||||
#include <wine/debug.h>
|
#include <wine/debug.h>
|
||||||
|
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
|
|
Loading…
Reference in New Issue