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

Side by Side Diff: src/mips/code-stubs-mips.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 | « no previous file | src/mips64/code-stubs-mips64.cc » ('j') | 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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 2802 matching lines...) Expand 10 before | Expand all | Expand 10 after
2813 void StringToNumberStub::Generate(MacroAssembler* masm) { 2813 void StringToNumberStub::Generate(MacroAssembler* masm) {
2814 // The StringToNumber stub takes on argument in a0. 2814 // The StringToNumber stub takes on argument in a0.
2815 __ AssertString(a0); 2815 __ AssertString(a0);
2816 2816
2817 // Check if string has a cached array index. 2817 // Check if string has a cached array index.
2818 Label runtime; 2818 Label runtime;
2819 __ lw(a2, FieldMemOperand(a0, String::kHashFieldOffset)); 2819 __ lw(a2, FieldMemOperand(a0, String::kHashFieldOffset));
2820 __ And(at, a2, Operand(String::kContainsCachedArrayIndexMask)); 2820 __ And(at, a2, Operand(String::kContainsCachedArrayIndexMask));
2821 __ Branch(&runtime, ne, at, Operand(zero_reg)); 2821 __ Branch(&runtime, ne, at, Operand(zero_reg));
2822 __ IndexFromHash(a2, v0); 2822 __ IndexFromHash(a2, v0);
2823 __ Ret(USE_DELAY_SLOT); 2823 __ Ret();
2824 __ mov(v0, a0); // In delay slot.
2825 2824
2826 __ bind(&runtime); 2825 __ bind(&runtime);
2827 __ Push(a0); // Push argument. 2826 __ Push(a0); // Push argument.
2828 __ TailCallRuntime(Runtime::kStringToNumber); 2827 __ TailCallRuntime(Runtime::kStringToNumber);
2829 } 2828 }
2830 2829
2831 void ToLengthStub::Generate(MacroAssembler* masm) { 2830 void ToLengthStub::Generate(MacroAssembler* masm) {
2832 // The ToLength stub takes on argument in a0. 2831 // The ToLength stub takes on argument in a0.
2833 Label not_smi, positive_smi; 2832 Label not_smi, positive_smi;
2834 __ JumpIfNotSmi(a0, &not_smi); 2833 __ JumpIfNotSmi(a0, &not_smi);
(...skipping 2906 matching lines...) Expand 10 before | Expand all | Expand 10 after
5741 return_value_operand, NULL); 5740 return_value_operand, NULL);
5742 } 5741 }
5743 5742
5744 5743
5745 #undef __ 5744 #undef __
5746 5745
5747 } // namespace internal 5746 } // namespace internal
5748 } // namespace v8 5747 } // namespace v8
5749 5748
5750 #endif // V8_TARGET_ARCH_MIPS 5749 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698