| 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_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 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/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1982 __ ldr(left, Address(SP, 1 * kWordSize)); | 1982 __ ldr(left, Address(SP, 1 * kWordSize)); |
| 1983 __ ldr(right, Address(SP, 0 * kWordSize)); | 1983 __ ldr(right, Address(SP, 0 * kWordSize)); |
| 1984 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 1984 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
| 1985 __ Ret(); | 1985 __ Ret(); |
| 1986 } | 1986 } |
| 1987 | 1987 |
| 1988 | 1988 |
| 1989 // Called from megamorphic calls. | 1989 // Called from megamorphic calls. |
| 1990 // R0: receiver | 1990 // R0: receiver |
| 1991 // R9: MegamorphicCache (preserved) | 1991 // R9: MegamorphicCache (preserved) |
| 1992 // Result: | 1992 // Passed to target: |
| 1993 // CODE_REG: target Code | 1993 // CODE_REG: target Code |
| 1994 // R4: arguments descriptor | 1994 // R4: arguments descriptor |
| 1995 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { | 1995 void StubCode::GenerateMegamorphicCallStub(Assembler* assembler) { |
| 1996 __ NoMonomorphicCheckedEntry(); | 1996 __ NoMonomorphicCheckedEntry(); |
| 1997 | 1997 |
| 1998 __ LoadTaggedClassIdMayBeSmi(R0, R0); | 1998 __ LoadTaggedClassIdMayBeSmi(R0, R0); |
| 1999 // R0: receiver cid as Smi. | 1999 // R0: receiver cid as Smi. |
| 2000 __ ldr(R2, FieldAddress(R9, MegamorphicCache::buckets_offset())); | 2000 __ ldr(R2, FieldAddress(R9, MegamorphicCache::buckets_offset())); |
| 2001 __ ldr(R1, FieldAddress(R9, MegamorphicCache::mask_offset())); | 2001 __ ldr(R1, FieldAddress(R9, MegamorphicCache::mask_offset())); |
| 2002 // R2: cache buckets array. | 2002 // R2: cache buckets array. |
| 2003 // R1: mask. | 2003 // R1: mask. |
| 2004 | 2004 |
| 2005 // Compute the table index. | 2005 // Compute the table index. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2039 | 2039 |
| 2040 // Try next extry in the table. | 2040 // Try next extry in the table. |
| 2041 __ AddImmediate(R3, Smi::RawValue(1)); | 2041 __ AddImmediate(R3, Smi::RawValue(1)); |
| 2042 __ b(&loop); | 2042 __ b(&loop); |
| 2043 } | 2043 } |
| 2044 | 2044 |
| 2045 | 2045 |
| 2046 // Called from switchable IC calls. | 2046 // Called from switchable IC calls. |
| 2047 // R0: receiver | 2047 // R0: receiver |
| 2048 // R9: ICData (preserved) | 2048 // R9: ICData (preserved) |
| 2049 // Result: | 2049 // Passed to target: |
| 2050 // CODE_REG: target Code object | 2050 // CODE_REG: target Code object |
| 2051 // R4: arguments descriptor | 2051 // R4: arguments descriptor |
| 2052 void StubCode::GenerateICLookupThroughFunctionStub(Assembler* assembler) { | 2052 void StubCode::GenerateICCallThroughFunctionStub(Assembler* assembler) { |
| 2053 __ NoMonomorphicCheckedEntry(); | 2053 __ NoMonomorphicCheckedEntry(); |
| 2054 | 2054 |
| 2055 Label loop, found, miss; | 2055 Label loop, found, miss; |
| 2056 __ ldr(R4, FieldAddress(R9, ICData::arguments_descriptor_offset())); | 2056 __ ldr(R4, FieldAddress(R9, ICData::arguments_descriptor_offset())); |
| 2057 __ ldr(R8, FieldAddress(R9, ICData::ic_data_offset())); | 2057 __ ldr(R8, FieldAddress(R9, ICData::ic_data_offset())); |
| 2058 __ AddImmediate(R8, R8, Array::data_offset() - kHeapObjectTag); | 2058 __ AddImmediate(R8, R8, Array::data_offset() - kHeapObjectTag); |
| 2059 // R8: first IC entry | 2059 // R8: first IC entry |
| 2060 __ LoadTaggedClassIdMayBeSmi(R1, R0); | 2060 __ LoadTaggedClassIdMayBeSmi(R1, R0); |
| 2061 // R1: receiver cid as Smi | 2061 // R1: receiver cid as Smi |
| 2062 | 2062 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2079 __ bx(R1); | 2079 __ bx(R1); |
| 2080 | 2080 |
| 2081 __ Bind(&miss); | 2081 __ Bind(&miss); |
| 2082 __ LoadIsolate(R2); | 2082 __ LoadIsolate(R2); |
| 2083 __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset())); | 2083 __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset())); |
| 2084 __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset())); | 2084 __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset())); |
| 2085 __ bx(R1); | 2085 __ bx(R1); |
| 2086 } | 2086 } |
| 2087 | 2087 |
| 2088 | 2088 |
| 2089 void StubCode::GenerateICLookupThroughCodeStub(Assembler* assembler) { | 2089 void StubCode::GenerateICCallThroughCodeStub(Assembler* assembler) { |
| 2090 __ NoMonomorphicCheckedEntry(); | 2090 __ NoMonomorphicCheckedEntry(); |
| 2091 | 2091 |
| 2092 Label loop, found, miss; | 2092 Label loop, found, miss; |
| 2093 __ ldr(R4, FieldAddress(R9, ICData::arguments_descriptor_offset())); | 2093 __ ldr(R4, FieldAddress(R9, ICData::arguments_descriptor_offset())); |
| 2094 __ ldr(R8, FieldAddress(R9, ICData::ic_data_offset())); | 2094 __ ldr(R8, FieldAddress(R9, ICData::ic_data_offset())); |
| 2095 __ AddImmediate(R8, R8, Array::data_offset() - kHeapObjectTag); | 2095 __ AddImmediate(R8, R8, Array::data_offset() - kHeapObjectTag); |
| 2096 // R8: first IC entry | 2096 // R8: first IC entry |
| 2097 __ LoadTaggedClassIdMayBeSmi(R1, R0); | 2097 __ LoadTaggedClassIdMayBeSmi(R1, R0); |
| 2098 // R1: receiver cid as Smi | 2098 // R1: receiver cid as Smi |
| 2099 | 2099 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2144 } | 2144 } |
| 2145 | 2145 |
| 2146 | 2146 |
| 2147 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { | 2147 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { |
| 2148 __ bkpt(0); | 2148 __ bkpt(0); |
| 2149 } | 2149 } |
| 2150 | 2150 |
| 2151 } // namespace dart | 2151 } // namespace dart |
| 2152 | 2152 |
| 2153 #endif // defined TARGET_ARCH_ARM | 2153 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |