| 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" | 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 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 __ j(ABOVE_EQUAL, &slow_case); | 907 __ j(ABOVE_EQUAL, &slow_case); |
| 908 } | 908 } |
| 909 | 909 |
| 910 // Successfully allocated the object, now update top to point to | 910 // Successfully allocated the object, now update top to point to |
| 911 // next object start and initialize the object. | 911 // next object start and initialize the object. |
| 912 // RAX: new object. | 912 // RAX: new object. |
| 913 // R13: next object start. | 913 // R13: next object start. |
| 914 // R10: number of context variables. | 914 // R10: number of context variables. |
| 915 // RCX: heap. | 915 // RCX: heap. |
| 916 __ movq(Address(RCX, Heap::TopOffset(space)), R13); | 916 __ movq(Address(RCX, Heap::TopOffset(space)), R13); |
| 917 __ addq(RAX, Immediate(kHeapObjectTag)); | |
| 918 // R13: Size of allocation in bytes. | 917 // R13: Size of allocation in bytes. |
| 919 __ subq(R13, RAX); | 918 __ subq(R13, RAX); |
| 919 __ addq(RAX, Immediate(kHeapObjectTag)); |
| 920 // Generate isolate-independent code to allow sharing between isolates. | 920 // Generate isolate-independent code to allow sharing between isolates. |
| 921 __ UpdateAllocationStatsWithSize(cid, R13, space, | 921 __ UpdateAllocationStatsWithSize(cid, R13, space, |
| 922 /* inline_isolate */ false); | 922 /* inline_isolate */ false); |
| 923 | 923 |
| 924 // Calculate the size tag. | 924 // Calculate the size tag. |
| 925 // RAX: new object. | 925 // RAX: new object. |
| 926 // R10: number of context variables. | 926 // R10: number of context variables. |
| 927 { | 927 { |
| 928 Label size_tag_overflow, done; | 928 Label size_tag_overflow, done; |
| 929 __ leaq(R13, Address(R10, TIMES_8, fixed_size)); | 929 __ leaq(R13, Address(R10, TIMES_8, fixed_size)); |
| (...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2184 // Result: | 2184 // Result: |
| 2185 // RCX: entry point. | 2185 // RCX: entry point. |
| 2186 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { | 2186 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { |
| 2187 EmitMegamorphicLookup(assembler, RDI, RBX, RCX); | 2187 EmitMegamorphicLookup(assembler, RDI, RBX, RCX); |
| 2188 __ ret(); | 2188 __ ret(); |
| 2189 } | 2189 } |
| 2190 | 2190 |
| 2191 } // namespace dart | 2191 } // namespace dart |
| 2192 | 2192 |
| 2193 #endif // defined TARGET_ARCH_X64 | 2193 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |