diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-03-15 08:59:43 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-03-15 22:46:05 +0000 |
commit | 19e4dae2a9fea68535ad900d980cc2c22f47ab34 (patch) | |
tree | 4fc7c7e5dc669416fc771ad3babb5c782262cbb4 /src/qml | |
parent | 04e51e9b6f6a317f6acafb7fb84137fbcabf8795 (diff) |
JIT: Add missing {STORE|LOAD}_ACC() to CreateCallContext
We cannot assume anything about the accumulator register after calling
PushCallContext::call(). Also add a note about not needing to re-load
the accumulator on ThrowException.
Fixes: QTBUG-111935
Change-Id: I7196585e1d2697c215f4fe87d8d7ac9b98b622a3
Reviewed-by: <carl@carlschwan.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 15ec024152a1d1d99a4934f7b2408e7af7b2552a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/jit/qv4baselinejit.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/jit/qv4baselinejit.cpp b/src/qml/jit/qv4baselinejit.cpp index 8679045de3..5696eab921 100644 --- a/src/qml/jit/qv4baselinejit.cpp +++ b/src/qml/jit/qv4baselinejit.cpp @@ -554,6 +554,8 @@ void BaselineJIT::generate_ThrowException() as->passEngineAsArg(0); BASELINEJIT_GENERATE_RUNTIME_CALL(ThrowException, CallResultDestination::Ignore); as->gotoCatchException(); + + // LOAD_ACC(); <- not needed here since it would be unreachable. } void BaselineJIT::generate_GetException() { as->getException(); } @@ -561,9 +563,11 @@ void BaselineJIT::generate_SetException() { as->setException(); } void BaselineJIT::generate_CreateCallContext() { + STORE_ACC(); as->prepareCallWithArgCount(1); as->passCppFrameAsArg(0); BASELINEJIT_GENERATE_RUNTIME_CALL(PushCallContext, CallResultDestination::Ignore); + LOAD_ACC(); } void BaselineJIT::generate_PushCatchContext(int index, int name) { as->pushCatchContext(index, name); } |