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 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1907 // Calls to the runtime to optimize the given function. | 1907 // Calls to the runtime to optimize the given function. |
1908 // RDI: function to be reoptimized. | 1908 // RDI: function to be reoptimized. |
1909 // R10: argument descriptor (preserved). | 1909 // R10: argument descriptor (preserved). |
1910 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { | 1910 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { |
1911 __ EnterStubFrame(); | 1911 __ EnterStubFrame(); |
1912 __ pushq(R10); // Preserve args descriptor. | 1912 __ pushq(R10); // Preserve args descriptor. |
1913 __ pushq(Immediate(0)); // Result slot. | 1913 __ pushq(Immediate(0)); // Result slot. |
1914 __ pushq(RDI); // Arg0: function to optimize | 1914 __ pushq(RDI); // Arg0: function to optimize |
1915 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry, 1); | 1915 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry, 1); |
1916 __ popq(RAX); // Disard argument. | 1916 __ popq(RAX); // Disard argument. |
1917 __ popq(CODE_REG); // Get Code object. | 1917 __ popq(RAX); // Get Code object. |
1918 __ popq(R10); // Restore argument descriptor. | 1918 __ popq(R10); // Restore argument descriptor. |
1919 __ movq(RAX, FieldAddress(CODE_REG, Code::entry_point_offset())); | |
1920 __ LeaveStubFrame(); | 1919 __ LeaveStubFrame(); |
1921 __ jmp(RAX); | 1920 __ movq(CODE_REG, FieldAddress(RAX, Function::code_offset())); |
| 1921 __ movq(RCX, FieldAddress(RAX, Function::entry_point_offset())); |
| 1922 __ jmp(RCX); |
1922 __ int3(); | 1923 __ int3(); |
1923 } | 1924 } |
1924 | 1925 |
1925 | 1926 |
1926 // Does identical check (object references are equal or not equal) with special | 1927 // Does identical check (object references are equal or not equal) with special |
1927 // checks for boxed numbers. | 1928 // checks for boxed numbers. |
1928 // Left and right are pushed on stack. | 1929 // Left and right are pushed on stack. |
1929 // Return ZF set. | 1930 // Return ZF set. |
1930 // Note: A Mint cannot contain a value that would fit in Smi, a Bigint | 1931 // Note: A Mint cannot contain a value that would fit in Smi, a Bigint |
1931 // cannot contain a value that fits in Mint or Smi. | 1932 // cannot contain a value that fits in Mint or Smi. |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2278 } | 2279 } |
2279 | 2280 |
2280 | 2281 |
2281 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { | 2282 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { |
2282 __ int3(); | 2283 __ int3(); |
2283 } | 2284 } |
2284 | 2285 |
2285 } // namespace dart | 2286 } // namespace dart |
2286 | 2287 |
2287 #endif // defined TARGET_ARCH_X64 | 2288 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |