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 inline Register Register::FromAllocationIndex(int index) { | 135 inline Register Register::FromAllocationIndex(int index) { |
136 ASSERT(index >= 0 && index < kNumAllocatableRegisters); | 136 ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
137 return (index >= 4) ? from_code(index + 2) : from_code(index); | 137 return (index >= 4) ? from_code(index + 2) : from_code(index); |
138 } | 138 } |
139 | 139 |
140 | 140 |
141 struct XMMRegister { | 141 struct XMMRegister { |
142 static const int kNumAllocatableRegisters = 7; | 142 static const int kNumAllocatableRegisters = 7; |
143 static const int kNumRegisters = 8; | 143 static const int kNumRegisters = 8; |
144 | 144 |
| 145 static int NumAllocatableRegisters() { return kNumAllocatableRegisters; } |
| 146 |
145 static int ToAllocationIndex(XMMRegister reg) { | 147 static int ToAllocationIndex(XMMRegister reg) { |
146 ASSERT(reg.code() != 0); | 148 ASSERT(reg.code() != 0); |
147 return reg.code() - 1; | 149 return reg.code() - 1; |
148 } | 150 } |
149 | 151 |
150 static XMMRegister FromAllocationIndex(int index) { | 152 static XMMRegister FromAllocationIndex(int index) { |
151 ASSERT(index >= 0 && index < kNumAllocatableRegisters); | 153 ASSERT(index >= 0 && index < kNumAllocatableRegisters); |
152 return from_code(index + 1); | 154 return from_code(index + 1); |
153 } | 155 } |
154 | 156 |
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 private: | 1209 private: |
1208 Assembler* assembler_; | 1210 Assembler* assembler_; |
1209 #ifdef DEBUG | 1211 #ifdef DEBUG |
1210 int space_before_; | 1212 int space_before_; |
1211 #endif | 1213 #endif |
1212 }; | 1214 }; |
1213 | 1215 |
1214 } } // namespace v8::internal | 1216 } } // namespace v8::internal |
1215 | 1217 |
1216 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 1218 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
OLD | NEW |