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

Side by Side Diff: src/mips64/code-stubs-mips64.cc

Issue 1824893002: MIPS: Fix '[stubs] Split ToNumberStub into reusable subparts.' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2806 matching lines...) Expand 10 before | Expand all | Expand 10 after
2817 void StringToNumberStub::Generate(MacroAssembler* masm) { 2817 void StringToNumberStub::Generate(MacroAssembler* masm) {
2818 // The StringToNumber stub takes on argument in a0. 2818 // The StringToNumber stub takes on argument in a0.
2819 __ AssertString(a0); 2819 __ AssertString(a0);
2820 2820
2821 // Check if string has a cached array index. 2821 // Check if string has a cached array index.
2822 Label runtime; 2822 Label runtime;
2823 __ lwu(a2, FieldMemOperand(a0, String::kHashFieldOffset)); 2823 __ lwu(a2, FieldMemOperand(a0, String::kHashFieldOffset));
2824 __ And(at, a2, Operand(String::kContainsCachedArrayIndexMask)); 2824 __ And(at, a2, Operand(String::kContainsCachedArrayIndexMask));
2825 __ Branch(&runtime, ne, at, Operand(zero_reg)); 2825 __ Branch(&runtime, ne, at, Operand(zero_reg));
2826 __ IndexFromHash(a2, v0); 2826 __ IndexFromHash(a2, v0);
2827 __ Ret(USE_DELAY_SLOT); 2827 __ Ret();
2828 __ mov(v0, a0); // In delay slot.
2829 2828
2830 __ bind(&runtime); 2829 __ bind(&runtime);
2831 __ Push(a0); // Push argument. 2830 __ Push(a0); // Push argument.
2832 __ TailCallRuntime(Runtime::kStringToNumber); 2831 __ TailCallRuntime(Runtime::kStringToNumber);
2833 } 2832 }
2834 2833
2835 void ToLengthStub::Generate(MacroAssembler* masm) { 2834 void ToLengthStub::Generate(MacroAssembler* masm) {
2836 // The ToLength stub takes on argument in a0. 2835 // The ToLength stub takes on argument in a0.
2837 Label not_smi, positive_smi; 2836 Label not_smi, positive_smi;
2838 __ JumpIfNotSmi(a0, &not_smi); 2837 __ JumpIfNotSmi(a0, &not_smi);
(...skipping 2930 matching lines...) Expand 10 before | Expand all | Expand 10 after
5769 return_value_operand, NULL); 5768 return_value_operand, NULL);
5770 } 5769 }
5771 5770
5772 5771
5773 #undef __ 5772 #undef __
5774 5773
5775 } // namespace internal 5774 } // namespace internal
5776 } // namespace v8 5775 } // namespace v8
5777 5776
5778 #endif // V8_TARGET_ARCH_MIPS64 5777 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698