Skip to content

Commit 9d55bb6

Browse files
sjindel-googlecommit-bot@chromium.org
authored andcommitted
[vm/ffi] Fix incorrect use of host word size in FFI instructions.
Addresses #38718 Will be tested by https://dart-review.googlesource.com/c/sdk/+/120121 Change-Id: Id1a877c254afd029efab57199d5bd6b65fe380f9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120260 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Samir Jindel <sjindel@google.com>
1 parent c77c272 commit 9d55bb6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

runtime/vm/compiler/backend/il_arm.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ void FfiCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
10131013

10141014
// Reserve space for arguments and align frame before entering C++ world.
10151015
__ ReserveAlignedFrameSpace(compiler::ffi::NumStackSlots(arg_locations_) *
1016-
kWordSize);
1016+
compiler::target::kWordSize);
10171017

10181018
FrameRebase rebase(/*old_base=*/FPREG, /*new_base=*/saved_fp,
10191019
/*stack_delta=*/0);
@@ -1027,7 +1027,8 @@ void FfiCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
10271027
// We need to copy the return address up into the dummy stack frame so the
10281028
// stack walker will know which safepoint to use.
10291029
__ mov(TMP, compiler::Operand(PC));
1030-
__ str(TMP, compiler::Address(FPREG, kSavedCallerPcSlotFromFp * kWordSize));
1030+
__ str(TMP, compiler::Address(FPREG, kSavedCallerPcSlotFromFp *
1031+
compiler::target::kWordSize));
10311032

10321033
// For historical reasons, the PC on ARM points 8 bytes past the current
10331034
// instruction. Therefore we emit the metadata here, 8 bytes (2 instructions)

0 commit comments

Comments
 (0)