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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 } | 135 } |
136 | 136 |
137 | 137 |
138 inline Register Register::FromAllocationIndex(int index) { | 138 inline Register Register::FromAllocationIndex(int index) { |
139 ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); | 139 ASSERT(index >= 0 && index < kMaxNumAllocatableRegisters); |
140 return (index >= 4) ? from_code(index + 2) : from_code(index); | 140 return (index >= 4) ? from_code(index + 2) : from_code(index); |
141 } | 141 } |
142 | 142 |
143 | 143 |
144 struct IntelDoubleRegister { | 144 struct IntelDoubleRegister { |
| 145 static const int kMaxNumRegisters = 8; |
145 static const int kMaxNumAllocatableRegisters = 7; | 146 static const int kMaxNumAllocatableRegisters = 7; |
146 static int NumAllocatableRegisters(); | 147 static int NumAllocatableRegisters(); |
147 static int NumRegisters(); | 148 static int NumRegisters(); |
148 static const char* AllocationIndexToString(int index); | 149 static const char* AllocationIndexToString(int index); |
149 | 150 |
150 static int ToAllocationIndex(IntelDoubleRegister reg) { | 151 static int ToAllocationIndex(IntelDoubleRegister reg) { |
151 ASSERT(reg.code() != 0); | 152 ASSERT(reg.code() != 0); |
152 return reg.code() - 1; | 153 return reg.code() - 1; |
153 } | 154 } |
154 | 155 |
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1271 private: | 1272 private: |
1272 Assembler* assembler_; | 1273 Assembler* assembler_; |
1273 #ifdef DEBUG | 1274 #ifdef DEBUG |
1274 int space_before_; | 1275 int space_before_; |
1275 #endif | 1276 #endif |
1276 }; | 1277 }; |
1277 | 1278 |
1278 } } // namespace v8::internal | 1279 } } // namespace v8::internal |
1279 | 1280 |
1280 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1281 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
OLD | NEW |