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

Side by Side Diff: runtime/vm/intrinsifier_arm.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
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 #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"
(...skipping 16 matching lines...) Expand all
27 // 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.
28 // 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.
29 29
30 #define __ assembler-> 30 #define __ assembler->
31 31
32 32
33 intptr_t Intrinsifier::ParameterSlotFromSp() { return -1; } 33 intptr_t Intrinsifier::ParameterSlotFromSp() { return -1; }
34 34
35 35
36 void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) { 36 void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) {
37 COMPILE_ASSERT((1 << CODE_REG) & kAbiPreservedCpuRegs);
Vyacheslav Egorov (Google) 2016/05/25 11:15:31 (...) != 0 our style does not allow implicit inte
rmacnak 2016/05/25 16:58:51 Factored out as IsABIPreservedRegister.
38 COMPILE_ASSERT((1 << ARGS_DESC_REG) & kAbiPreservedCpuRegs);
39 COMPILE_ASSERT((1 << CALLEE_SAVED_TEMP) & kAbiPreservedCpuRegs);
40 COMPILE_ASSERT(CALLEE_SAVED_TEMP != CODE_REG);
41 COMPILE_ASSERT(CALLEE_SAVED_TEMP != ARGS_DESC_REG);
42
37 // Save LR by moving it to a callee saved temporary register. 43 // Save LR by moving it to a callee saved temporary register.
38 assembler->Comment("IntrinsicCallPrologue"); 44 assembler->Comment("IntrinsicCallPrologue");
39 assembler->mov(CALLEE_SAVED_TEMP, Operand(LR)); 45 assembler->mov(CALLEE_SAVED_TEMP, Operand(LR));
40 } 46 }
41 47
42 48
43 void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) { 49 void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) {
44 // Restore LR. 50 // Restore LR.
45 assembler->Comment("IntrinsicCallEpilogue"); 51 assembler->Comment("IntrinsicCallEpilogue");
46 assembler->mov(LR, Operand(CALLEE_SAVED_TEMP)); 52 assembler->mov(LR, Operand(CALLEE_SAVED_TEMP));
(...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after
2118 __ ldr(R0, Address(R0, TimelineStream::enabled_offset())); 2124 __ ldr(R0, Address(R0, TimelineStream::enabled_offset()));
2119 __ cmp(R0, Operand(0)); 2125 __ cmp(R0, Operand(0));
2120 __ LoadObject(R0, Bool::True(), NE); 2126 __ LoadObject(R0, Bool::True(), NE);
2121 __ LoadObject(R0, Bool::False(), EQ); 2127 __ LoadObject(R0, Bool::False(), EQ);
2122 __ Ret(); 2128 __ Ret();
2123 } 2129 }
2124 2130
2125 } // namespace dart 2131 } // namespace dart
2126 2132
2127 #endif // defined TARGET_ARCH_ARM 2133 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698