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

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

Issue 1434323003: ARM: Don't generate memory instructions with writeback where the data and address registers are the… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/simulator_arm.cc ('k') | no next file » | 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 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 430
431 // Push registers in their enumeration order: lowest register number at 431 // Push registers in their enumeration order: lowest register number at
432 // lowest address. 432 // lowest address.
433 for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; --i) { 433 for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; --i) {
434 if (i == CODE_REG) { 434 if (i == CODE_REG) {
435 // Save the original value of CODE_REG pushed before invoking this stub 435 // Save the original value of CODE_REG pushed before invoking this stub
436 // instead of the value used to call this stub. 436 // instead of the value used to call this stub.
437 COMPILE_ASSERT(IP > CODE_REG); // Assert IP is pushed first. 437 COMPILE_ASSERT(IP > CODE_REG); // Assert IP is pushed first.
438 __ ldr(IP, Address(FP, kCallerSpSlotFromFp * kWordSize)); 438 __ ldr(IP, Address(FP, kCallerSpSlotFromFp * kWordSize));
439 __ Push(IP); 439 __ Push(IP);
440 } else if (i == SP) {
441 // Push(SP) has unpredictable behavior.
442 __ mov(IP, Operand(SP));
zra 2015/11/12 20:37:48 Does this clobber IP before it has been saved? Doe
rmacnak 2015/11/12 21:15:52 Hm, this does clobber IP before it has been saved.
Florian Schneider 2015/11/13 09:04:06 IP holds the live value of LR at entry where they
rmacnak 2015/11/13 20:09:12 Removing the assert for the CODE case.
443 __ Push(IP);
440 } else { 444 } else {
441 __ Push(static_cast<Register>(i)); 445 __ Push(static_cast<Register>(i));
442 } 446 }
443 } 447 }
444 448
445 if (TargetCPUFeatures::vfp_supported()) { 449 if (TargetCPUFeatures::vfp_supported()) {
446 ASSERT(kFpuRegisterSize == 4 * kWordSize); 450 ASSERT(kFpuRegisterSize == 4 * kWordSize);
447 if (kNumberOfDRegisters > 16) { 451 if (kNumberOfDRegisters > 16) {
448 __ vstmd(DB_W, SP, D16, kNumberOfDRegisters - 16); 452 __ vstmd(DB_W, SP, D16, kNumberOfDRegisters - 16);
449 __ vstmd(DB_W, SP, D0, 16); 453 __ vstmd(DB_W, SP, D0, 16);
(...skipping 1685 matching lines...) Expand 10 before | Expand all | Expand 10 after
2135 __ Bind(&miss); 2139 __ Bind(&miss);
2136 __ LoadIsolate(R2); 2140 __ LoadIsolate(R2);
2137 __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset())); 2141 __ ldr(CODE_REG, Address(R2, Isolate::ic_miss_code_offset()));
2138 __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset())); 2142 __ ldr(R1, FieldAddress(CODE_REG, Code::entry_point_offset()));
2139 __ Ret(); 2143 __ Ret();
2140 } 2144 }
2141 2145
2142 } // namespace dart 2146 } // namespace dart
2143 2147
2144 #endif // defined TARGET_ARCH_ARM 2148 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/simulator_arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698