| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 extern MMXRegister mm15; | 153 extern MMXRegister mm15; |
| 154 | 154 |
| 155 | 155 |
| 156 struct XMMRegister { | 156 struct XMMRegister { |
| 157 bool is_valid() const { return 0 <= code_ && code_ < 16; } | 157 bool is_valid() const { return 0 <= code_ && code_ < 16; } |
| 158 int code() const { | 158 int code() const { |
| 159 ASSERT(is_valid()); | 159 ASSERT(is_valid()); |
| 160 return code_; | 160 return code_; |
| 161 } | 161 } |
| 162 | 162 |
| 163 // Return the high bit of the register code as a 0 or 1. Used often |
| 164 // when constructing the REX prefix byte. |
| 165 int high_bit() const { |
| 166 return code_ >> 3; |
| 167 } |
| 168 // Return the 3 low bits of the register code. Used when encoding registers |
| 169 // in modR/M, SIB, and opcode bytes. |
| 170 int low_bits() const { |
| 171 return code_ & 0x7; |
| 172 } |
| 173 |
| 163 int code_; | 174 int code_; |
| 164 }; | 175 }; |
| 165 | 176 |
| 166 extern XMMRegister xmm0; | 177 extern XMMRegister xmm0; |
| 167 extern XMMRegister xmm1; | 178 extern XMMRegister xmm1; |
| 168 extern XMMRegister xmm2; | 179 extern XMMRegister xmm2; |
| 169 extern XMMRegister xmm3; | 180 extern XMMRegister xmm3; |
| 170 extern XMMRegister xmm4; | 181 extern XMMRegister xmm4; |
| 171 extern XMMRegister xmm5; | 182 extern XMMRegister xmm5; |
| 172 extern XMMRegister xmm6; | 183 extern XMMRegister xmm6; |
| (...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 private: | 1169 private: |
| 1159 Assembler* assembler_; | 1170 Assembler* assembler_; |
| 1160 #ifdef DEBUG | 1171 #ifdef DEBUG |
| 1161 int space_before_; | 1172 int space_before_; |
| 1162 #endif | 1173 #endif |
| 1163 }; | 1174 }; |
| 1164 | 1175 |
| 1165 } } // namespace v8::internal | 1176 } } // namespace v8::internal |
| 1166 | 1177 |
| 1167 #endif // V8_X64_ASSEMBLER_X64_H_ | 1178 #endif // V8_X64_ASSEMBLER_X64_H_ |
| OLD | NEW |