aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/JSBackend/CallHandlers.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-20 10:11:43 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-20 10:11:43 -0800
commit617c45657f6a938b0c65d5107a2d7668e55ff49c (patch)
treed4114d64de9ab8ddca805febfc5d4337536fe6be /lib/Target/JSBackend/CallHandlers.h
parent8f802774d850b5e5c1a48419d0a655471d29018e (diff)
setjmp fixes
Diffstat (limited to 'lib/Target/JSBackend/CallHandlers.h')
-rw-r--r--lib/Target/JSBackend/CallHandlers.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/JSBackend/CallHandlers.h b/lib/Target/JSBackend/CallHandlers.h
index 219527429a..653c77f161 100644
--- a/lib/Target/JSBackend/CallHandlers.h
+++ b/lib/Target/JSBackend/CallHandlers.h
@@ -146,7 +146,8 @@ DEF_CALL_HANDLER(emscripten_check_longjmp, {
return "checkyourself";
})
DEF_CALL_HANDLER(emscripten_get_longjmp_result, {
- return "getyourresult";
+ std::string Threw = getValueAsStr(CI->getOperand(0));
+ return getAssign(getJSName(CI), CI->getType()) + "((" + Threw + ") & ((threwValue|0) != 0)) ? " + "_testSetjmp(HEAP32[" + Threw + ">>2]|0, setjmpTable)|0" + " : -1";
})
// i64 support