OLD | NEW |
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // mode. This way we get the compile-time error checking in debug mode | 68 // mode. This way we get the compile-time error checking in debug mode |
69 // and best performance in optimized code. | 69 // and best performance in optimized code. |
70 | 70 |
71 | 71 |
72 // ----------------------------------------------------------------------------- | 72 // ----------------------------------------------------------------------------- |
73 // Implementation of Register and FPURegister. | 73 // Implementation of Register and FPURegister. |
74 | 74 |
75 // Core register. | 75 // Core register. |
76 struct Register { | 76 struct Register { |
77 static const int kNumRegisters = v8::internal::kNumRegisters; | 77 static const int kNumRegisters = v8::internal::kNumRegisters; |
78 static const int kMaxNumAllocatableRegisters = 14; // v0 through t6 and cp. | 78 static const int kMaxNumAllocatableRegisters = 14; // v0 through t2 and cp. |
79 static const int kSizeInBytes = 8; | 79 static const int kSizeInBytes = 8; |
80 static const int kCpRegister = 23; // cp (s7) is the 23rd register. | 80 static const int kCpRegister = 23; // cp (s7) is the 23rd register. |
81 | 81 |
82 inline static int NumAllocatableRegisters(); | 82 inline static int NumAllocatableRegisters(); |
83 | 83 |
84 static int ToAllocationIndex(Register reg) { | 84 static int ToAllocationIndex(Register reg) { |
85 DCHECK((reg.code() - 2) < (kMaxNumAllocatableRegisters - 1) || | 85 DCHECK((reg.code() - 2) < (kMaxNumAllocatableRegisters - 1) || |
86 reg.is(from_code(kCpRegister))); | 86 reg.is(from_code(kCpRegister))); |
87 return reg.is(from_code(kCpRegister)) ? | 87 return reg.is(from_code(kCpRegister)) ? |
88 kMaxNumAllocatableRegisters - 1 : // Return last index for 'cp'. | 88 kMaxNumAllocatableRegisters - 1 : // Return last index for 'cp'. |
(...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1492 class EnsureSpace BASE_EMBEDDED { | 1492 class EnsureSpace BASE_EMBEDDED { |
1493 public: | 1493 public: |
1494 explicit EnsureSpace(Assembler* assembler) { | 1494 explicit EnsureSpace(Assembler* assembler) { |
1495 assembler->CheckBuffer(); | 1495 assembler->CheckBuffer(); |
1496 } | 1496 } |
1497 }; | 1497 }; |
1498 | 1498 |
1499 } } // namespace v8::internal | 1499 } } // namespace v8::internal |
1500 | 1500 |
1501 #endif // V8_ARM_ASSEMBLER_MIPS_H_ | 1501 #endif // V8_ARM_ASSEMBLER_MIPS_H_ |
OLD | NEW |