Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Ignore whitespace Rev 1872 → Rev 1873

/drivers/ddk/debug/chkstk.S
0,0 → 1,31
 
.global ___chkstk
.global __alloca
 
.section .text
 
.align 4
___chkstk:
__alloca:
pushl %ecx /* save temp */
leal 8(%esp), %ecx /* point past return addr */
subl %eax, %ecx
call *__imp__GetStackBase
cmpl %eax, %ecx # check low stack limit
jb 1f
 
movl %esp, %eax /* save old stack pointer */
movl %ecx, %esp /* decrement stack */
movl (%eax), %ecx /* recover saved temp */
movl 4(%eax), %eax /* recover return address */
 
/* Push the return value back. Doing this instead of just
jumping to %eax preserves the cached call-return stack
used by most modern processors. */
pushl %eax
ret
1:
int3 #trap to debugger.
#Oh wait... there is no kernel debugger
.ascii "Stack overflow"
 
/drivers/ddk/debug
Property changes:
Added: svn:ignore
+*.o
+*.obj
/drivers/ddk/io
Property changes:
Added: svn:ignore
+*.o
+*.obj
/drivers/ddk/linux
Property changes:
Added: svn:ignore
+*.o
+*.obj
/drivers/ddk/malloc
Property changes:
Added: svn:ignore
+*.o
+*.obj
/drivers/ddk/stdio
Property changes:
Added: svn:ignore
+*.o
+*.obj
/drivers/ddk/string
Property changes:
Added: svn:ignore
+*.o
+*.obj
/drivers/ddk/.
Property changes:
Added: svn:ignore
+*.o
+*.obj