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 // The intrinsic code below is executed before a method has built its frame. | 5 // The intrinsic code below is executed before a method has built its frame. |
| 6 // The return address is on the stack and the arguments below it. | 6 // The return address is on the stack and the arguments below it. |
| 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. | 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. |
| 8 // Each intrinsification method returns true if the corresponding | 8 // Each intrinsification method returns true if the corresponding |
| 9 // Dart method was intrinsified. | 9 // Dart method was intrinsified. |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 // The EBP register should not be modified, because it is used by the profiler. | 34 // The EBP register should not be modified, because it is used by the profiler. |
| 35 // The THR register (see constants_ia32.h) must be preserved. | 35 // The THR register (see constants_ia32.h) must be preserved. |
| 36 | 36 |
| 37 #define __ assembler-> | 37 #define __ assembler-> |
| 38 | 38 |
| 39 | 39 |
| 40 intptr_t Intrinsifier::ParameterSlotFromSp() { return 0; } | 40 intptr_t Intrinsifier::ParameterSlotFromSp() { return 0; } |
| 41 | 41 |
| 42 | 42 |
| 43 void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) { | 43 void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) { |
| 44 COMPILE_ASSERT(CALLEE_SAVED_TEMP != ARGS_DESC_REG); | |
| 45 | |
| 44 assembler->Comment("IntrinsicCallPrologue"); | 46 assembler->Comment("IntrinsicCallPrologue"); |
| 45 assembler->movl(CALLEE_SAVED_TEMP, ICREG); | 47 assembler->movl(CALLEE_SAVED_TEMP, ARGS_DESC_REG); |
|
Vyacheslav Egorov (Google)
2016/05/25 11:15:31
I wonder why this was preserved in the first place
rmacnak
2016/05/25 16:58:51
I suspect it was for something in the past. I prev
| |
| 46 assembler->movl(CALLEE_SAVED_TEMP2, ARGS_DESC_REG); | |
| 47 } | 48 } |
| 48 | 49 |
| 49 | 50 |
| 50 void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) { | 51 void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) { |
| 51 assembler->Comment("IntrinsicCallEpilogue"); | 52 assembler->Comment("IntrinsicCallEpilogue"); |
| 52 assembler->movl(ICREG, CALLEE_SAVED_TEMP); | 53 assembler->movl(ARGS_DESC_REG, CALLEE_SAVED_TEMP); |
| 53 assembler->movl(ARGS_DESC_REG, CALLEE_SAVED_TEMP2); | |
| 54 } | 54 } |
| 55 | 55 |
| 56 | 56 |
| 57 static intptr_t ComputeObjectArrayTypeArgumentsOffset() { | 57 static intptr_t ComputeObjectArrayTypeArgumentsOffset() { |
| 58 const Library& core_lib = Library::Handle(Library::CoreLibrary()); | 58 const Library& core_lib = Library::Handle(Library::CoreLibrary()); |
| 59 const Class& cls = Class::Handle( | 59 const Class& cls = Class::Handle( |
| 60 core_lib.LookupClassAllowPrivate(Symbols::_List())); | 60 core_lib.LookupClassAllowPrivate(Symbols::_List())); |
| 61 ASSERT(!cls.IsNull()); | 61 ASSERT(!cls.IsNull()); |
| 62 ASSERT(cls.NumTypeArguments() == 1); | 62 ASSERT(cls.NumTypeArguments() == 1); |
| 63 const intptr_t field_offset = cls.type_arguments_field_offset(); | 63 const intptr_t field_offset = cls.type_arguments_field_offset(); |
| (...skipping 2089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2153 __ Bind(&true_label); | 2153 __ Bind(&true_label); |
| 2154 __ LoadObject(EAX, Bool::True()); | 2154 __ LoadObject(EAX, Bool::True()); |
| 2155 __ ret(); | 2155 __ ret(); |
| 2156 } | 2156 } |
| 2157 | 2157 |
| 2158 #undef __ | 2158 #undef __ |
| 2159 | 2159 |
| 2160 } // namespace dart | 2160 } // namespace dart |
| 2161 | 2161 |
| 2162 #endif // defined TARGET_ARCH_IA32 | 2162 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |