Test for setjmp() that demonstrates why it isn't a good idea to

manipulate the stack pointer as we do.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25426 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-05-10 16:26:05 +00:00
parent 378a1cbb0c
commit d5becaf83b
2 changed files with 16 additions and 0 deletions

View File

@ -20,6 +20,10 @@ SimpleTest setjmp_test
: setjmp_test.c
;
SimpleTest setjmp_test2
: setjmp_test2.S
;
SimpleTest signal_test
: signal_test.cpp
;

View File

@ -0,0 +1,12 @@
#define FUNCTION(x) .global x; .type x,@function; x
FUNCTION(main):
mov $jmpBuffer, %eax
push %eax
call setjmp
add $4, %esp
mov $0, %eax
ret
.comm jmpBuffer, 1024, 32