| 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" // Needed here to get TARGET_ARCH_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
| 9 | 9 |
| 10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
| 11 #include "vm/cpu.h" | 11 #include "vm/cpu.h" |
| 12 #include "vm/dart_entry.h" | 12 #include "vm/dart_entry.h" |
| 13 #include "vm/flow_graph_compiler.h" | 13 #include "vm/flow_graph_compiler.h" |
| 14 #include "vm/object.h" | 14 #include "vm/object.h" |
| 15 #include "vm/object_store.h" | 15 #include "vm/object_store.h" |
| 16 #include "vm/regexp_assembler.h" | 16 #include "vm/regexp_assembler.h" |
| 17 #include "vm/symbols.h" | 17 #include "vm/symbols.h" |
| 18 | 18 |
| 19 namespace dart { | 19 namespace dart { |
| 20 | 20 |
| 21 DECLARE_FLAG(bool, interpret_irregexp); |
| 22 |
| 21 // When entering intrinsics code: | 23 // When entering intrinsics code: |
| 22 // R5: IC Data | 24 // R5: IC Data |
| 23 // R4: Arguments descriptor | 25 // R4: Arguments descriptor |
| 24 // LR: Return address | 26 // LR: Return address |
| 25 // The R5, R4 registers can be destroyed only if there is no slow-path, i.e. | 27 // The R5, R4 registers can be destroyed only if there is no slow-path, i.e. |
| 26 // if the intrinsified method always executes a return. | 28 // if the intrinsified method always executes a return. |
| 27 // The FP register should not be modified, because it is used by the profiler. | 29 // The FP register should not be modified, because it is used by the profiler. |
| 28 // The THR register (see constants_arm.h) must be preserved. | 30 // The THR register (see constants_arm.h) must be preserved. |
| 29 | 31 |
| 30 #define __ assembler-> | 32 #define __ assembler-> |
| (...skipping 1953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1984 StringEquality(assembler, kOneByteStringCid); | 1986 StringEquality(assembler, kOneByteStringCid); |
| 1985 } | 1987 } |
| 1986 | 1988 |
| 1987 | 1989 |
| 1988 void Intrinsifier::TwoByteString_equality(Assembler* assembler) { | 1990 void Intrinsifier::TwoByteString_equality(Assembler* assembler) { |
| 1989 StringEquality(assembler, kTwoByteStringCid); | 1991 StringEquality(assembler, kTwoByteStringCid); |
| 1990 } | 1992 } |
| 1991 | 1993 |
| 1992 | 1994 |
| 1993 void Intrinsifier::JSRegExp_ExecuteMatch(Assembler* assembler) { | 1995 void Intrinsifier::JSRegExp_ExecuteMatch(Assembler* assembler) { |
| 1996 if (FLAG_interpret_irregexp) return; |
| 1997 |
| 1994 static const intptr_t kRegExpParamOffset = 2 * kWordSize; | 1998 static const intptr_t kRegExpParamOffset = 2 * kWordSize; |
| 1995 static const intptr_t kStringParamOffset = 1 * kWordSize; | 1999 static const intptr_t kStringParamOffset = 1 * kWordSize; |
| 1996 // start_index smi is located at offset 0. | 2000 // start_index smi is located at offset 0. |
| 1997 | 2001 |
| 1998 // Incoming registers: | 2002 // Incoming registers: |
| 1999 // R0: Function. (Will be reloaded with the specialized matcher function.) | 2003 // R0: Function. (Will be reloaded with the specialized matcher function.) |
| 2000 // R4: Arguments descriptor. (Will be preserved.) | 2004 // R4: Arguments descriptor. (Will be preserved.) |
| 2001 // R5: Unknown. (Must be GC safe on tail call.) | 2005 // R5: Unknown. (Must be GC safe on tail call.) |
| 2002 | 2006 |
| 2003 // Load the specialized function pointer into R0. Leverage the fact the | 2007 // Load the specialized function pointer into R0. Leverage the fact the |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2056 Isolate* isolate = Isolate::Current(); | 2060 Isolate* isolate = Isolate::Current(); |
| 2057 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate)); | 2061 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate)); |
| 2058 // Set return value to Isolate::current_tag_. | 2062 // Set return value to Isolate::current_tag_. |
| 2059 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); | 2063 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); |
| 2060 __ Ret(); | 2064 __ Ret(); |
| 2061 } | 2065 } |
| 2062 | 2066 |
| 2063 } // namespace dart | 2067 } // namespace dart |
| 2064 | 2068 |
| 2065 #endif // defined TARGET_ARCH_ARM | 2069 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |