Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Side by Side Diff: runtime/vm/intrinsifier_ia32.cc

Issue 2003403003: ARM/ARM64: Fix smashed CODE_REG in intrinsics with InvokeMathCFunctionInstrs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
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
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
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698