master
 1/**
 2 * This file has no copyright assigned and is placed in the Public Domain.
 3 * This file is part of the mingw-w64 runtime package.
 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
 5 */
 6#include <_mingw_mac.h>
 7
 8	.file	"mingw_getsp.S"
 9	.text
10#ifdef _WIN64
11	.align 8
12#else
13	.align 4
14#endif
15	.globl __MINGW_USYMBOL(mingw_getsp)
16	.def	__MINGW_USYMBOL(mingw_getsp);	.scl	2;	.type	32;	.endef
17__MINGW_USYMBOL(mingw_getsp):
18#if defined(_ARM64_) || defined(__aarch64__) || defined(__arm64ec__)
19	mov	x0, sp
20	ret
21#elif defined(_AMD64_) || defined(__x86_64__)
22	leaq  8(%rsp),%rax
23	ret
24#elif defined(_X86_) || defined(__i386__)
25	lea	4(%esp),%eax
26	ret
27#elif defined(_ARM_) || defined(__arm__)
28	mov	r0, sp
29	bx	lr
30#endif