Implement setjmp / longjmp in jerry-libc.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan
2015-06-15 14:40:56 +03:00
parent f115f731c3
commit b008867d81
8 changed files with 470 additions and 3 deletions
+30
View File
@@ -38,3 +38,33 @@ syscall_3_asm:
SYSCALL_3
.size syscall_3_asm, . - syscall_3_asm
/**
* setjmp (jmp_buf env)
*
* See also:
* longjmp
*
* @return 0 - if returns from direct call,
* nonzero - if returns after longjmp.
*/
.global setjmp
.type setjmp, %function
setjmp:
_SETJMP
.size setjmp, . - setjmp
/**
* longjmp (jmp_buf env, int val)
*
* Note:
* if val is not 0, then it would be returned from setjmp,
* otherwise - 0 would be returned.
*
* See also:
* setjmp
*/
.global longjmp
.type longjmp, %function
longjmp:
_LONGJMP
.size longjmu, . - setjmp