OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [i386/] [uwin.asm] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
/* stuff needed for libgcc on win32.  */
2
 
3
#ifdef L_chkstk
4
 
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 */
12
 
13
probe:  cmpl   $0x1000,%eax     /* > 4k ?*/
14
        jb    done
15
 
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 */
20
 
21
done:   subl   %eax,%ecx
22
        orl    $0x0,(%ecx)      /* less that 4k, just peek here */
23
 
24
        movl   %esp,%eax
25
        movl   %ecx,%esp        /* decrement stack */
26
 
27
        movl   (%eax),%ecx      /* recover saved temp */
28
        movl   4(%eax),%eax     /* get return address */
29
        jmp    *%eax
30
 
31
 
32
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.