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

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

Issue 984963002: Intrinsics in the INLINE_FUNCTION_LIST are now avaliable without '_', too. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Platform ports. Created 5 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/x64/code-stubs-x64.cc ('k') | test/mjsunit/regress/string-compare-memcmp.js » ('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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 2956 matching lines...) Expand 10 before | Expand all | Expand 10 after
2967 masm, edi, edx, ecx, ebx, String::TWO_BYTE_ENCODING); 2967 masm, edi, edx, ecx, ebx, String::TWO_BYTE_ENCODING);
2968 __ IncrementCounter(counters->sub_string_native(), 1); 2968 __ IncrementCounter(counters->sub_string_native(), 1);
2969 __ ret(3 * kPointerSize); 2969 __ ret(3 * kPointerSize);
2970 2970
2971 // Drop pushed values on the stack before tail call. 2971 // Drop pushed values on the stack before tail call.
2972 __ bind(&runtime_drop_two); 2972 __ bind(&runtime_drop_two);
2973 __ Drop(2); 2973 __ Drop(2);
2974 2974
2975 // Just jump to runtime to create the sub string. 2975 // Just jump to runtime to create the sub string.
2976 __ bind(&runtime); 2976 __ bind(&runtime);
2977 __ TailCallRuntime(Runtime::kSubString, 3, 1); 2977 __ TailCallRuntime(Runtime::kSubStringRT, 3, 1);
2978 2978
2979 __ bind(&single_char); 2979 __ bind(&single_char);
2980 // eax: string 2980 // eax: string
2981 // ebx: instance type 2981 // ebx: instance type
2982 // ecx: sub string length (smi) 2982 // ecx: sub string length (smi)
2983 // edx: from index (smi) 2983 // edx: from index (smi)
2984 StringCharAtGenerator generator(eax, edx, ecx, eax, &runtime, &runtime, 2984 StringCharAtGenerator generator(eax, edx, ecx, eax, &runtime, &runtime,
2985 &runtime, STRING_INDEX_IS_NUMBER, 2985 &runtime, STRING_INDEX_IS_NUMBER,
2986 RECEIVER_IS_STRING); 2986 RECEIVER_IS_STRING);
2987 generator.GenerateFast(masm); 2987 generator.GenerateFast(masm);
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
3190 // Drop arguments from the stack. 3190 // Drop arguments from the stack.
3191 __ pop(ecx); 3191 __ pop(ecx);
3192 __ add(esp, Immediate(2 * kPointerSize)); 3192 __ add(esp, Immediate(2 * kPointerSize));
3193 __ push(ecx); 3193 __ push(ecx);
3194 StringHelper::GenerateCompareFlatOneByteStrings(masm, edx, eax, ecx, ebx, 3194 StringHelper::GenerateCompareFlatOneByteStrings(masm, edx, eax, ecx, ebx,
3195 edi); 3195 edi);
3196 3196
3197 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) 3197 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater)
3198 // tagged as a small integer. 3198 // tagged as a small integer.
3199 __ bind(&runtime); 3199 __ bind(&runtime);
3200 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); 3200 __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
3201 } 3201 }
3202 3202
3203 3203
3204 void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) { 3204 void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) {
3205 // ----------- S t a t e ------------- 3205 // ----------- S t a t e -------------
3206 // -- edx : left 3206 // -- edx : left
3207 // -- eax : right 3207 // -- eax : right
3208 // -- esp[0] : return address 3208 // -- esp[0] : return address
3209 // ----------------------------------- 3209 // -----------------------------------
3210 3210
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
3474 3474
3475 // Handle more complex cases in runtime. 3475 // Handle more complex cases in runtime.
3476 __ bind(&runtime); 3476 __ bind(&runtime);
3477 __ pop(tmp1); // Return address. 3477 __ pop(tmp1); // Return address.
3478 __ push(left); 3478 __ push(left);
3479 __ push(right); 3479 __ push(right);
3480 __ push(tmp1); 3480 __ push(tmp1);
3481 if (equality) { 3481 if (equality) {
3482 __ TailCallRuntime(Runtime::kStringEquals, 2, 1); 3482 __ TailCallRuntime(Runtime::kStringEquals, 2, 1);
3483 } else { 3483 } else {
3484 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); 3484 __ TailCallRuntime(Runtime::kStringCompareRT, 2, 1);
3485 } 3485 }
3486 3486
3487 __ bind(&miss); 3487 __ bind(&miss);
3488 GenerateMiss(masm); 3488 GenerateMiss(masm);
3489 } 3489 }
3490 3490
3491 3491
3492 void CompareICStub::GenerateObjects(MacroAssembler* masm) { 3492 void CompareICStub::GenerateObjects(MacroAssembler* masm) {
3493 DCHECK(state() == CompareICState::OBJECT); 3493 DCHECK(state() == CompareICState::OBJECT);
3494 Label miss; 3494 Label miss;
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
4847 ApiParameterOperand(2), kStackSpace, nullptr, 4847 ApiParameterOperand(2), kStackSpace, nullptr,
4848 Operand(ebp, 7 * kPointerSize), NULL); 4848 Operand(ebp, 7 * kPointerSize), NULL);
4849 } 4849 }
4850 4850
4851 4851
4852 #undef __ 4852 #undef __
4853 4853
4854 } } // namespace v8::internal 4854 } } // namespace v8::internal
4855 4855
4856 #endif // V8_TARGET_ARCH_X87 4856 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | test/mjsunit/regress/string-compare-memcmp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698