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

Side by Side Diff: runtime/vm/intrinsifier_mips.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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 15 matching lines...) Expand all
26 // The FP register should not be modified, because it is used by the profiler. 26 // The FP register should not be modified, because it is used by the profiler.
27 // The PP and THR registers (see constants_mips.h) must be preserved. 27 // The PP and THR registers (see constants_mips.h) must be preserved.
28 28
29 #define __ assembler-> 29 #define __ assembler->
30 30
31 31
32 intptr_t Intrinsifier::ParameterSlotFromSp() { return -1; } 32 intptr_t Intrinsifier::ParameterSlotFromSp() { return -1; }
33 33
34 34
35 void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) { 35 void Intrinsifier::IntrinsicCallPrologue(Assembler* assembler) {
36 COMPILE_ASSERT((1 << CODE_REG) & kAbiPreservedCpuRegs);
37 COMPILE_ASSERT((1 << ARGS_DESC_REG) & kAbiPreservedCpuRegs);
38 COMPILE_ASSERT((1 << CALLEE_SAVED_TEMP) & kAbiPreservedCpuRegs);
39 COMPILE_ASSERT(CALLEE_SAVED_TEMP != CODE_REG);
40 COMPILE_ASSERT(CALLEE_SAVED_TEMP != ARGS_DESC_REG);
41
36 assembler->Comment("IntrinsicCallPrologue"); 42 assembler->Comment("IntrinsicCallPrologue");
37 assembler->mov(CALLEE_SAVED_TEMP, RA); 43 assembler->mov(CALLEE_SAVED_TEMP, RA);
Vyacheslav Egorov (Google) 2016/05/25 11:15:31 RA -> LRREG
rmacnak 2016/05/25 16:58:51 Done.
38 } 44 }
39 45
40 46
41 void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) { 47 void Intrinsifier::IntrinsicCallEpilogue(Assembler* assembler) {
42 assembler->Comment("IntrinsicCallEpilogue"); 48 assembler->Comment("IntrinsicCallEpilogue");
43 assembler->mov(RA, CALLEE_SAVED_TEMP); 49 assembler->mov(RA, CALLEE_SAVED_TEMP);
44 } 50 }
45 51
46 52
47 // Intrinsify only for Smi value and index. Non-smi values need a store buffer 53 // Intrinsify only for Smi value and index. Non-smi values need a store buffer
(...skipping 2174 matching lines...) Expand 10 before | Expand all | Expand 10 after
2222 __ lw(T0, Address(V0, TimelineStream::enabled_offset())); 2228 __ lw(T0, Address(V0, TimelineStream::enabled_offset()));
2223 __ LoadObject(V0, Bool::True()); 2229 __ LoadObject(V0, Bool::True());
2224 __ LoadObject(V1, Bool::False()); 2230 __ LoadObject(V1, Bool::False());
2225 __ Ret(); 2231 __ Ret();
2226 __ delay_slot()->movz(V0, V1, T0); // V0 = (T0 == 0) ? V1 : V0. 2232 __ delay_slot()->movz(V0, V1, T0); // V0 = (T0 == 0) ? V1 : V0.
2227 } 2233 }
2228 2234
2229 } // namespace dart 2235 } // namespace dart
2230 2236
2231 #endif // defined TARGET_ARCH_MIPS 2237 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698