OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
7 | 7 |
8 #include "vm/code_generator.h" | 8 #include "vm/code_generator.h" |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/ic_data.h" | 10 #include "vm/ic_data.h" |
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1538 __ movl(EAX, Address(EBX, kWordSize)); // Target function. | 1538 __ movl(EAX, Address(EBX, kWordSize)); // Target function. |
1539 | 1539 |
1540 __ Bind(&call_target_function); | 1540 __ Bind(&call_target_function); |
1541 // EAX: Target function. | 1541 // EAX: Target function. |
1542 __ movl(EAX, FieldAddress(EAX, Function::code_offset())); | 1542 __ movl(EAX, FieldAddress(EAX, Function::code_offset())); |
1543 __ movl(EAX, FieldAddress(EAX, Code::instructions_offset())); | 1543 __ movl(EAX, FieldAddress(EAX, Code::instructions_offset())); |
1544 __ addl(EAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); | 1544 __ addl(EAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); |
1545 __ jmp(EAX); | 1545 __ jmp(EAX); |
1546 } | 1546 } |
1547 | 1547 |
| 1548 |
| 1549 // ECX: Function object. |
| 1550 // EDX: Arguments array. |
| 1551 // TOS(0): return address (Dart code). |
| 1552 void StubCode::GenerateBreakpointStaticStub(Assembler* assembler) { |
| 1553 __ EnterFrame(0); |
| 1554 __ pushl(ECX); |
| 1555 __ pushl(EDX); |
| 1556 __ CallRuntimeFromStub(kBreakpointHandlerRuntimeEntry); |
| 1557 __ popl(EDX); |
| 1558 __ popl(ECX); |
| 1559 __ LeaveFrame(); |
| 1560 // Now call the static function. |
| 1561 __ jmp(&StubCode::CallStaticFunctionLabel()); |
| 1562 } |
| 1563 |
| 1564 |
| 1565 // ECX: Inline cache data array. |
| 1566 // EDX: Arguments array. |
| 1567 // TOS(0): return address (Dart code). |
| 1568 void StubCode::GenerateBreakpointDynamicStub(Assembler* assembler) { |
| 1569 __ EnterFrame(0); |
| 1570 __ pushl(ECX); |
| 1571 __ pushl(EDX); |
| 1572 __ CallRuntimeFromStub(kBreakpointHandlerRuntimeEntry); |
| 1573 __ popl(EDX); |
| 1574 __ popl(ECX); |
| 1575 __ LeaveFrame(); |
| 1576 // Now call the dynamic function. |
| 1577 __ jmp(&StubCode::InlineCacheLabel()); |
| 1578 } |
| 1579 |
1548 } // namespace dart | 1580 } // namespace dart |
1549 | 1581 |
1550 #endif // defined TARGET_ARCH_IA32 | 1582 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |