Chromium Code Reviews| 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 #include "vm/timeline.h" | |
| 18 | 19 |
| 19 namespace dart { | 20 namespace dart { |
| 20 | 21 |
| 21 // When entering intrinsics code: | 22 // When entering intrinsics code: |
| 22 // R4: Arguments descriptor | 23 // R4: Arguments descriptor |
| 23 // LR: Return address | 24 // LR: Return address |
| 24 // The R4 register can be destroyed only if there is no slow-path, i.e. | 25 // The R4 register can be destroyed only if there is no slow-path, i.e. |
| 25 // if the intrinsified method always executes a return. | 26 // if the intrinsified method always executes a return. |
| 26 // The FP register should not be modified, because it is used by the profiler. | 27 // The FP register should not be modified, because it is used by the profiler. |
| 27 // The PP and THR registers (see constants_arm.h) must be preserved. | 28 // The PP and THR registers (see constants_arm.h) must be preserved. |
| (...skipping 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2097 __ Ret(); | 2098 __ Ret(); |
| 2098 } | 2099 } |
| 2099 | 2100 |
| 2100 | 2101 |
| 2101 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { | 2102 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
| 2102 __ LoadIsolate(R0); | 2103 __ LoadIsolate(R0); |
| 2103 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); | 2104 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); |
| 2104 __ Ret(); | 2105 __ Ret(); |
| 2105 } | 2106 } |
| 2106 | 2107 |
| 2108 | |
| 2109 void Intrinsifier::Timeline_isDartStreamEnabled(Assembler* assembler) { | |
| 2110 if (!FLAG_support_timeline) { | |
| 2111 __ LoadObject(R0, Bool::False()); | |
| 2112 __ Ret(); | |
| 2113 return; | |
| 2114 } | |
| 2115 Label true_label; | |
| 2116 // Load TimelineStream*. | |
| 2117 __ ldr(R0, Address(THR, Thread::dart_stream_offset())); | |
| 2118 // Load uintptr_t from TimelineStream*. | |
| 2119 __ ldr(R0, Address(R0, TimelineStream::enabled_offset())); | |
| 2120 __ cmp(R0, Operand(0)); | |
|
zra
2016/05/17 17:35:49
__ cmp(R0, Operand(0));
__ LoadObject(R0, Bool::Tr
| |
| 2121 __ b(&true_label, NE); | |
| 2122 // Not enabled. | |
| 2123 __ LoadObject(R0, Bool::False()); | |
| 2124 __ Ret(); | |
| 2125 // Enabled. | |
| 2126 __ Bind(&true_label); | |
| 2127 __ LoadObject(R0, Bool::True()); | |
| 2128 __ Ret(); | |
| 2129 } | |
| 2130 | |
| 2107 } // namespace dart | 2131 } // namespace dart |
| 2108 | 2132 |
| 2109 #endif // defined TARGET_ARCH_ARM | 2133 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |