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

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

Issue 19806005: Increases the number of ARM floating-point registers. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_arm_test.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" 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/simulator.h" 9 #include "vm/simulator.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 910
911 void Assembler::vstms(BlockAddressMode am, Register base, 911 void Assembler::vstms(BlockAddressMode am, Register base,
912 SRegister first, SRegister last, Condition cond) { 912 SRegister first, SRegister last, Condition cond) {
913 ASSERT((am == IA) || (am == IA_W) || (am == DB_W)); 913 ASSERT((am == IA) || (am == IA_W) || (am == DB_W));
914 ASSERT(last > first); 914 ASSERT(last > first);
915 EmitMultiVSMemOp(cond, am, false, base, first, last - first + 1); 915 EmitMultiVSMemOp(cond, am, false, base, first, last - first + 1);
916 } 916 }
917 917
918 918
919 void Assembler::vldmd(BlockAddressMode am, Register base, 919 void Assembler::vldmd(BlockAddressMode am, Register base,
920 DRegister first, DRegister last, Condition cond) { 920 DRegister first, intptr_t count, Condition cond) {
921 ASSERT((am == IA) || (am == IA_W) || (am == DB_W)); 921 ASSERT((am == IA) || (am == IA_W) || (am == DB_W));
922 ASSERT(last > first); 922 ASSERT(count <= 16);
923 EmitMultiVDMemOp(cond, am, true, base, first, last - first + 1); 923 ASSERT(first + count <= kNumberOfDRegisters);
924 EmitMultiVDMemOp(cond, am, true, base, first, count);
924 } 925 }
925 926
926 927
927 void Assembler::vstmd(BlockAddressMode am, Register base, 928 void Assembler::vstmd(BlockAddressMode am, Register base,
928 DRegister first, DRegister last, Condition cond) { 929 DRegister first, intptr_t count, Condition cond) {
929 ASSERT((am == IA) || (am == IA_W) || (am == DB_W)); 930 ASSERT((am == IA) || (am == IA_W) || (am == DB_W));
930 ASSERT(last > first); 931 ASSERT(count <= 16);
931 EmitMultiVDMemOp(cond, am, false, base, first, last - first + 1); 932 ASSERT(first + count <= kNumberOfDRegisters);
933 EmitMultiVDMemOp(cond, am, false, base, first, count);
932 } 934 }
933 935
934 936
935 void Assembler::EmitVFPsss(Condition cond, int32_t opcode, 937 void Assembler::EmitVFPsss(Condition cond, int32_t opcode,
936 SRegister sd, SRegister sn, SRegister sm) { 938 SRegister sd, SRegister sn, SRegister sm) {
937 ASSERT(sd != kNoSRegister); 939 ASSERT(sd != kNoSRegister);
938 ASSERT(sn != kNoSRegister); 940 ASSERT(sn != kNoSRegister);
939 ASSERT(sm != kNoSRegister); 941 ASSERT(sm != kNoSRegister);
940 ASSERT(cond != kNoCondition); 942 ASSERT(cond != kNoCondition);
941 int32_t encoding = (static_cast<int32_t>(cond) << kConditionShift) | 943 int32_t encoding = (static_cast<int32_t>(cond) << kConditionShift) |
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 } 2276 }
2275 2277
2276 2278
2277 void Assembler::EnterCallRuntimeFrame(intptr_t frame_space) { 2279 void Assembler::EnterCallRuntimeFrame(intptr_t frame_space) {
2278 // Preserve volatile CPU registers. 2280 // Preserve volatile CPU registers.
2279 EnterFrame(kDartVolatileCpuRegs | (1 << FP) | (1 << LR), 0); 2281 EnterFrame(kDartVolatileCpuRegs | (1 << FP) | (1 << LR), 0);
2280 2282
2281 // Preserve all volatile FPU registers. 2283 // Preserve all volatile FPU registers.
2282 DRegister firstv = EvenDRegisterOf(kDartFirstVolatileFpuReg); 2284 DRegister firstv = EvenDRegisterOf(kDartFirstVolatileFpuReg);
2283 DRegister lastv = OddDRegisterOf(kDartLastVolatileFpuReg); 2285 DRegister lastv = OddDRegisterOf(kDartLastVolatileFpuReg);
2284 vstmd(DB_W, SP, firstv, lastv); 2286 if ((lastv - firstv + 1) >= 16) {
2287 DRegister mid = static_cast<DRegister>(firstv + 16);
2288 vstmd(DB_W, SP, mid, lastv - mid + 1);
2289 vstmd(DB_W, SP, firstv, 16);
2290 } else {
2291 vstmd(DB_W, SP, firstv, lastv - firstv + 1);
2292 }
2285 2293
2286 ReserveAlignedFrameSpace(frame_space); 2294 ReserveAlignedFrameSpace(frame_space);
2287 } 2295 }
2288 2296
2289 2297
2290 void Assembler::LeaveCallRuntimeFrame() { 2298 void Assembler::LeaveCallRuntimeFrame() {
2291 // SP might have been modified to reserve space for arguments 2299 // SP might have been modified to reserve space for arguments
2292 // and ensure proper alignment of the stack frame. 2300 // and ensure proper alignment of the stack frame.
2293 // We need to restore it before restoring registers. 2301 // We need to restore it before restoring registers.
2294 const intptr_t kPushedRegistersSize = 2302 const intptr_t kPushedRegistersSize =
2295 kDartVolatileCpuRegCount * kWordSize + 2303 kDartVolatileCpuRegCount * kWordSize +
2296 kDartVolatileFpuRegCount * 2 * kWordSize; 2304 kDartVolatileFpuRegCount * 2 * kWordSize;
2297 AddImmediate(SP, FP, -kPushedRegistersSize); 2305 AddImmediate(SP, FP, -kPushedRegistersSize);
2298 2306
2299 // Restore all volatile FPU registers. 2307 // Restore all volatile FPU registers.
2300 DRegister firstv = EvenDRegisterOf(kDartFirstVolatileFpuReg); 2308 DRegister firstv = EvenDRegisterOf(kDartFirstVolatileFpuReg);
2301 DRegister lastv = OddDRegisterOf(kDartLastVolatileFpuReg); 2309 DRegister lastv = OddDRegisterOf(kDartLastVolatileFpuReg);
2302 vldmd(IA_W, SP, firstv, lastv); 2310 if ((lastv - firstv + 1) > 16) {
2311 DRegister mid = static_cast<DRegister>(firstv + 16);
2312 vldmd(IA_W, SP, firstv, 16);
2313 vldmd(IA_W, SP, mid, lastv - mid + 1);
2314 } else {
2315 vldmd(IA_W, SP, firstv, lastv - firstv + 1);
2316 }
2303 2317
2304 // Restore volatile CPU registers. 2318 // Restore volatile CPU registers.
2305 LeaveFrame(kDartVolatileCpuRegs | (1 << FP) | (1 << LR)); 2319 LeaveFrame(kDartVolatileCpuRegs | (1 << FP) | (1 << LR));
2306 } 2320 }
2307 2321
2308 2322
2309 void Assembler::CallRuntime(const RuntimeEntry& entry) { 2323 void Assembler::CallRuntime(const RuntimeEntry& entry) {
2310 entry.Call(this); 2324 entry.Call(this);
2311 } 2325 }
2312 2326
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
2522 2536
2523 const char* Assembler::FpuRegisterName(FpuRegister reg) { 2537 const char* Assembler::FpuRegisterName(FpuRegister reg) {
2524 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 2538 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
2525 return fpu_reg_names[reg]; 2539 return fpu_reg_names[reg];
2526 } 2540 }
2527 2541
2528 } // namespace dart 2542 } // namespace dart
2529 2543
2530 #endif // defined TARGET_ARCH_ARM 2544 #endif // defined TARGET_ARCH_ARM
2531 2545
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_arm_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698