summaryrefslogtreecommitdiffhomepage
path: root/src/setjmp/nt32/setjmp.s
blob: d4e8db370ca5aecd5c6c4b58e52f7928a9eb31b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
.text
.globl	___setjmp
.globl	__setjmp
.globl	_setjmp

.def ___setjmp; .scl 2; .type 32; .endef
.def __setjmp; .scl 2; .type 32; .endef
.def _setjmp; .scl 2; .type 32; .endef

___setjmp:
__setjmp:
_setjmp:
	pop  (%ecx)		# return address
	mov  %esp, 0x04(%ecx)	# caller's stack pointer
	push (%ecx)		# restore own stack pointer

	xor %eax,  %eax
	ret