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

Side by Side Diff: src/arm/assembler-arm.h

Issue 13560007: Remove ARM support for soft float (pre-VFP2) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 8 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 | src/arm/assembler-arm.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) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 class CpuFeatures : public AllStatic { 52 class CpuFeatures : public AllStatic {
53 public: 53 public:
54 // Detect features of the target CPU. Set safe defaults if the serializer 54 // Detect features of the target CPU. Set safe defaults if the serializer
55 // is enabled (snapshots must be portable). 55 // is enabled (snapshots must be portable).
56 static void Probe(); 56 static void Probe();
57 57
58 // Check whether a feature is supported by the target CPU. 58 // Check whether a feature is supported by the target CPU.
59 static bool IsSupported(CpuFeature f) { 59 static bool IsSupported(CpuFeature f) {
60 ASSERT(initialized_); 60 ASSERT(initialized_);
61 if (f == VFP3 && !FLAG_enable_vfp3) return false; 61 if (f == VFP3 && !FLAG_enable_vfp3) return false;
62 if (f == VFP2 && !FLAG_enable_vfp2) return false;
63 if (f == SUDIV && !FLAG_enable_sudiv) return false; 62 if (f == SUDIV && !FLAG_enable_sudiv) return false;
64 if (f == UNALIGNED_ACCESSES && !FLAG_enable_unaligned_accesses) { 63 if (f == UNALIGNED_ACCESSES && !FLAG_enable_unaligned_accesses) {
65 return false; 64 return false;
66 } 65 }
67 if (f == VFP32DREGS && !FLAG_enable_32dregs) return false; 66 if (f == VFP32DREGS && !FLAG_enable_32dregs) return false;
68 return (supported_ & (1u << f)) != 0; 67 return (supported_ & (1u << f)) != 0;
69 } 68 }
70 69
71 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) { 70 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) {
72 ASSERT(initialized_); 71 ASSERT(initialized_);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // to a few constants). If this is a problem, we could change the code 109 // to a few constants). If this is a problem, we could change the code
111 // such that we use an enum in optimized mode, and the struct in debug 110 // such that we use an enum in optimized mode, and the struct in debug
112 // mode. This way we get the compile-time error checking in debug mode 111 // mode. This way we get the compile-time error checking in debug mode
113 // and best performance in optimized code. 112 // and best performance in optimized code.
114 113
115 // Core register 114 // Core register
116 struct Register { 115 struct Register {
117 static const int kNumRegisters = 16; 116 static const int kNumRegisters = 16;
118 static const int kMaxNumAllocatableRegisters = 8; 117 static const int kMaxNumAllocatableRegisters = 8;
119 static const int kSizeInBytes = 4; 118 static const int kSizeInBytes = 4;
120 static const int kGPRsPerNonVFP2Double = 2;
121 119
122 inline static int NumAllocatableRegisters(); 120 inline static int NumAllocatableRegisters();
123 121
124 static int ToAllocationIndex(Register reg) { 122 static int ToAllocationIndex(Register reg) {
125 ASSERT(reg.code() < kMaxNumAllocatableRegisters); 123 ASSERT(reg.code() < kMaxNumAllocatableRegisters);
126 return reg.code(); 124 return reg.code();
127 } 125 }
128 126
129 static Register FromAllocationIndex(int index) { 127 static Register FromAllocationIndex(int index) {
130 ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); 128 ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters);
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 const DwVfpRegister d23 = { 23 }; 361 const DwVfpRegister d23 = { 23 };
364 const DwVfpRegister d24 = { 24 }; 362 const DwVfpRegister d24 = { 24 };
365 const DwVfpRegister d25 = { 25 }; 363 const DwVfpRegister d25 = { 25 };
366 const DwVfpRegister d26 = { 26 }; 364 const DwVfpRegister d26 = { 26 };
367 const DwVfpRegister d27 = { 27 }; 365 const DwVfpRegister d27 = { 27 };
368 const DwVfpRegister d28 = { 28 }; 366 const DwVfpRegister d28 = { 28 };
369 const DwVfpRegister d29 = { 29 }; 367 const DwVfpRegister d29 = { 29 };
370 const DwVfpRegister d30 = { 30 }; 368 const DwVfpRegister d30 = { 30 };
371 const DwVfpRegister d31 = { 31 }; 369 const DwVfpRegister d31 = { 31 };
372 370
373 const Register sfpd_lo = { kRegister_r6_Code };
374 const Register sfpd_hi = { kRegister_r7_Code };
375
376 // Aliases for double registers. Defined using #define instead of 371 // Aliases for double registers. Defined using #define instead of
377 // "static const DwVfpRegister&" because Clang complains otherwise when a 372 // "static const DwVfpRegister&" because Clang complains otherwise when a
378 // compilation unit that includes this header doesn't use the variables. 373 // compilation unit that includes this header doesn't use the variables.
379 #define kFirstCalleeSavedDoubleReg d8 374 #define kFirstCalleeSavedDoubleReg d8
380 #define kLastCalleeSavedDoubleReg d15 375 #define kLastCalleeSavedDoubleReg d15
381 #define kDoubleRegZero d14 376 #define kDoubleRegZero d14
382 #define kScratchDoubleReg d15 377 #define kScratchDoubleReg d15
383 378
384 379
385 // Coprocessor register 380 // Coprocessor register
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 public: 1438 public:
1444 explicit EnsureSpace(Assembler* assembler) { 1439 explicit EnsureSpace(Assembler* assembler) {
1445 assembler->CheckBuffer(); 1440 assembler->CheckBuffer();
1446 } 1441 }
1447 }; 1442 };
1448 1443
1449 1444
1450 } } // namespace v8::internal 1445 } } // namespace v8::internal
1451 1446
1452 #endif // V8_ARM_ASSEMBLER_ARM_H_ 1447 #endif // V8_ARM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698