* config/i386/netbsd-elf.h (TARGET_OS_CPP_BUILTINS): Define.
[official-gcc.git] / gcc / config / i386 / cygwin.asm
bloba27af31f599c0ae9e1810106b049259991e4d2fe
1 /* stuff needed for libgcc on win32. */
3 #ifdef L_chkstk
5 .global ___chkstk
6 .global __alloca
7 ___chkstk:
8 __alloca:
9 pushl %ecx /* save temp */
10 movl %esp,%ecx /* get sp */
11 addl $0x8,%ecx /* and point to return addr */
13 probe: cmpl $0x1000,%eax /* > 4k ?*/
14 jb done
16 subl $0x1000,%ecx /* yes, move pointer down 4k*/
17 orl $0x0,(%ecx) /* probe there */
18 subl $0x1000,%eax /* decrement count */
19 jmp probe /* and do it again */
21 done: subl %eax,%ecx
22 orl $0x0,(%ecx) /* less that 4k, just peek here */
24 movl %esp,%eax
25 movl %ecx,%esp /* decrement stack */
27 movl (%eax),%ecx /* recover saved temp */
28 movl 4(%eax),%eax /* get return address */
29 jmp *%eax
32 #endif