| OLD | NEW |
| 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" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
| (...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1357 __ j(ZERO, &call_target_function, Assembler::kNearJump); | 1357 __ j(ZERO, &call_target_function, Assembler::kNearJump); |
| 1358 __ cmpq(RDX, RAX); | 1358 __ cmpq(RDX, RAX); |
| 1359 __ j(NOT_EQUAL, &update, Assembler::kNearJump); | 1359 __ j(NOT_EQUAL, &update, Assembler::kNearJump); |
| 1360 | 1360 |
| 1361 __ Bind(&call_target_function); | 1361 __ Bind(&call_target_function); |
| 1362 // Call the target found in the cache. For a class id match, this is a | 1362 // Call the target found in the cache. For a class id match, this is a |
| 1363 // proper target for the given name and arguments descriptor. If the | 1363 // proper target for the given name and arguments descriptor. If the |
| 1364 // illegal class id was found, the target is a cache miss handler that can | 1364 // illegal class id was found, the target is a cache miss handler that can |
| 1365 // be invoked as a normal Dart function. | 1365 // be invoked as a normal Dart function. |
| 1366 __ movq(RAX, FieldAddress(RDI, RCX, TIMES_8, base + kWordSize)); | 1366 __ movq(RAX, FieldAddress(RDI, RCX, TIMES_8, base + kWordSize)); |
| 1367 __ movq(RCX, FieldAddress(RAX, Function::code_offset())); | 1367 __ movq(RCX, FieldAddress(RAX, Function::instructions_offset())); |
| 1368 __ movq(RCX, FieldAddress(RCX, Code::instructions_offset())); | |
| 1369 __ LoadObject(RBX, ic_data, PP); | 1368 __ LoadObject(RBX, ic_data, PP); |
| 1370 __ LoadObject(R10, arguments_descriptor, PP); | 1369 __ LoadObject(R10, arguments_descriptor, PP); |
| 1371 __ AddImmediate( | 1370 __ AddImmediate( |
| 1372 RCX, Immediate(Instructions::HeaderSize() - kHeapObjectTag), PP); | 1371 RCX, Immediate(Instructions::HeaderSize() - kHeapObjectTag), PP); |
| 1373 __ call(RCX); | 1372 __ call(RCX); |
| 1374 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos); | 1373 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos); |
| 1375 RecordSafepoint(locs); | 1374 RecordSafepoint(locs); |
| 1376 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos); | 1375 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos); |
| 1377 __ Drop(argument_count); | 1376 __ Drop(argument_count); |
| 1378 } | 1377 } |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1775 __ movups(reg, Address(RSP, 0)); | 1774 __ movups(reg, Address(RSP, 0)); |
| 1776 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP); | 1775 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP); |
| 1777 } | 1776 } |
| 1778 | 1777 |
| 1779 | 1778 |
| 1780 #undef __ | 1779 #undef __ |
| 1781 | 1780 |
| 1782 } // namespace dart | 1781 } // namespace dart |
| 1783 | 1782 |
| 1784 #endif // defined TARGET_ARCH_X64 | 1783 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |