[vm/ffi] Fix incorrect use of host word size in FFI instructions.

Addresses https://github.com/dart-lang/sdk/issues/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>
diff --git a/runtime/vm/compiler/backend/il_arm.cc b/runtime/vm/compiler/backend/il_arm.cc
index c06169d..348ade2 100644
--- a/runtime/vm/compiler/backend/il_arm.cc
+++ b/runtime/vm/compiler/backend/il_arm.cc
@@ -1013,7 +1013,7 @@
 
   // Reserve space for arguments and align frame before entering C++ world.
   __ ReserveAlignedFrameSpace(compiler::ffi::NumStackSlots(arg_locations_) *
-                              kWordSize);
+                              compiler::target::kWordSize);
 
   FrameRebase rebase(/*old_base=*/FPREG, /*new_base=*/saved_fp,
                      /*stack_delta=*/0);
@@ -1027,7 +1027,8 @@
   // We need to copy the return address up into the dummy stack frame so the
   // stack walker will know which safepoint to use.
   __ mov(TMP, compiler::Operand(PC));
-  __ str(TMP, compiler::Address(FPREG, kSavedCallerPcSlotFromFp * kWordSize));
+  __ str(TMP, compiler::Address(FPREG, kSavedCallerPcSlotFromFp *
+                                           compiler::target::kWordSize));
 
   // For historical reasons, the PC on ARM points 8 bytes past the current
   // instruction. Therefore we emit the metadata here, 8 bytes (2 instructions)