* Fixed i386 longjmp, it must not return 0 if 'value' argument happens to be 0.

git-svn-id: trunk@22781 -
This commit is contained in:
sergei 2012-10-19 19:49:33 +00:00
parent 21f5b5559c
commit c0f49951b1

View File

@ -31,6 +31,10 @@ end;
Procedure fpc_longJmp (Var S : Jmp_buf; value : longint); assembler;nostackframe;[Public, alias : 'FPC_LONGJMP']; compilerproc;
asm
xchgl %edx,%eax
testl %eax,%eax
jnz .L1
incl %eax
.L1:
movl Jmp_buf.ebx(%edx),%ebx
movl Jmp_buf.esi(%edx),%esi
movl Jmp_buf.edi(%edx),%edi