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

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

Issue 2032063003: X87: VectorICs: Remove special code to increment call counts by two. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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_X87 5 #if V8_TARGET_ARCH_X87
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 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 __ j(not_equal, miss); 1305 __ j(not_equal, miss);
1306 1306
1307 __ mov(eax, arg_count()); 1307 __ mov(eax, arg_count());
1308 // Reload ecx. 1308 // Reload ecx.
1309 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size, 1309 __ mov(ecx, FieldOperand(ebx, edx, times_half_pointer_size,
1310 FixedArray::kHeaderSize)); 1310 FixedArray::kHeaderSize));
1311 1311
1312 // Increment the call count for monomorphic function calls. 1312 // Increment the call count for monomorphic function calls.
1313 __ add(FieldOperand(ebx, edx, times_half_pointer_size, 1313 __ add(FieldOperand(ebx, edx, times_half_pointer_size,
1314 FixedArray::kHeaderSize + kPointerSize), 1314 FixedArray::kHeaderSize + kPointerSize),
1315 Immediate(Smi::FromInt(CallICNexus::kCallCountIncrement))); 1315 Immediate(Smi::FromInt(1)));
1316 1316
1317 __ mov(ebx, ecx); 1317 __ mov(ebx, ecx);
1318 __ mov(edx, edi); 1318 __ mov(edx, edi);
1319 ArrayConstructorStub stub(masm->isolate(), arg_count()); 1319 ArrayConstructorStub stub(masm->isolate(), arg_count());
1320 __ TailCallStub(&stub); 1320 __ TailCallStub(&stub);
1321 1321
1322 // Unreachable. 1322 // Unreachable.
1323 } 1323 }
1324 1324
1325 1325
(...skipping 27 matching lines...) Expand all
1353 __ cmp(edi, FieldOperand(ecx, WeakCell::kValueOffset)); 1353 __ cmp(edi, FieldOperand(ecx, WeakCell::kValueOffset));
1354 __ j(not_equal, &extra_checks_or_miss); 1354 __ j(not_equal, &extra_checks_or_miss);
1355 1355
1356 // The compare above could have been a SMI/SMI comparison. Guard against this 1356 // The compare above could have been a SMI/SMI comparison. Guard against this
1357 // convincing us that we have a monomorphic JSFunction. 1357 // convincing us that we have a monomorphic JSFunction.
1358 __ JumpIfSmi(edi, &extra_checks_or_miss); 1358 __ JumpIfSmi(edi, &extra_checks_or_miss);
1359 1359
1360 // Increment the call count for monomorphic function calls. 1360 // Increment the call count for monomorphic function calls.
1361 __ add(FieldOperand(ebx, edx, times_half_pointer_size, 1361 __ add(FieldOperand(ebx, edx, times_half_pointer_size,
1362 FixedArray::kHeaderSize + kPointerSize), 1362 FixedArray::kHeaderSize + kPointerSize),
1363 Immediate(Smi::FromInt(CallICNexus::kCallCountIncrement))); 1363 Immediate(Smi::FromInt(1)));
1364 1364
1365 __ bind(&call_function); 1365 __ bind(&call_function);
1366 __ Set(eax, argc); 1366 __ Set(eax, argc);
1367 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(), 1367 __ Jump(masm->isolate()->builtins()->CallFunction(convert_mode(),
1368 tail_call_mode()), 1368 tail_call_mode()),
1369 RelocInfo::CODE_TARGET); 1369 RelocInfo::CODE_TARGET);
1370 1370
1371 __ bind(&extra_checks_or_miss); 1371 __ bind(&extra_checks_or_miss);
1372 Label uninitialized, miss, not_allocation_site; 1372 Label uninitialized, miss, not_allocation_site;
1373 1373
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 1424
1425 // Make sure the function belongs to the same native context. 1425 // Make sure the function belongs to the same native context.
1426 __ mov(ecx, FieldOperand(edi, JSFunction::kContextOffset)); 1426 __ mov(ecx, FieldOperand(edi, JSFunction::kContextOffset));
1427 __ mov(ecx, ContextOperand(ecx, Context::NATIVE_CONTEXT_INDEX)); 1427 __ mov(ecx, ContextOperand(ecx, Context::NATIVE_CONTEXT_INDEX));
1428 __ cmp(ecx, NativeContextOperand()); 1428 __ cmp(ecx, NativeContextOperand());
1429 __ j(not_equal, &miss); 1429 __ j(not_equal, &miss);
1430 1430
1431 // Initialize the call counter. 1431 // Initialize the call counter.
1432 __ mov(FieldOperand(ebx, edx, times_half_pointer_size, 1432 __ mov(FieldOperand(ebx, edx, times_half_pointer_size,
1433 FixedArray::kHeaderSize + kPointerSize), 1433 FixedArray::kHeaderSize + kPointerSize),
1434 Immediate(Smi::FromInt(CallICNexus::kCallCountIncrement))); 1434 Immediate(Smi::FromInt(1)));
1435 1435
1436 // Store the function. Use a stub since we need a frame for allocation. 1436 // Store the function. Use a stub since we need a frame for allocation.
1437 // ebx - vector 1437 // ebx - vector
1438 // edx - slot 1438 // edx - slot
1439 // edi - function 1439 // edi - function
1440 { 1440 {
1441 FrameScope scope(masm, StackFrame::INTERNAL); 1441 FrameScope scope(masm, StackFrame::INTERNAL);
1442 CreateWeakCellStub create_stub(isolate); 1442 CreateWeakCellStub create_stub(isolate);
1443 __ push(edi); 1443 __ push(edi);
1444 __ CallStub(&create_stub); 1444 __ CallStub(&create_stub);
(...skipping 3940 matching lines...) Expand 10 before | Expand all | Expand 10 after
5385 kStackUnwindSpace, nullptr, return_value_operand, 5385 kStackUnwindSpace, nullptr, return_value_operand,
5386 NULL); 5386 NULL);
5387 } 5387 }
5388 5388
5389 #undef __ 5389 #undef __
5390 5390
5391 } // namespace internal 5391 } // namespace internal
5392 } // namespace v8 5392 } // namespace v8
5393 5393
5394 #endif // V8_TARGET_ARCH_X87 5394 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698