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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 } | 141 } |
142 | 142 |
143 | 143 |
144 struct XMMRegister { | 144 struct XMMRegister { |
145 static const int kMaxNumAllocatableRegisters = 7; | 145 static const int kMaxNumAllocatableRegisters = 7; |
146 static const int kMaxNumRegisters = 8; | 146 static const int kMaxNumRegisters = 8; |
147 static int NumAllocatableRegisters() { | 147 static int NumAllocatableRegisters() { |
148 return kMaxNumAllocatableRegisters; | 148 return kMaxNumAllocatableRegisters; |
149 } | 149 } |
150 | 150 |
| 151 // TODO(turbofan): Proper support for float32. |
| 152 static int NumAllocatableAliasedRegisters() { |
| 153 return NumAllocatableRegisters(); |
| 154 } |
| 155 |
151 static int ToAllocationIndex(XMMRegister reg) { | 156 static int ToAllocationIndex(XMMRegister reg) { |
152 DCHECK(reg.code() != 0); | 157 DCHECK(reg.code() != 0); |
153 return reg.code() - 1; | 158 return reg.code() - 1; |
154 } | 159 } |
155 | 160 |
156 static XMMRegister FromAllocationIndex(int index) { | 161 static XMMRegister FromAllocationIndex(int index) { |
157 DCHECK(index >= 0 && index < kMaxNumAllocatableRegisters); | 162 DCHECK(index >= 0 && index < kMaxNumAllocatableRegisters); |
158 return from_code(index + 1); | 163 return from_code(index + 1); |
159 } | 164 } |
160 | 165 |
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 private: | 1191 private: |
1187 Assembler* assembler_; | 1192 Assembler* assembler_; |
1188 #ifdef DEBUG | 1193 #ifdef DEBUG |
1189 int space_before_; | 1194 int space_before_; |
1190 #endif | 1195 #endif |
1191 }; | 1196 }; |
1192 | 1197 |
1193 } } // namespace v8::internal | 1198 } } // namespace v8::internal |
1194 | 1199 |
1195 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1200 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
OLD | NEW |