[PATCH v10 2/8] wdscore: Add wdscore_internal.h file.

Mohamad Al-Jaf mohamadaljaf at gmail.com
Mon Apr 11 20:06:26 CDT 2022


Signed-off-by: Mohamad Al-Jaf <mohamadaljaf at 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__ */
-- 
2.35.1




More information about the wine-devel mailing list