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

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 | « no previous file | runtime/vm/constants_arm.h » ('j') | runtime/vm/intermediate_language_arm.cc » ('J')
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 902 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, DRegister last, 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(last > first);
923 ASSERT(last - first <= 16);
regis 2013/07/23 17:38:04 ASSERT((last - first + 1) <= 16);
zra 2013/07/23 18:24:14 Done.
923 EmitMultiVDMemOp(cond, am, true, base, first, last - first + 1); 924 EmitMultiVDMemOp(cond, am, true, base, first, last - first + 1);
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, DRegister last, 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(last > first);
932 ASSERT(last - first <= 16);
regis 2013/07/23 17:38:04 ditto
zra 2013/07/23 18:24:14 Done.
931 EmitMultiVDMemOp(cond, am, false, base, first, last - first + 1); 933 EmitMultiVDMemOp(cond, am, false, base, first, last - first + 1);
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);
(...skipping 1333 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 > 16) {
regis 2013/07/23 17:38:04 if ((lastv - firstv + 1) > 16) {
zra 2013/07/23 18:24:14 Done.
2287 ASSERT(kNumberOfDRegisters <= 32);
regis 2013/07/23 17:38:04 This assert seems overcautious. I wonder if we sh
zra 2013/07/23 18:24:14 I changed vstmd and vldrd to take a count instead
2288 DRegister mid1 = static_cast<DRegister>(firstv + 15);
2289 DRegister mid2 = static_cast<DRegister>(firstv + 16);
2290 vstmd(DB_W, SP, mid2, lastv);
2291 vstmd(DB_W, SP, firstv, mid1);
2292 } else {
2293 vstmd(DB_W, SP, firstv, lastv);
2294 }
2285 2295
2286 ReserveAlignedFrameSpace(frame_space); 2296 ReserveAlignedFrameSpace(frame_space);
2287 } 2297 }
2288 2298
2289 2299
2290 void Assembler::LeaveCallRuntimeFrame() { 2300 void Assembler::LeaveCallRuntimeFrame() {
2291 // SP might have been modified to reserve space for arguments 2301 // SP might have been modified to reserve space for arguments
2292 // and ensure proper alignment of the stack frame. 2302 // and ensure proper alignment of the stack frame.
2293 // We need to restore it before restoring registers. 2303 // We need to restore it before restoring registers.
2294 const intptr_t kPushedRegistersSize = 2304 const intptr_t kPushedRegistersSize =
2295 kDartVolatileCpuRegCount * kWordSize + 2305 kDartVolatileCpuRegCount * kWordSize +
2296 kDartVolatileFpuRegCount * 2 * kWordSize; 2306 kDartVolatileFpuRegCount * 2 * kWordSize;
2297 AddImmediate(SP, FP, -kPushedRegistersSize); 2307 AddImmediate(SP, FP, -kPushedRegistersSize);
2298 2308
2299 // Restore all volatile FPU registers. 2309 // Restore all volatile FPU registers.
2300 DRegister firstv = EvenDRegisterOf(kDartFirstVolatileFpuReg); 2310 DRegister firstv = EvenDRegisterOf(kDartFirstVolatileFpuReg);
2301 DRegister lastv = OddDRegisterOf(kDartLastVolatileFpuReg); 2311 DRegister lastv = OddDRegisterOf(kDartLastVolatileFpuReg);
2302 vldmd(IA_W, SP, firstv, lastv); 2312 if (lastv - firstv > 16) {
regis 2013/07/23 17:38:04 ditto
zra 2013/07/23 18:24:14 Done.
2313 ASSERT(kNumberOfDRegisters <= 32);
2314 DRegister mid1 = static_cast<DRegister>(firstv + 15);
2315 DRegister mid2 = static_cast<DRegister>(firstv + 16);
2316 vldmd(IA_W, SP, firstv, mid1);
2317 vldmd(IA_W, SP, mid2, lastv);
2318 } else {
2319 vldmd(IA_W, SP, firstv, lastv);
2320 }
2303 2321
2304 // Restore volatile CPU registers. 2322 // Restore volatile CPU registers.
2305 LeaveFrame(kDartVolatileCpuRegs | (1 << FP) | (1 << LR)); 2323 LeaveFrame(kDartVolatileCpuRegs | (1 << FP) | (1 << LR));
2306 } 2324 }
2307 2325
2308 2326
2309 void Assembler::CallRuntime(const RuntimeEntry& entry) { 2327 void Assembler::CallRuntime(const RuntimeEntry& entry) {
2310 entry.Call(this); 2328 entry.Call(this);
2311 } 2329 }
2312 2330
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
2522 2540
2523 const char* Assembler::FpuRegisterName(FpuRegister reg) { 2541 const char* Assembler::FpuRegisterName(FpuRegister reg) {
2524 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 2542 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
2525 return fpu_reg_names[reg]; 2543 return fpu_reg_names[reg];
2526 } 2544 }
2527 2545
2528 } // namespace dart 2546 } // namespace dart
2529 2547
2530 #endif // defined TARGET_ARCH_ARM 2548 #endif // defined TARGET_ARCH_ARM
2531 2549
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/constants_arm.h » ('j') | runtime/vm/intermediate_language_arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698