diff options
Diffstat (limited to 'lib/Target/JSBackend/CallHandlers.h')
-rw-r--r-- | lib/Target/JSBackend/CallHandlers.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/JSBackend/CallHandlers.h b/lib/Target/JSBackend/CallHandlers.h index 022bf7260b..e4c1673079 100644 --- a/lib/Target/JSBackend/CallHandlers.h +++ b/lib/Target/JSBackend/CallHandlers.h @@ -144,9 +144,11 @@ DEF_CALL_HANDLER(emscripten_longjmp, { }) DEF_CALL_HANDLER(emscripten_check_longjmp, { std::string Threw = getValueAsStr(CI->getOperand(0)); - std::string Assign = getAssign(getJSName(CI), CI->getType()); + std::string Target = getJSName(CI); + std::string Assign = getAssign(Target, CI->getType()); return "if (((" + Threw + "|0) != 0) & ((threwValue|0) != 0)) { " + Assign + "_testSetjmp(HEAP32[" + Threw + ">>2]|0, _setjmpTable)|0; " + + "if ((" + Target + "|0) == 0) { _longjmp(" + Threw + "|0, threwValue|0); } " + // rethrow "tempRet0 = threwValue; " + "} else { " + Assign + "-1; }"; }) |