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

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

Issue 1433243003: Background compilation work: (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: d 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 | « no previous file | runtime/vm/assembler_arm64.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 #include "vm/globals.h" // NOLINT 5 #include "vm/globals.h" // NOLINT
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/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 } else { 1509 } else {
1510 LoadImmediate(rd, offset_hi, cond); 1510 LoadImmediate(rd, offset_hi, cond);
1511 add(rd, pp, Operand(rd), cond); 1511 add(rd, pp, Operand(rd), cond);
1512 } 1512 }
1513 ldr(rd, Address(rd, offset_lo), cond); 1513 ldr(rd, Address(rd, offset_lo), cond);
1514 } 1514 }
1515 } 1515 }
1516 1516
1517 void Assembler::CheckCodePointer() { 1517 void Assembler::CheckCodePointer() {
1518 #ifdef DEBUG 1518 #ifdef DEBUG
1519 Comment("CheckCodePointer");
1519 Label cid_ok, instructions_ok; 1520 Label cid_ok, instructions_ok;
1520 Push(R0); 1521 Push(R0);
1521 Push(IP); 1522 Push(IP);
1522 CompareClassId(CODE_REG, kCodeCid, R0); 1523 CompareClassId(CODE_REG, kCodeCid, R0);
1523 b(&cid_ok, EQ); 1524 b(&cid_ok, EQ);
1524 bkpt(0); 1525 bkpt(0);
1525 Bind(&cid_ok); 1526 Bind(&cid_ok);
1526 1527
1527 const intptr_t offset = CodeSize() + Instr::kPCReadOffset + 1528 const intptr_t offset = CodeSize() + Instr::kPCReadOffset +
1528 Instructions::HeaderSize() - kHeapObjectTag; 1529 Instructions::HeaderSize() - kHeapObjectTag;
(...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after
3245 // Reserve space for arguments and align frame before entering 3246 // Reserve space for arguments and align frame before entering
3246 // the C++ world. 3247 // the C++ world.
3247 AddImmediate(SP, -frame_space); 3248 AddImmediate(SP, -frame_space);
3248 if (OS::ActivationFrameAlignment() > 1) { 3249 if (OS::ActivationFrameAlignment() > 1) {
3249 bic(SP, SP, Operand(OS::ActivationFrameAlignment() - 1)); 3250 bic(SP, SP, Operand(OS::ActivationFrameAlignment() - 1));
3250 } 3251 }
3251 } 3252 }
3252 3253
3253 3254
3254 void Assembler::EnterCallRuntimeFrame(intptr_t frame_space) { 3255 void Assembler::EnterCallRuntimeFrame(intptr_t frame_space) {
3256 Comment("EnterCallRuntimeFrame");
3255 // Preserve volatile CPU registers and PP. 3257 // Preserve volatile CPU registers and PP.
3256 EnterFrame(kDartVolatileCpuRegs | (1 << PP) | (1 << FP), 0); 3258 EnterFrame(kDartVolatileCpuRegs | (1 << PP) | (1 << FP), 0);
3257 COMPILE_ASSERT((kDartVolatileCpuRegs & (1 << PP)) == 0); 3259 COMPILE_ASSERT((kDartVolatileCpuRegs & (1 << PP)) == 0);
3258 3260
3259 // Preserve all volatile FPU registers. 3261 // Preserve all volatile FPU registers.
3260 if (TargetCPUFeatures::vfp_supported()) { 3262 if (TargetCPUFeatures::vfp_supported()) {
3261 DRegister firstv = EvenDRegisterOf(kDartFirstVolatileFpuReg); 3263 DRegister firstv = EvenDRegisterOf(kDartFirstVolatileFpuReg);
3262 DRegister lastv = OddDRegisterOf(kDartLastVolatileFpuReg); 3264 DRegister lastv = OddDRegisterOf(kDartLastVolatileFpuReg);
3263 if ((lastv - firstv + 1) >= 16) { 3265 if ((lastv - firstv + 1) >= 16) {
3264 DRegister mid = static_cast<DRegister>(firstv + 16); 3266 DRegister mid = static_cast<DRegister>(firstv + 16);
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
3652 3654
3653 3655
3654 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3656 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3655 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 3657 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
3656 return fpu_reg_names[reg]; 3658 return fpu_reg_names[reg];
3657 } 3659 }
3658 3660
3659 } // namespace dart 3661 } // namespace dart
3660 3662
3661 #endif // defined TARGET_ARCH_ARM 3663 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698