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

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

Issue 2380973002: [stubs] replaced ToString MacroAssembler Stub with CodeStubAssembler builtin (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/v8/v8 into ToStringTFStub Created 4 years, 2 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/ppc/code-stubs-ppc.cc ('k') | src/x64/code-stubs-x64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_S390 5 #if V8_TARGET_ARCH_S390
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 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2195 __ bind(&byte_loop); 2195 __ bind(&byte_loop);
2196 __ LoadlB(scratch, MemOperand(src)); 2196 __ LoadlB(scratch, MemOperand(src));
2197 __ la(src, MemOperand(src, 1)); 2197 __ la(src, MemOperand(src, 1));
2198 __ stc(scratch, MemOperand(dest)); 2198 __ stc(scratch, MemOperand(dest));
2199 __ la(dest, MemOperand(dest, 1)); 2199 __ la(dest, MemOperand(dest, 1));
2200 __ BranchOnCount(count, &byte_loop); 2200 __ BranchOnCount(count, &byte_loop);
2201 2201
2202 __ bind(&done); 2202 __ bind(&done);
2203 } 2203 }
2204 2204
2205 void ToStringStub::Generate(MacroAssembler* masm) {
2206 // The ToString stub takes one argument in r2.
2207 Label done;
2208 Label is_number;
2209 __ JumpIfSmi(r2, &is_number);
2210
2211 __ CompareObjectType(r2, r3, r3, FIRST_NONSTRING_TYPE);
2212 // r2: receiver
2213 // r3: receiver instance type
2214 __ blt(&done);
2215
2216 Label not_heap_number;
2217 __ CmpP(r3, Operand(HEAP_NUMBER_TYPE));
2218 __ bne(&not_heap_number);
2219 __ bind(&is_number);
2220 NumberToStringStub stub(isolate());
2221 __ TailCallStub(&stub);
2222 __ bind(&not_heap_number);
2223
2224 Label not_oddball;
2225 __ CmpP(r3, Operand(ODDBALL_TYPE));
2226 __ bne(&not_oddball);
2227 __ LoadP(r2, FieldMemOperand(r2, Oddball::kToStringOffset));
2228 __ Ret();
2229 __ bind(&not_oddball);
2230
2231 __ push(r2); // Push argument.
2232 __ TailCallRuntime(Runtime::kToString);
2233
2234 __ bind(&done);
2235 __ Ret();
2236 }
2237 2205
2238 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm, 2206 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm,
2239 Register left, 2207 Register left,
2240 Register right, 2208 Register right,
2241 Register scratch1, 2209 Register scratch1,
2242 Register scratch2) { 2210 Register scratch2) {
2243 Register length = scratch1; 2211 Register length = scratch1;
2244 2212
2245 // Compare lengths. 2213 // Compare lengths.
2246 Label strings_not_equal, check_zero_length; 2214 Label strings_not_equal, check_zero_length;
(...skipping 2879 matching lines...) Expand 10 before | Expand all | Expand 10 after
5126 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, 5094 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref,
5127 kStackUnwindSpace, NULL, return_value_operand, NULL); 5095 kStackUnwindSpace, NULL, return_value_operand, NULL);
5128 } 5096 }
5129 5097
5130 #undef __ 5098 #undef __
5131 5099
5132 } // namespace internal 5100 } // namespace internal
5133 } // namespace v8 5101 } // namespace v8
5134 5102
5135 #endif // V8_TARGET_ARCH_S390 5103 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/ppc/code-stubs-ppc.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698