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

Side by Side Diff: runtime/vm/stub_code_x64.cc

Issue 735543003: Range feedback for binary integer operations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 6 years 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/stub_code_mips.cc ('k') | runtime/vm/symbols.h » ('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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 } 1197 }
1198 1198
1199 1199
1200 // Note: RBX must be preserved. 1200 // Note: RBX must be preserved.
1201 // Attempt a quick Smi operation for known operations ('kind'). The ICData 1201 // Attempt a quick Smi operation for known operations ('kind'). The ICData
1202 // must have been primed with a Smi/Smi check that will be used for counting 1202 // must have been primed with a Smi/Smi check that will be used for counting
1203 // the invocations. 1203 // the invocations.
1204 static void EmitFastSmiOp(Assembler* assembler, 1204 static void EmitFastSmiOp(Assembler* assembler,
1205 Token::Kind kind, 1205 Token::Kind kind,
1206 intptr_t num_args, 1206 intptr_t num_args,
1207 Label* not_smi_or_overflow) { 1207 Label* not_smi_or_overflow,
1208 bool should_update_result_range) {
1208 if (FLAG_throw_on_javascript_int_overflow) { 1209 if (FLAG_throw_on_javascript_int_overflow) {
1209 // The overflow check is more complex than implemented below. 1210 // The overflow check is more complex than implemented below.
1210 return; 1211 return;
1211 } 1212 }
1212 ASSERT(num_args == 2); 1213 ASSERT(num_args == 2);
1213 __ movq(RCX, Address(RSP, + 1 * kWordSize)); // Right 1214 __ movq(RCX, Address(RSP, + 1 * kWordSize)); // Right
1214 __ movq(RAX, Address(RSP, + 2 * kWordSize)); // Left. 1215 __ movq(RAX, Address(RSP, + 2 * kWordSize)); // Left.
1215 __ movq(R12, RCX); 1216 __ movq(R12, RCX);
1216 __ orq(R12, RAX); 1217 __ orq(R12, RAX);
1217 __ testq(R12, Immediate(kSmiTagMask)); 1218 __ testq(R12, Immediate(kSmiTagMask));
(...skipping 21 matching lines...) Expand all
1239 __ LoadObject(RAX, Bool::False(), PP); 1240 __ LoadObject(RAX, Bool::False(), PP);
1240 __ jmp(&done, Assembler::kNearJump); 1241 __ jmp(&done, Assembler::kNearJump);
1241 __ Bind(&is_true); 1242 __ Bind(&is_true);
1242 __ LoadObject(RAX, Bool::True(), PP); 1243 __ LoadObject(RAX, Bool::True(), PP);
1243 __ Bind(&done); 1244 __ Bind(&done);
1244 break; 1245 break;
1245 } 1246 }
1246 default: UNIMPLEMENTED(); 1247 default: UNIMPLEMENTED();
1247 } 1248 }
1248 1249
1250
1251 if (should_update_result_range) {
1252 Label done;
1253 __ movq(RSI, RAX);
1254 __ UpdateRangeFeedback(RSI, 2, RBX, RCX, &done);
1255 __ Bind(&done);
1256 }
1257
1249 // RBX: IC data object (preserved). 1258 // RBX: IC data object (preserved).
1250 __ movq(R12, FieldAddress(RBX, ICData::ic_data_offset())); 1259 __ movq(R12, FieldAddress(RBX, ICData::ic_data_offset()));
1251 // R12: ic_data_array with check entries: classes and target functions. 1260 // R12: ic_data_array with check entries: classes and target functions.
1252 __ leaq(R12, FieldAddress(R12, Array::data_offset())); 1261 __ leaq(R12, FieldAddress(R12, Array::data_offset()));
1253 // R12: points directly to the first ic data array element. 1262 // R12: points directly to the first ic data array element.
1254 #if defined(DEBUG) 1263 #if defined(DEBUG)
1255 // Check that first entry is for Smi/Smi. 1264 // Check that first entry is for Smi/Smi.
1256 Label error, ok; 1265 Label error, ok;
1257 const Immediate& imm_smi_cid = 1266 const Immediate& imm_smi_cid =
1258 Immediate(reinterpret_cast<intptr_t>(Smi::New(kSmiCid))); 1267 Immediate(reinterpret_cast<intptr_t>(Smi::New(kSmiCid)));
(...skipping 25 matching lines...) Expand all
1284 // - If receiver is null -> jump to IC miss. 1293 // - If receiver is null -> jump to IC miss.
1285 // - If receiver is Smi -> load Smi class. 1294 // - If receiver is Smi -> load Smi class.
1286 // - If receiver is not-Smi -> load receiver's class. 1295 // - If receiver is not-Smi -> load receiver's class.
1287 // - Check if 'num_args' (including receiver) match any IC data group. 1296 // - Check if 'num_args' (including receiver) match any IC data group.
1288 // - Match found -> jump to target. 1297 // - Match found -> jump to target.
1289 // - Match not found -> jump to IC miss. 1298 // - Match not found -> jump to IC miss.
1290 void StubCode::GenerateNArgsCheckInlineCacheStub( 1299 void StubCode::GenerateNArgsCheckInlineCacheStub(
1291 Assembler* assembler, 1300 Assembler* assembler,
1292 intptr_t num_args, 1301 intptr_t num_args,
1293 const RuntimeEntry& handle_ic_miss, 1302 const RuntimeEntry& handle_ic_miss,
1294 Token::Kind kind) { 1303 Token::Kind kind,
1304 RangeCollectionMode range_collection_mode) {
1295 ASSERT(num_args > 0); 1305 ASSERT(num_args > 0);
1296 #if defined(DEBUG) 1306 #if defined(DEBUG)
1297 { Label ok; 1307 { Label ok;
1298 // Check that the IC data array has NumArgsTested() == num_args. 1308 // Check that the IC data array has NumArgsTested() == num_args.
1299 // 'NumArgsTested' is stored in the least significant bits of 'state_bits'. 1309 // 'NumArgsTested' is stored in the least significant bits of 'state_bits'.
1300 __ movl(RCX, FieldAddress(RBX, ICData::state_bits_offset())); 1310 __ movl(RCX, FieldAddress(RBX, ICData::state_bits_offset()));
1301 ASSERT(ICData::NumArgsTestedShift() == 0); // No shift needed. 1311 ASSERT(ICData::NumArgsTestedShift() == 0); // No shift needed.
1302 __ andq(RCX, Immediate(ICData::NumArgsTestedMask())); 1312 __ andq(RCX, Immediate(ICData::NumArgsTestedMask()));
1303 __ cmpq(RCX, Immediate(num_args)); 1313 __ cmpq(RCX, Immediate(num_args));
1304 __ j(EQUAL, &ok, Assembler::kNearJump); 1314 __ j(EQUAL, &ok, Assembler::kNearJump);
1305 __ Stop("Incorrect stub for IC data"); 1315 __ Stop("Incorrect stub for IC data");
1306 __ Bind(&ok); 1316 __ Bind(&ok);
1307 } 1317 }
1308 #endif // DEBUG 1318 #endif // DEBUG
1309 1319
1310 // Check single stepping. 1320 // Check single stepping.
1311 Label stepping, done_stepping; 1321 Label stepping, done_stepping;
1312 __ LoadIsolate(RAX); 1322 __ LoadIsolate(RAX);
1313 __ cmpb(Address(RAX, Isolate::single_step_offset()), Immediate(0)); 1323 __ cmpb(Address(RAX, Isolate::single_step_offset()), Immediate(0));
1314 __ j(NOT_EQUAL, &stepping); 1324 __ j(NOT_EQUAL, &stepping);
1315 __ Bind(&done_stepping); 1325 __ Bind(&done_stepping);
1316 1326
1327 Label not_smi_or_overflow;
1328 if (range_collection_mode == kCollectRanges) {
1329 ASSERT((num_args == 1) || (num_args == 2));
1330 if (num_args == 2) {
1331 __ movq(RAX, Address(RSP, + 2 * kWordSize));
1332 __ UpdateRangeFeedback(RAX, 0, RBX, RCX, &not_smi_or_overflow);
1333 }
1334
1335 __ movq(RAX, Address(RSP, + 1 * kWordSize));
1336 __ UpdateRangeFeedback(RAX, (num_args - 1), RBX, RCX, &not_smi_or_overflow);
1337 }
1317 if (kind != Token::kILLEGAL) { 1338 if (kind != Token::kILLEGAL) {
1318 Label not_smi_or_overflow; 1339 EmitFastSmiOp(
1319 EmitFastSmiOp(assembler, kind, num_args, &not_smi_or_overflow); 1340 assembler,
1320 __ Bind(&not_smi_or_overflow); 1341 kind,
1342 num_args,
1343 &not_smi_or_overflow,
1344 range_collection_mode == kCollectRanges);
1321 } 1345 }
1346 __ Bind(&not_smi_or_overflow);
1322 1347
1323 // Load arguments descriptor into R10. 1348 // Load arguments descriptor into R10.
1324 __ movq(R10, FieldAddress(RBX, ICData::arguments_descriptor_offset())); 1349 __ movq(R10, FieldAddress(RBX, ICData::arguments_descriptor_offset()));
1325 // Loop that checks if there is an IC data match. 1350 // Loop that checks if there is an IC data match.
1326 Label loop, update, test, found; 1351 Label loop, update, test, found;
1327 // RBX: IC data object (preserved). 1352 // RBX: IC data object (preserved).
1328 __ movq(R12, FieldAddress(RBX, ICData::ic_data_offset())); 1353 __ movq(R12, FieldAddress(RBX, ICData::ic_data_offset()));
1329 // R12: ic_data_array with check entries: classes and target functions. 1354 // R12: ic_data_array with check entries: classes and target functions.
1330 __ leaq(R12, FieldAddress(R12, Array::data_offset())); 1355 __ leaq(R12, FieldAddress(R12, Array::data_offset()));
1331 // R12: points directly to the first ic data array element. 1356 // R12: points directly to the first ic data array element.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 __ addq(R8, Immediate(Smi::RawValue(1))); 1438 __ addq(R8, Immediate(Smi::RawValue(1)));
1414 __ movq(R9, Immediate(Smi::RawValue(Smi::kMaxValue))); 1439 __ movq(R9, Immediate(Smi::RawValue(Smi::kMaxValue)));
1415 __ cmovnoq(R9, R8); 1440 __ cmovnoq(R9, R8);
1416 __ StoreIntoSmiField(Address(R12, count_offset), R9); 1441 __ StoreIntoSmiField(Address(R12, count_offset), R9);
1417 1442
1418 __ Bind(&call_target_function); 1443 __ Bind(&call_target_function);
1419 // RAX: Target function. 1444 // RAX: Target function.
1420 Label is_compiled; 1445 Label is_compiled;
1421 __ movq(RCX, FieldAddress(RAX, Function::instructions_offset())); 1446 __ movq(RCX, FieldAddress(RAX, Function::instructions_offset()));
1422 __ addq(RCX, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); 1447 __ addq(RCX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
1423 __ jmp(RCX); 1448 if (range_collection_mode == kCollectRanges) {
1449 __ movq(R8, Address(RSP, + 1 * kWordSize));
1450 if (num_args == 2) {
1451 __ movq(R9, Address(RSP, + 2 * kWordSize));
1452 }
1453 __ EnterStubFrame();
1454 __ pushq(RBX);
1455 if (num_args == 2) {
1456 __ pushq(R9);
1457 }
1458 __ pushq(R8);
1459 __ call(RCX);
1460
1461 Label done;
1462 __ movq(RDX, RAX);
1463 __ movq(RBX, Address(RBP, kFirstLocalSlotFromFp * kWordSize));
1464 __ UpdateRangeFeedback(RDX, 2, RBX, RCX, &done);
1465 __ Bind(&done);
1466 __ LeaveFrame();
1467 __ ret();
1468 } else {
1469 __ jmp(RCX);
1470 }
1424 1471
1425 __ Bind(&stepping); 1472 __ Bind(&stepping);
1426 __ EnterStubFrame(); 1473 __ EnterStubFrame();
1427 __ pushq(RBX); 1474 __ pushq(RBX);
1428 __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0); 1475 __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
1429 __ popq(RBX); 1476 __ popq(RBX);
1430 __ LeaveStubFrame(); 1477 __ LeaveStubFrame();
1431 __ jmp(&done_stepping); 1478 __ jmp(&done_stepping);
1432 } 1479 }
1433 1480
1434 1481
1435 // Use inline cache data array to invoke the target or continue in inline 1482 // Use inline cache data array to invoke the target or continue in inline
1436 // cache miss handler. Stub for 1-argument check (receiver class). 1483 // cache miss handler. Stub for 1-argument check (receiver class).
1437 // RBX: Inline cache data object. 1484 // RBX: Inline cache data object.
1438 // TOS(0): Return address. 1485 // TOS(0): Return address.
1439 // Inline cache data object structure: 1486 // Inline cache data object structure:
1440 // 0: function-name 1487 // 0: function-name
1441 // 1: N, number of arguments checked. 1488 // 1: N, number of arguments checked.
1442 // 2 .. (length - 1): group of checks, each check containing: 1489 // 2 .. (length - 1): group of checks, each check containing:
1443 // - N classes. 1490 // - N classes.
1444 // - 1 target function. 1491 // - 1 target function.
1445 void StubCode::GenerateOneArgCheckInlineCacheStub(Assembler* assembler) { 1492 void StubCode::GenerateOneArgCheckInlineCacheStub(Assembler* assembler) {
1446 GenerateUsageCounterIncrement(assembler, RCX); 1493 GenerateUsageCounterIncrement(assembler, RCX);
1447 GenerateNArgsCheckInlineCacheStub(assembler, 1, 1494 GenerateNArgsCheckInlineCacheStub(assembler, 1,
1448 kInlineCacheMissHandlerOneArgRuntimeEntry, Token::kILLEGAL); 1495 kInlineCacheMissHandlerOneArgRuntimeEntry,
1496 Token::kILLEGAL,
1497 kIgnoreRanges);
1449 } 1498 }
1450 1499
1451 1500
1452 void StubCode::GenerateTwoArgsCheckInlineCacheStub(Assembler* assembler) { 1501 void StubCode::GenerateTwoArgsCheckInlineCacheStub(Assembler* assembler) {
1453 GenerateUsageCounterIncrement(assembler, RCX); 1502 GenerateUsageCounterIncrement(assembler, RCX);
1454 GenerateNArgsCheckInlineCacheStub(assembler, 2, 1503 GenerateNArgsCheckInlineCacheStub(assembler, 2,
1455 kInlineCacheMissHandlerTwoArgsRuntimeEntry, Token::kILLEGAL); 1504 kInlineCacheMissHandlerTwoArgsRuntimeEntry,
1505 Token::kILLEGAL,
1506 kIgnoreRanges);
1456 } 1507 }
1457 1508
1458 1509
1459 void StubCode::GenerateThreeArgsCheckInlineCacheStub(Assembler* assembler) { 1510 void StubCode::GenerateThreeArgsCheckInlineCacheStub(Assembler* assembler) {
1460 GenerateUsageCounterIncrement(assembler, RCX); 1511 GenerateUsageCounterIncrement(assembler, RCX);
1461 GenerateNArgsCheckInlineCacheStub(assembler, 3, 1512 GenerateNArgsCheckInlineCacheStub(assembler, 3,
1462 kInlineCacheMissHandlerThreeArgsRuntimeEntry, Token::kILLEGAL); 1513 kInlineCacheMissHandlerThreeArgsRuntimeEntry,
1514 Token::kILLEGAL,
1515 kIgnoreRanges);
1463 } 1516 }
1464 1517
1465 1518
1466 void StubCode::GenerateSmiAddInlineCacheStub(Assembler* assembler) { 1519 void StubCode::GenerateSmiAddInlineCacheStub(Assembler* assembler) {
1467 GenerateUsageCounterIncrement(assembler, RCX); 1520 GenerateUsageCounterIncrement(assembler, RCX);
1468 GenerateNArgsCheckInlineCacheStub(assembler, 2, 1521 GenerateNArgsCheckInlineCacheStub(assembler, 2,
1469 kInlineCacheMissHandlerTwoArgsRuntimeEntry, Token::kADD); 1522 kInlineCacheMissHandlerTwoArgsRuntimeEntry,
1523 Token::kADD,
1524 kCollectRanges);
1470 } 1525 }
1471 1526
1472 1527
1473 void StubCode::GenerateSmiSubInlineCacheStub(Assembler* assembler) { 1528 void StubCode::GenerateSmiSubInlineCacheStub(Assembler* assembler) {
1474 GenerateUsageCounterIncrement(assembler, RCX); 1529 GenerateUsageCounterIncrement(assembler, RCX);
1475 GenerateNArgsCheckInlineCacheStub(assembler, 2, 1530 GenerateNArgsCheckInlineCacheStub(assembler, 2,
1476 kInlineCacheMissHandlerTwoArgsRuntimeEntry, Token::kSUB); 1531 kInlineCacheMissHandlerTwoArgsRuntimeEntry,
1532 Token::kSUB,
1533 kCollectRanges);
1477 } 1534 }
1478 1535
1479 1536
1480 void StubCode::GenerateSmiEqualInlineCacheStub(Assembler* assembler) { 1537 void StubCode::GenerateSmiEqualInlineCacheStub(Assembler* assembler) {
1481 GenerateUsageCounterIncrement(assembler, RCX); 1538 GenerateUsageCounterIncrement(assembler, RCX);
1482 GenerateNArgsCheckInlineCacheStub(assembler, 2, 1539 GenerateNArgsCheckInlineCacheStub(assembler, 2,
1483 kInlineCacheMissHandlerTwoArgsRuntimeEntry, Token::kEQ); 1540 kInlineCacheMissHandlerTwoArgsRuntimeEntry,
1541 Token::kEQ,
1542 kIgnoreRanges);
1484 } 1543 }
1485 1544
1486 1545
1546 void StubCode::GenerateUnaryRangeCollectingInlineCacheStub(
1547 Assembler* assembler) {
1548 GenerateUsageCounterIncrement(assembler, RCX);
1549 GenerateNArgsCheckInlineCacheStub(assembler, 1,
1550 kInlineCacheMissHandlerOneArgRuntimeEntry,
1551 Token::kILLEGAL,
1552 kCollectRanges);
1553 }
1554
1555
1556 void StubCode::GenerateBinaryRangeCollectingInlineCacheStub(
1557 Assembler* assembler) {
1558 GenerateUsageCounterIncrement(assembler, RCX);
1559 GenerateNArgsCheckInlineCacheStub(assembler, 2,
1560 kInlineCacheMissHandlerTwoArgsRuntimeEntry,
1561 Token::kILLEGAL,
1562 kCollectRanges);
1563 }
1564
1565
1487 // Use inline cache data array to invoke the target or continue in inline 1566 // Use inline cache data array to invoke the target or continue in inline
1488 // cache miss handler. Stub for 1-argument check (receiver class). 1567 // cache miss handler. Stub for 1-argument check (receiver class).
1489 // RDI: function which counter needs to be incremented. 1568 // RDI: function which counter needs to be incremented.
1490 // RBX: Inline cache data object. 1569 // RBX: Inline cache data object.
1491 // TOS(0): Return address. 1570 // TOS(0): Return address.
1492 // Inline cache data object structure: 1571 // Inline cache data object structure:
1493 // 0: function-name 1572 // 0: function-name
1494 // 1: N, number of arguments checked. 1573 // 1: N, number of arguments checked.
1495 // 2 .. (length - 1): group of checks, each check containing: 1574 // 2 .. (length - 1): group of checks, each check containing:
1496 // - N classes. 1575 // - N classes.
1497 // - 1 target function. 1576 // - 1 target function.
1498 void StubCode::GenerateOneArgOptimizedCheckInlineCacheStub( 1577 void StubCode::GenerateOneArgOptimizedCheckInlineCacheStub(
1499 Assembler* assembler) { 1578 Assembler* assembler) {
1500 GenerateOptimizedUsageCounterIncrement(assembler); 1579 GenerateOptimizedUsageCounterIncrement(assembler);
1501 GenerateNArgsCheckInlineCacheStub(assembler, 1, 1580 GenerateNArgsCheckInlineCacheStub(assembler, 1,
1502 kInlineCacheMissHandlerOneArgRuntimeEntry, Token::kILLEGAL); 1581 kInlineCacheMissHandlerOneArgRuntimeEntry,
1582 Token::kILLEGAL,
1583 kIgnoreRanges);
1503 } 1584 }
1504 1585
1505 1586
1506 void StubCode::GenerateTwoArgsOptimizedCheckInlineCacheStub( 1587 void StubCode::GenerateTwoArgsOptimizedCheckInlineCacheStub(
1507 Assembler* assembler) { 1588 Assembler* assembler) {
1508 GenerateOptimizedUsageCounterIncrement(assembler); 1589 GenerateOptimizedUsageCounterIncrement(assembler);
1509 GenerateNArgsCheckInlineCacheStub(assembler, 2, 1590 GenerateNArgsCheckInlineCacheStub(assembler, 2,
1510 kInlineCacheMissHandlerTwoArgsRuntimeEntry, Token::kILLEGAL); 1591 kInlineCacheMissHandlerTwoArgsRuntimeEntry,
1592 Token::kILLEGAL,
1593 kIgnoreRanges);
1511 } 1594 }
1512 1595
1513 1596
1514 void StubCode::GenerateThreeArgsOptimizedCheckInlineCacheStub( 1597 void StubCode::GenerateThreeArgsOptimizedCheckInlineCacheStub(
1515 Assembler* assembler) { 1598 Assembler* assembler) {
1516 GenerateOptimizedUsageCounterIncrement(assembler); 1599 GenerateOptimizedUsageCounterIncrement(assembler);
1517 GenerateNArgsCheckInlineCacheStub(assembler, 3, 1600 GenerateNArgsCheckInlineCacheStub(assembler, 3,
1518 kInlineCacheMissHandlerThreeArgsRuntimeEntry, Token::kILLEGAL); 1601 kInlineCacheMissHandlerThreeArgsRuntimeEntry,
1602 Token::kILLEGAL,
1603 kIgnoreRanges);
1519 } 1604 }
1520 1605
1521 1606
1522 // Intermediary stub between a static call and its target. ICData contains 1607 // Intermediary stub between a static call and its target. ICData contains
1523 // the target function and the call count. 1608 // the target function and the call count.
1524 // RBX: ICData 1609 // RBX: ICData
1525 void StubCode::GenerateZeroArgsUnoptimizedStaticCallStub(Assembler* assembler) { 1610 void StubCode::GenerateZeroArgsUnoptimizedStaticCallStub(Assembler* assembler) {
1526 GenerateUsageCounterIncrement(assembler, RCX); 1611 GenerateUsageCounterIncrement(assembler, RCX);
1527 #if defined(DEBUG) 1612 #if defined(DEBUG)
1528 { Label ok; 1613 { Label ok;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0); 1662 __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
1578 __ popq(RBX); 1663 __ popq(RBX);
1579 __ LeaveStubFrame(); 1664 __ LeaveStubFrame();
1580 __ jmp(&done_stepping, Assembler::kNearJump); 1665 __ jmp(&done_stepping, Assembler::kNearJump);
1581 } 1666 }
1582 1667
1583 1668
1584 void StubCode::GenerateOneArgUnoptimizedStaticCallStub(Assembler* assembler) { 1669 void StubCode::GenerateOneArgUnoptimizedStaticCallStub(Assembler* assembler) {
1585 GenerateUsageCounterIncrement(assembler, RCX); 1670 GenerateUsageCounterIncrement(assembler, RCX);
1586 GenerateNArgsCheckInlineCacheStub( 1671 GenerateNArgsCheckInlineCacheStub(
1587 assembler, 1, kStaticCallMissHandlerOneArgRuntimeEntry, Token::kILLEGAL); 1672 assembler,
1673 1,
1674 kStaticCallMissHandlerOneArgRuntimeEntry,
1675 Token::kILLEGAL,
1676 kIgnoreRanges);
1588 } 1677 }
1589 1678
1590 1679
1591 void StubCode::GenerateTwoArgsUnoptimizedStaticCallStub(Assembler* assembler) { 1680 void StubCode::GenerateTwoArgsUnoptimizedStaticCallStub(Assembler* assembler) {
1592 GenerateUsageCounterIncrement(assembler, RCX); 1681 GenerateUsageCounterIncrement(assembler, RCX);
1593 GenerateNArgsCheckInlineCacheStub(assembler, 2, 1682 GenerateNArgsCheckInlineCacheStub(assembler,
1594 kStaticCallMissHandlerTwoArgsRuntimeEntry, Token::kILLEGAL); 1683 2,
1684 kStaticCallMissHandlerTwoArgsRuntimeEntry,
1685 Token::kILLEGAL,
1686 kIgnoreRanges);
1595 } 1687 }
1596 1688
1597 1689
1598 // Stub for compiling a function and jumping to the compiled code. 1690 // Stub for compiling a function and jumping to the compiled code.
1599 // RCX: IC-Data (for methods). 1691 // RCX: IC-Data (for methods).
1600 // R10: Arguments descriptor. 1692 // R10: Arguments descriptor.
1601 // RAX: Function. 1693 // RAX: Function.
1602 void StubCode::GenerateLazyCompileStub(Assembler* assembler) { 1694 void StubCode::GenerateLazyCompileStub(Assembler* assembler) {
1603 __ EnterStubFrame(); 1695 __ EnterStubFrame();
1604 __ pushq(R10); // Preserve arguments descriptor array. 1696 __ pushq(R10); // Preserve arguments descriptor array.
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1975 2067
1976 __ movq(left, Address(RSP, 2 * kWordSize)); 2068 __ movq(left, Address(RSP, 2 * kWordSize));
1977 __ movq(right, Address(RSP, 1 * kWordSize)); 2069 __ movq(right, Address(RSP, 1 * kWordSize));
1978 GenerateIdenticalWithNumberCheckStub(assembler, left, right); 2070 GenerateIdenticalWithNumberCheckStub(assembler, left, right);
1979 __ ret(); 2071 __ ret();
1980 } 2072 }
1981 2073
1982 } // namespace dart 2074 } // namespace dart
1983 2075
1984 #endif // defined TARGET_ARCH_X64 2076 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_mips.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698