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:
parent
378a1cbb0c
commit
d5becaf83b
@ -20,6 +20,10 @@ SimpleTest setjmp_test
|
||||
: setjmp_test.c
|
||||
;
|
||||
|
||||
SimpleTest setjmp_test2
|
||||
: setjmp_test2.S
|
||||
;
|
||||
|
||||
SimpleTest signal_test
|
||||
: signal_test.cpp
|
||||
;
|
||||
|
12
src/tests/system/libroot/posix/setjmp_test2.S
Normal file
12
src/tests/system/libroot/posix/setjmp_test2.S
Normal 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
|
Loading…
Reference in New Issue
Block a user