Add setjmp and longjmp functions for nuttx-stm32f4 target. (#1743)

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
Robert Sipka
2017-04-19 00:10:05 +02:00
committed by yichoi
parent 9cbd5e78ad
commit 8d99e73db3
4 changed files with 91 additions and 26 deletions
-25
View File
@@ -376,28 +376,3 @@ jerry_port_get_current_time (void)
{
return 0;
} /* jerry_port_get_current_time */
/**
* Compiler built-in setjmp function.
*
* @return 0 when called the first time
* 1 when returns from a longjmp call
*/
int
setjmp (jmp_buf buf)
{
return __builtin_setjmp (buf);
} /* setjmp */
/**
* Compiler built-in longjmp function.
*
* Note:
* ignores value argument
*/
void
longjmp (jmp_buf buf, int value)
{
/* Must be called with 1. */
__builtin_longjmp (buf, 1);
} /* longjmp */