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

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

Issue 1277883002: VM: Move calling convention-dependent code out of cc tests. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: More clean up Created 5 years, 4 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 | « no previous file | runtime/vm/assembler_arm64.h » ('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 3346 matching lines...) Expand 10 before | Expand all | Expand 10 after
3357 str(IP, Address(FP, kPcMarkerSlotFromFp * kWordSize)); 3357 str(IP, Address(FP, kPcMarkerSlotFromFp * kWordSize));
3358 3358
3359 // Setup pool pointer for this dart function. 3359 // Setup pool pointer for this dart function.
3360 LoadPoolPointer(); 3360 LoadPoolPointer();
3361 3361
3362 AddImmediate(SP, -extra_size); 3362 AddImmediate(SP, -extra_size);
3363 } 3363 }
3364 3364
3365 3365
3366 void Assembler::LeaveDartFrame() { 3366 void Assembler::LeaveDartFrame() {
3367 // LeaveDartFrame is called from stubs (pp disallowed) and from Dart code (pp
3368 // allowed), so there is no point in checking the current value of
3369 // constant_pool_allowed().
3370 set_constant_pool_allowed(false); 3367 set_constant_pool_allowed(false);
3371 LeaveFrame((1 << PP) | (1 << FP) | (1 << LR)); 3368 LeaveFrame((1 << PP) | (1 << FP) | (1 << LR));
3372 // Adjust SP for PC pushed in EnterDartFrame. 3369 // Adjust SP for PC pushed in EnterDartFrame.
3373 AddImmediate(SP, kWordSize); 3370 AddImmediate(SP, kWordSize);
3374 } 3371 }
3375 3372
3376 3373
3377 void Assembler::EnterStubFrame() { 3374 void Assembler::EnterStubFrame() {
3378 set_constant_pool_allowed(false); 3375 set_constant_pool_allowed(false);
3379 // Push 0 as saved PC for stub frames. 3376 // Push 0 as saved PC for stub frames.
3380 mov(IP, Operand(LR)); 3377 mov(IP, Operand(LR));
3381 mov(LR, Operand(0)); 3378 mov(LR, Operand(0));
3382 RegList regs = (1 << PP) | (1 << FP) | (1 << IP) | (1 << LR); 3379 RegList regs = (1 << PP) | (1 << FP) | (1 << IP) | (1 << LR);
3383 EnterFrame(regs, 0); 3380 EnterFrame(regs, 0);
3384 // Setup pool pointer for this stub. 3381 // Setup pool pointer for this stub.
3385 LoadPoolPointer(); 3382 LoadPoolPointer();
3386 } 3383 }
3387 3384
3388 3385
3389 void Assembler::LeaveStubFrame() { 3386 void Assembler::LeaveStubFrame() {
3390 LeaveFrame((1 << PP) | (1 << FP) | (1 << LR)); 3387 LeaveDartFrame();
3391 set_constant_pool_allowed(false);
3392 // Adjust SP for null PC pushed in EnterStubFrame.
3393 AddImmediate(SP, kWordSize);
3394 } 3388 }
3395 3389
3396 3390
3397 void Assembler::LoadAllocationStatsAddress(Register dest, 3391 void Assembler::LoadAllocationStatsAddress(Register dest,
3398 intptr_t cid, 3392 intptr_t cid,
3399 bool inline_isolate) { 3393 bool inline_isolate) {
3400 ASSERT(dest != kNoRegister); 3394 ASSERT(dest != kNoRegister);
3401 ASSERT(dest != TMP); 3395 ASSERT(dest != TMP);
3402 ASSERT(cid > 0); 3396 ASSERT(cid > 0);
3403 const intptr_t class_offset = ClassTable::ClassOffsetFor(cid); 3397 const intptr_t class_offset = ClassTable::ClassOffsetFor(cid);
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
3678 3672
3679 3673
3680 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3674 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3681 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 3675 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
3682 return fpu_reg_names[reg]; 3676 return fpu_reg_names[reg];
3683 } 3677 }
3684 3678
3685 } // namespace dart 3679 } // namespace dart
3686 3680
3687 #endif // defined TARGET_ARCH_ARM 3681 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698