Signed-off-by: Mohamad Al-Jaf mohamadaljaf@gmail.com --- dlls/wdscore/wdscore_internal.h | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 dlls/wdscore/wdscore_internal.h
diff --git a/dlls/wdscore/wdscore_internal.h b/dlls/wdscore/wdscore_internal.h new file mode 100644 index 00000000000..a10e6552155 --- /dev/null +++ b/dlls/wdscore/wdscore_internal.h @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Mohamad Al-Jaf + * + * 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 __WDSCORE_INTERNAL_H__ +#define __WDSCORE_INTERNAL_H__ + +#include "wine/asm.h" + +WINAPI void *get_ip(void); + +#ifdef __i386__ +__ASM_STDCALL_FUNC(get_ip, 0, + "movl (%esp), %eax\n\t" + "ret") +#elif defined(__x86_64__) +__ASM_STDCALL_FUNC(get_ip, 0, + "movq (%rsp), %rax\n\t" + "ret") +#elif defined(__arm__) +__ASM_STDCALL_FUNC(get_ip, 0, + "mov r0, lr\n\t" + "bx lr") +#elif defined(__aarch64__) +__ASM_STDCALL_FUNC(get_ip, 0, + "mov x0, lr\n\t" + "ret") +#endif + +#endif /* __WDSCORE_INTERNAL_H__ */