aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/backend/arm/code-generator-arm.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compiler/backend/arm/code-generator-arm.cc')
-rw-r--r--deps/v8/src/compiler/backend/arm/code-generator-arm.cc35
1 files changed, 15 insertions, 20 deletions
diff --git a/deps/v8/src/compiler/backend/arm/code-generator-arm.cc b/deps/v8/src/compiler/backend/arm/code-generator-arm.cc
index 9d353050fd..ba35077957 100644
--- a/deps/v8/src/compiler/backend/arm/code-generator-arm.cc
+++ b/deps/v8/src/compiler/backend/arm/code-generator-arm.cc
@@ -1051,11 +1051,9 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
case kIeee754Float64Log10:
ASSEMBLE_IEEE754_UNOP(log10);
break;
- case kIeee754Float64Pow: {
- __ Call(BUILTIN_CODE(isolate(), MathPowInternal), RelocInfo::CODE_TARGET);
- __ vmov(d0, d2);
+ case kIeee754Float64Pow:
+ ASSEMBLE_IEEE754_BINOP(pow);
break;
- }
case kIeee754Float64Sin:
ASSEMBLE_IEEE754_UNOP(sin);
break;
@@ -3051,8 +3049,8 @@ void CodeGenerator::AssembleConstructFrame() {
unwinding_info_writer_.MarkFrameConstructed(__ pc_offset());
}
- int shrink_slots = frame()->GetTotalFrameSlotCount() -
- call_descriptor->CalculateFixedFrameSize();
+ int required_slots = frame()->GetTotalFrameSlotCount() -
+ call_descriptor->CalculateFixedFrameSize();
if (info()->is_osr()) {
// TurboFan OSR-compiled functions cannot be entered directly.
@@ -3064,16 +3062,16 @@ void CodeGenerator::AssembleConstructFrame() {
// remaining stack slots.
if (FLAG_code_comments) __ RecordComment("-- OSR entrypoint --");
osr_pc_offset_ = __ pc_offset();
- shrink_slots -= osr_helper()->UnoptimizedFrameSlots();
+ required_slots -= osr_helper()->UnoptimizedFrameSlots();
ResetSpeculationPoison();
}
const RegList saves = call_descriptor->CalleeSavedRegisters();
const RegList saves_fp = call_descriptor->CalleeSavedFPRegisters();
- if (shrink_slots > 0) {
+ if (required_slots > 0) {
DCHECK(frame_access_state()->has_frame());
- if (info()->IsWasm() && shrink_slots > 128) {
+ if (info()->IsWasm() && required_slots > 128) {
// For WebAssembly functions with big frames we have to do the stack
// overflow check before we construct the frame. Otherwise we may not
// have enough space on the stack to call the runtime for the stack
@@ -3083,22 +3081,19 @@ void CodeGenerator::AssembleConstructFrame() {
// If the frame is bigger than the stack, we throw the stack overflow
// exception unconditionally. Thereby we can avoid the integer overflow
// check in the condition code.
- if ((shrink_slots * kSystemPointerSize) < (FLAG_stack_size * 1024)) {
+ if ((required_slots * kSystemPointerSize) < (FLAG_stack_size * 1024)) {
UseScratchRegisterScope temps(tasm());
Register scratch = temps.Acquire();
__ ldr(scratch, FieldMemOperand(
kWasmInstanceRegister,
WasmInstanceObject::kRealStackLimitAddressOffset));
__ ldr(scratch, MemOperand(scratch));
- __ add(scratch, scratch, Operand(shrink_slots * kSystemPointerSize));
+ __ add(scratch, scratch, Operand(required_slots * kSystemPointerSize));
__ cmp(sp, scratch);
__ b(cs, &done);
}
- __ ldr(r2, FieldMemOperand(kWasmInstanceRegister,
- WasmInstanceObject::kCEntryStubOffset));
- __ Move(cp, Smi::zero());
- __ CallRuntimeWithCEntry(Runtime::kThrowWasmStackOverflow, r2);
+ __ Call(wasm::WasmCode::kWasmStackOverflow, RelocInfo::WASM_STUB_CALL);
// We come from WebAssembly, there are no references for the GC.
ReferenceMap* reference_map = new (zone()) ReferenceMap(zone());
RecordSafepoint(reference_map, Safepoint::kSimple,
@@ -3111,11 +3106,11 @@ void CodeGenerator::AssembleConstructFrame() {
}
// Skip callee-saved and return slots, which are pushed below.
- shrink_slots -= base::bits::CountPopulation(saves);
- shrink_slots -= frame()->GetReturnSlotCount();
- shrink_slots -= 2 * base::bits::CountPopulation(saves_fp);
- if (shrink_slots > 0) {
- __ sub(sp, sp, Operand(shrink_slots * kSystemPointerSize));
+ required_slots -= base::bits::CountPopulation(saves);
+ required_slots -= frame()->GetReturnSlotCount();
+ required_slots -= 2 * base::bits::CountPopulation(saves_fp);
+ if (required_slots > 0) {
+ __ sub(sp, sp, Operand(required_slots * kSystemPointerSize));
}
}