OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1942 // R6: function to be re-optimized. | 1942 // R6: function to be re-optimized. |
1943 // R4: argument descriptor (preserved). | 1943 // R4: argument descriptor (preserved). |
1944 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { | 1944 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { |
1945 __ EnterStubFrame(); | 1945 __ EnterStubFrame(); |
1946 __ Push(R4); | 1946 __ Push(R4); |
1947 // Setup space on stack for the return value. | 1947 // Setup space on stack for the return value. |
1948 __ Push(ZR); | 1948 __ Push(ZR); |
1949 __ Push(R6); | 1949 __ Push(R6); |
1950 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry, 1); | 1950 __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry, 1); |
1951 __ Pop(R0); // Discard argument. | 1951 __ Pop(R0); // Discard argument. |
1952 __ Pop(CODE_REG); // Get Code object | 1952 __ Pop(R0); // Get Function object |
1953 __ Pop(R4); // Restore argument descriptor. | 1953 __ Pop(R4); // Restore argument descriptor. |
1954 __ LoadFieldFromOffset(R0, CODE_REG, Code::entry_point_offset()); | 1954 __ LoadFieldFromOffset(CODE_REG, R0, Function::code_offset()); |
| 1955 __ LoadFieldFromOffset(R1, R0, Function::entry_point_offset()); |
1955 __ LeaveStubFrame(); | 1956 __ LeaveStubFrame(); |
1956 __ br(R0); | 1957 __ br(R1); |
1957 __ brk(0); | 1958 __ brk(0); |
1958 } | 1959 } |
1959 | 1960 |
1960 | 1961 |
1961 // Does identical check (object references are equal or not equal) with special | 1962 // Does identical check (object references are equal or not equal) with special |
1962 // checks for boxed numbers. | 1963 // checks for boxed numbers. |
1963 // Left and right are pushed on stack. | 1964 // Left and right are pushed on stack. |
1964 // Return Zero condition flag set if equal. | 1965 // Return Zero condition flag set if equal. |
1965 // Note: A Mint cannot contain a value that would fit in Smi, a Bigint | 1966 // Note: A Mint cannot contain a value that would fit in Smi, a Bigint |
1966 // cannot contain a value that fits in Mint or Smi. | 1967 // cannot contain a value that fits in Mint or Smi. |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2313 } | 2314 } |
2314 | 2315 |
2315 | 2316 |
2316 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { | 2317 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { |
2317 __ brk(0); | 2318 __ brk(0); |
2318 } | 2319 } |
2319 | 2320 |
2320 } // namespace dart | 2321 } // namespace dart |
2321 | 2322 |
2322 #endif // defined TARGET_ARCH_ARM64 | 2323 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |