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" // Needed here to get TARGET_ARCH_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
7 | 7 |
8 #include "vm/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
9 | 9 |
10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
(...skipping 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2123 void Intrinsifier::OneByteString_equality(Assembler* assembler) { | 2123 void Intrinsifier::OneByteString_equality(Assembler* assembler) { |
2124 StringEquality(assembler, kOneByteStringCid); | 2124 StringEquality(assembler, kOneByteStringCid); |
2125 } | 2125 } |
2126 | 2126 |
2127 | 2127 |
2128 void Intrinsifier::TwoByteString_equality(Assembler* assembler) { | 2128 void Intrinsifier::TwoByteString_equality(Assembler* assembler) { |
2129 StringEquality(assembler, kTwoByteStringCid); | 2129 StringEquality(assembler, kTwoByteStringCid); |
2130 } | 2130 } |
2131 | 2131 |
2132 | 2132 |
2133 void Intrinsifier::JSRegExp_ExecuteMatch(Assembler* assembler) { | 2133 void Intrinsifier::RegExp_ExecuteMatch(Assembler* assembler) { |
2134 if (FLAG_interpret_irregexp) return; | 2134 if (FLAG_interpret_irregexp) return; |
2135 | 2135 |
2136 static const intptr_t kRegExpParamOffset = 2 * kWordSize; | 2136 static const intptr_t kRegExpParamOffset = 2 * kWordSize; |
2137 static const intptr_t kStringParamOffset = 1 * kWordSize; | 2137 static const intptr_t kStringParamOffset = 1 * kWordSize; |
2138 // start_index smi is located at offset 0. | 2138 // start_index smi is located at offset 0. |
2139 | 2139 |
2140 // Incoming registers: | 2140 // Incoming registers: |
2141 // R0: Function. (Will be reloaded with the specialized matcher function.) | 2141 // R0: Function. (Will be reloaded with the specialized matcher function.) |
2142 // R4: Arguments descriptor. (Will be preserved.) | 2142 // R4: Arguments descriptor. (Will be preserved.) |
2143 // R5: Unknown. (Must be GC safe on tail call.) | 2143 // R5: Unknown. (Must be GC safe on tail call.) |
2144 | 2144 |
2145 // Load the specialized function pointer into R0. Leverage the fact the | 2145 // Load the specialized function pointer into R0. Leverage the fact the |
2146 // string CIDs as well as stored function pointers are in sequence. | 2146 // string CIDs as well as stored function pointers are in sequence. |
2147 __ ldr(R2, Address(SP, kRegExpParamOffset)); | 2147 __ ldr(R2, Address(SP, kRegExpParamOffset)); |
2148 __ ldr(R1, Address(SP, kStringParamOffset)); | 2148 __ ldr(R1, Address(SP, kStringParamOffset)); |
2149 __ LoadClassId(R1, R1); | 2149 __ LoadClassId(R1, R1); |
2150 __ AddImmediate(R1, R1, -kOneByteStringCid); | 2150 __ AddImmediate(R1, R1, -kOneByteStringCid); |
2151 __ add(R1, R2, Operand(R1, LSL, kWordSizeLog2)); | 2151 __ add(R1, R2, Operand(R1, LSL, kWordSizeLog2)); |
2152 __ ldr(R0, FieldAddress(R1, JSRegExp::function_offset(kOneByteStringCid))); | 2152 __ ldr(R0, FieldAddress(R1, RegExp::function_offset(kOneByteStringCid))); |
2153 | 2153 |
2154 // Registers are now set up for the lazy compile stub. It expects the function | 2154 // Registers are now set up for the lazy compile stub. It expects the function |
2155 // in R0, the argument descriptor in R4, and IC-Data in R5. | 2155 // in R0, the argument descriptor in R4, and IC-Data in R5. |
2156 __ eor(R5, R5, Operand(R5)); | 2156 __ eor(R5, R5, Operand(R5)); |
2157 | 2157 |
2158 // Tail-call the function. | 2158 // Tail-call the function. |
2159 __ ldr(CODE_REG, FieldAddress(R0, Function::code_offset())); | 2159 __ ldr(CODE_REG, FieldAddress(R0, Function::code_offset())); |
2160 __ ldr(R1, FieldAddress(R0, Function::entry_point_offset())); | 2160 __ ldr(R1, FieldAddress(R0, Function::entry_point_offset())); |
2161 __ br(R1); | 2161 __ br(R1); |
2162 } | 2162 } |
(...skipping 26 matching lines...) Expand all Loading... |
2189 | 2189 |
2190 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { | 2190 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
2191 __ LoadIsolate(R0); | 2191 __ LoadIsolate(R0); |
2192 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); | 2192 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); |
2193 __ ret(); | 2193 __ ret(); |
2194 } | 2194 } |
2195 | 2195 |
2196 } // namespace dart | 2196 } // namespace dart |
2197 | 2197 |
2198 #endif // defined TARGET_ARCH_ARM64 | 2198 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |