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

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

Issue 14113011: MIPS: Remove soft-float support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « src/flag-definitions.h ('k') | src/mips/assembler-mips.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 are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 68
69 // ----------------------------------------------------------------------------- 69 // -----------------------------------------------------------------------------
70 // Implementation of Register and FPURegister. 70 // Implementation of Register and FPURegister.
71 71
72 // Core register. 72 // Core register.
73 struct Register { 73 struct Register {
74 static const int kNumRegisters = v8::internal::kNumRegisters; 74 static const int kNumRegisters = v8::internal::kNumRegisters;
75 static const int kMaxNumAllocatableRegisters = 14; // v0 through t7. 75 static const int kMaxNumAllocatableRegisters = 14; // v0 through t7.
76 static const int kSizeInBytes = 4; 76 static const int kSizeInBytes = 4;
77 static const int kGPRsPerNonFPUDouble = 2;
78 77
79 inline static int NumAllocatableRegisters(); 78 inline static int NumAllocatableRegisters();
80 79
81 static int ToAllocationIndex(Register reg) { 80 static int ToAllocationIndex(Register reg) {
82 return reg.code() - 2; // zero_reg and 'at' are skipped. 81 return reg.code() - 2; // zero_reg and 'at' are skipped.
83 } 82 }
84 83
85 static Register FromAllocationIndex(int index) { 84 static Register FromAllocationIndex(int index) {
86 ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); 85 ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters);
87 return from_code(index + 2); // zero_reg and 'at' are skipped. 86 return from_code(index + 2); // zero_reg and 'at' are skipped.
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 const FPURegister f23 = { 23 }; 292 const FPURegister f23 = { 23 };
294 const FPURegister f24 = { 24 }; 293 const FPURegister f24 = { 24 };
295 const FPURegister f25 = { 25 }; 294 const FPURegister f25 = { 25 };
296 const FPURegister f26 = { 26 }; 295 const FPURegister f26 = { 26 };
297 const FPURegister f27 = { 27 }; 296 const FPURegister f27 = { 27 };
298 const FPURegister f28 = { 28 }; 297 const FPURegister f28 = { 28 };
299 const FPURegister f29 = { 29 }; 298 const FPURegister f29 = { 29 };
300 const FPURegister f30 = { 30 }; 299 const FPURegister f30 = { 30 };
301 const FPURegister f31 = { 31 }; 300 const FPURegister f31 = { 31 };
302 301
303 const Register sfpd_lo = { kRegister_t6_Code };
304 const Register sfpd_hi = { kRegister_t7_Code };
305
306 // Register aliases. 302 // Register aliases.
307 // cp is assumed to be a callee saved register. 303 // cp is assumed to be a callee saved register.
308 // Defined using #define instead of "static const Register&" because Clang 304 // Defined using #define instead of "static const Register&" because Clang
309 // complains otherwise when a compilation unit that includes this header 305 // complains otherwise when a compilation unit that includes this header
310 // doesn't use the variables. 306 // doesn't use the variables.
311 #define kRootRegister s6 307 #define kRootRegister s6
312 #define cp s7 308 #define cp s7
313 #define kLithiumScratchReg s3 309 #define kLithiumScratchReg s3
314 #define kLithiumScratchReg2 s4 310 #define kLithiumScratchReg2 s4
315 #define kLithiumScratchDouble f30 311 #define kLithiumScratchDouble f30
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 // Supported features must be enabled by a CpuFeatureScope before use. 392 // Supported features must be enabled by a CpuFeatureScope before use.
397 class CpuFeatures : public AllStatic { 393 class CpuFeatures : public AllStatic {
398 public: 394 public:
399 // Detect features of the target CPU. Set safe defaults if the serializer 395 // Detect features of the target CPU. Set safe defaults if the serializer
400 // is enabled (snapshots must be portable). 396 // is enabled (snapshots must be portable).
401 static void Probe(); 397 static void Probe();
402 398
403 // Check whether a feature is supported by the target CPU. 399 // Check whether a feature is supported by the target CPU.
404 static bool IsSupported(CpuFeature f) { 400 static bool IsSupported(CpuFeature f) {
405 ASSERT(initialized_); 401 ASSERT(initialized_);
406 if (f == FPU && !FLAG_enable_fpu) return false;
407 return (supported_ & (1u << f)) != 0; 402 return (supported_ & (1u << f)) != 0;
408 } 403 }
409 404
410 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) { 405 static bool IsFoundByRuntimeProbingOnly(CpuFeature f) {
411 ASSERT(initialized_); 406 ASSERT(initialized_);
412 return (found_by_runtime_probing_only_ & 407 return (found_by_runtime_probing_only_ &
413 (static_cast<uint64_t>(1) << f)) != 0; 408 (static_cast<uint64_t>(1) << f)) != 0;
414 } 409 }
415 410
416 static bool IsSafeForSnapshot(CpuFeature f) { 411 static bool IsSafeForSnapshot(CpuFeature f) {
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 class EnsureSpace BASE_EMBEDDED { 1204 class EnsureSpace BASE_EMBEDDED {
1210 public: 1205 public:
1211 explicit EnsureSpace(Assembler* assembler) { 1206 explicit EnsureSpace(Assembler* assembler) {
1212 assembler->CheckBuffer(); 1207 assembler->CheckBuffer();
1213 } 1208 }
1214 }; 1209 };
1215 1210
1216 } } // namespace v8::internal 1211 } } // namespace v8::internal
1217 1212
1218 #endif // V8_ARM_ASSEMBLER_MIPS_H_ 1213 #endif // V8_ARM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/mips/assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698