diff options
Diffstat (limited to 'deps/v8/src/codegen/arm/macro-assembler-arm.cc')
-rw-r--r-- | deps/v8/src/codegen/arm/macro-assembler-arm.cc | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/deps/v8/src/codegen/arm/macro-assembler-arm.cc b/deps/v8/src/codegen/arm/macro-assembler-arm.cc index ba334cd0b6..7f6d82518e 100644 --- a/deps/v8/src/codegen/arm/macro-assembler-arm.cc +++ b/deps/v8/src/codegen/arm/macro-assembler-arm.cc @@ -217,6 +217,13 @@ void TurboAssembler::Jump(Handle<Code> code, RelocInfo::Mode rmode, Jump(static_cast<intptr_t>(code.address()), rmode, cond); } +void TurboAssembler::Jump(const ExternalReference& reference) { + UseScratchRegisterScope temps(this); + Register scratch = temps.Acquire(); + Move(scratch, reference); + Jump(scratch); +} + void TurboAssembler::Call(Register target, Condition cond) { // Block constant pool for the call instruction sequence. BlockConstPoolScope block_const_pool(this); @@ -289,13 +296,7 @@ void TurboAssembler::Call(Handle<Code> code, RelocInfo::Mode rmode, } else if (target_is_isolate_independent_builtin && options().inline_offheap_trampolines) { // Inline the trampoline. - RecordCommentForOffHeapTrampoline(builtin_index); - EmbeddedData d = EmbeddedData::FromBlob(); - Address entry = d.InstructionStartOfBuiltin(builtin_index); - // Use ip directly instead of using UseScratchRegisterScope, as we do not - // preserve scratch registers across calls. - mov(ip, Operand(entry, RelocInfo::OFF_HEAP_TARGET)); - Call(ip, cond); + CallBuiltin(builtin_index); return; } @@ -323,6 +324,18 @@ void TurboAssembler::CallBuiltinByIndex(Register builtin_index) { Call(builtin_index); } +void TurboAssembler::CallBuiltin(int builtin_index, Condition cond) { + DCHECK(Builtins::IsBuiltinId(builtin_index)); + DCHECK(FLAG_embedded_builtins); + RecordCommentForOffHeapTrampoline(builtin_index); + EmbeddedData d = EmbeddedData::FromBlob(); + Address entry = d.InstructionStartOfBuiltin(builtin_index); + // Use ip directly instead of using UseScratchRegisterScope, as we do not + // preserve scratch registers across calls. + mov(ip, Operand(entry, RelocInfo::OFF_HEAP_TARGET)); + Call(ip, cond); +} + void TurboAssembler::LoadCodeObjectEntry(Register destination, Register code_object) { // Code objects are called differently depending on whether we are generating @@ -795,8 +808,9 @@ void MacroAssembler::RecordWrite(Register object, Operand offset, Check(eq, AbortReason::kWrongAddressOrValuePassedToRecordWrite); } - if (remembered_set_action == OMIT_REMEMBERED_SET && - !FLAG_incremental_marking) { + if ((remembered_set_action == OMIT_REMEMBERED_SET && + !FLAG_incremental_marking) || + FLAG_disable_write_barriers) { return; } @@ -1832,6 +1846,8 @@ void TurboAssembler::TruncateDoubleToI(Isolate* isolate, Zone* zone, if (stub_mode == StubCallMode::kCallWasmRuntimeStub) { Call(wasm::WasmCode::kDoubleToI, RelocInfo::WASM_STUB_CALL); + } else if (options().inline_offheap_trampolines) { + CallBuiltin(Builtins::kDoubleToI); } else { Call(BUILTIN_CODE(isolate, DoubleToI), RelocInfo::CODE_TARGET); } |