Index: src/compiler/arm/code-generator-arm.cc |
diff --git a/src/compiler/arm/code-generator-arm.cc b/src/compiler/arm/code-generator-arm.cc |
index 08c984c57fc65683df62f6b109f05a0f163276ff..7581d8baacdee733b465ca9fcc0547cd17297ba1 100644 |
--- a/src/compiler/arm/code-generator-arm.cc |
+++ b/src/compiler/arm/code-generator-arm.cc |
@@ -690,6 +690,11 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
ArchOpcode arch_opcode = ArchOpcodeField::decode(opcode); |
switch (arch_opcode) { |
case kArchCallCodeObject: { |
+ // We must not share code targets for calls to builtins for WASM code, as |
+ // they might need to be patched individually. |
+ internal::Assembler::BlockCodeTargetSharingScope scope; |
+ if (info()->IsWasm()) scope.Open(masm()); |
+ |
EnsureSpaceForLazyDeopt(); |
if (instr->InputAt(0)->IsImmediate()) { |
__ Call(Handle<Code>::cast(i.InputHeapObject(0)), |
@@ -706,6 +711,11 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
} |
case kArchTailCallCodeObjectFromJSFunction: |
case kArchTailCallCodeObject: { |
+ // We must not share code targets for calls to builtins for WASM code, as |
+ // they might need to be patched individually. |
+ internal::Assembler::BlockCodeTargetSharingScope scope; |
+ if (info()->IsWasm()) scope.Open(masm()); |
+ |
if (arch_opcode == kArchTailCallCodeObjectFromJSFunction) { |
AssemblePopArgumentsAdaptorFrame(kJavaScriptCallArgCountRegister, |
i.TempRegister(0), i.TempRegister(1), |