b27d2bd5fe
* cppfiles.c (INO_T_EQ): Handle UWIN. * c-common.c (decl_attributes): Flag unrecognized attribute functions as warnings instead of as errors. Support for i386-pc-uwin. * i386/uwin.h: New file. * i386/xm-uwin.h: New file. * i386/t-uwin: New file. * i386/uwin.asm: New file. * configure.in (i[3456]86-*-uwin*): Define. Add Workaround for vfork bug when hosted on uwin. * configure: Regenerate. * cccp.c (INO_T_EQ): Undefine. UWIN has inodes. (absolute_filename): UWIN uses POSIX pathnames only. * libgcc2.c (getpagesize): Do not define for UWIN. (mprotect): Likewise. * protoize.c (dirent.h): Conditionally include. (fputc): Prototype only if it's not a macro. From-SVN: r25696
33 lines
733 B
NASM
33 lines
733 B
NASM
/* stuff needed for libgcc1 on win32. */
|
|
|
|
#ifdef L_chkstk
|
|
|
|
.global __chkstk
|
|
.global __alloca
|
|
__chkstk:
|
|
__alloca:
|
|
pushl %ecx /* save temp */
|
|
movl %esp,%ecx /* get sp */
|
|
addl $0x8,%ecx /* and point to return addr */
|
|
|
|
probe: cmpl $0x1000,%eax /* > 4k ?*/
|
|
jb done
|
|
|
|
subl $0x1000,%ecx /* yes, move pointer down 4k*/
|
|
orl $0x0,(%ecx) /* probe there */
|
|
subl $0x1000,%eax /* decrement count */
|
|
jmp probe /* and do it again */
|
|
|
|
done: subl %eax,%ecx
|
|
orl $0x0,(%ecx) /* less that 4k, just peek here */
|
|
|
|
movl %esp,%eax
|
|
movl %ecx,%esp /* decrement stack */
|
|
|
|
movl (%eax),%ecx /* recover saved temp */
|
|
movl 4(%eax),%eax /* get return address */
|
|
jmp *%eax
|
|
|
|
|
|
#endif
|