aboutsummaryrefslogtreecommitdiffstats
path: root/translate/grt/config/chkstk.S
blob: 3fa5cc68338f4e8ac5f713aae81e82cd367a6556 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
	.file		"chkstk.S"
	.version	"01.01"
	
	.text

#ifdef __APPLE__
#define __chkstk ___chkstk
#endif
	
	/* Function called to loop on the process.  */
	.align 4
#ifdef __ELF__
	.type	__chkstk,@function
#endif
	.globl __chkstk
__chkstk:
	testl	%eax,%eax
	je	0f
	subl	$4,%eax		/* 4 bytes already used by call.  */
	subl	%eax,%esp
	jmp	*(%esp,%eax)
0:
	ret
#ifdef __ELF__
	.size	__chkstk, . - __chkstk
#endif

	.ident	"Written by T.Gingold"