Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Unified Diff: src/arm/builtins-arm.cc

Issue 2069423002: [builtins] Introduce a proper BUILTIN frame type. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix clobbered reg in mips Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/arm64/builtins-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/builtins-arm.cc
diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc
index 691328466076233bb29246e27e8f19aef3f7cb45..f5a0c706d7e40c0699b8a849eae04c68d0b844f8 100644
--- a/src/arm/builtins-arm.cc
+++ b/src/arm/builtins-arm.cc
@@ -140,6 +140,8 @@ void Builtins::Generate_ArrayCode(MacroAssembler* masm) {
void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
// ----------- S t a t e -------------
// -- r0 : number of arguments
+ // -- r1 : function
+ // -- cp : context
// -- lr : return address
// -- sp[(argc - n) * 8] : arg[n] (zero-based)
// -- sp[(argc + 1) * 8] : receiver
@@ -152,9 +154,9 @@ void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
DoubleRegister const reg = (kind == MathMaxMinKind::kMin) ? d2 : d1;
// Load the accumulator with the default return value (either -Infinity or
- // +Infinity), with the tagged value in r1 and the double value in d1.
- __ LoadRoot(r1, root_index);
- __ vldr(d1, FieldMemOperand(r1, HeapNumber::kValueOffset));
+ // +Infinity), with the tagged value in r5 and the double value in d1.
+ __ LoadRoot(r5, root_index);
+ __ vldr(d1, FieldMemOperand(r5, HeapNumber::kValueOffset));
// Remember how many slots to drop (including the receiver).
__ add(r4, r0, Operand(1));
@@ -178,24 +180,28 @@ void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
__ JumpIfRoot(r3, Heap::kHeapNumberMapRootIndex, &convert_number);
{
// Parameter is not a Number, use the ToNumber builtin to convert it.
- FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
+ DCHECK(!FLAG_enable_embedded_constant_pool);
+ FrameScope scope(masm, StackFrame::MANUAL);
+ __ Push(lr, fp, cp, r1);
+ __ add(fp, sp, Operand(2 * kPointerSize));
__ SmiTag(r0);
__ SmiTag(r4);
- __ Push(r0, r1, r4);
+ __ Push(r0, r4, r5);
__ mov(r0, r2);
__ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET);
__ mov(r2, r0);
- __ Pop(r0, r1, r4);
+ __ Pop(r0, r4, r5);
{
// Restore the double accumulator value (d1).
Label done_restore;
- __ SmiToDouble(d1, r1);
- __ JumpIfSmi(r1, &done_restore);
- __ vldr(d1, FieldMemOperand(r1, HeapNumber::kValueOffset));
+ __ SmiToDouble(d1, r5);
+ __ JumpIfSmi(r5, &done_restore);
+ __ vldr(d1, FieldMemOperand(r5, HeapNumber::kValueOffset));
__ bind(&done_restore);
}
__ SmiUntag(r4);
__ SmiUntag(r0);
+ __ Pop(lr, fp, cp, r1);
}
__ b(&convert);
__ bind(&convert_number);
@@ -221,18 +227,18 @@ void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
// Result is on the right hand side.
__ bind(&compare_swap);
__ vmov(d1, d2);
- __ mov(r1, r2);
+ __ mov(r5, r2);
__ b(&loop);
// At least one side is NaN, which means that the result will be NaN too.
__ bind(&compare_nan);
- __ LoadRoot(r1, Heap::kNanValueRootIndex);
- __ vldr(d1, FieldMemOperand(r1, HeapNumber::kValueOffset));
+ __ LoadRoot(r5, Heap::kNanValueRootIndex);
+ __ vldr(d1, FieldMemOperand(r5, HeapNumber::kValueOffset));
__ b(&loop);
}
__ bind(&done_loop);
- __ mov(r0, r1);
+ __ mov(r0, r5);
__ Drop(r4);
__ Ret();
}
« no previous file with comments | « no previous file | src/arm64/builtins-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698