OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 // The naming of these accessor corresponds to figure A3-1. | 230 // The naming of these accessor corresponds to figure A3-1. |
231 // Generally applicable fields | 231 // Generally applicable fields |
232 inline Condition ConditionField() const { | 232 inline Condition ConditionField() const { |
233 return static_cast<Condition>(Bits(31, 28)); | 233 return static_cast<Condition>(Bits(31, 28)); |
234 } | 234 } |
235 inline int TypeField() const { return Bits(27, 25); } | 235 inline int TypeField() const { return Bits(27, 25); } |
236 | 236 |
237 inline int RnField() const { return Bits(19, 16); } | 237 inline int RnField() const { return Bits(19, 16); } |
238 inline int RdField() const { return Bits(15, 12); } | 238 inline int RdField() const { return Bits(15, 12); } |
239 | 239 |
| 240 inline int CoprocessorField() const { return Bits(11, 8); } |
240 // Support for VFP. | 241 // Support for VFP. |
241 // Vn(19-16) | Vd(15-12) | Vm(3-0) | 242 // Vn(19-16) | Vd(15-12) | Vm(3-0) |
242 inline int VnField() const { return Bits(19, 16); } | 243 inline int VnField() const { return Bits(19, 16); } |
243 inline int VmField() const { return Bits(3, 0); } | 244 inline int VmField() const { return Bits(3, 0); } |
244 inline int VdField() const { return Bits(15, 12); } | 245 inline int VdField() const { return Bits(15, 12); } |
245 inline int NField() const { return Bit(7); } | 246 inline int NField() const { return Bit(7); } |
246 inline int MField() const { return Bit(5); } | 247 inline int MField() const { return Bit(5); } |
247 inline int DField() const { return Bit(22); } | 248 inline int DField() const { return Bit(22); } |
248 inline int RtField() const { return Bits(15, 12); } | 249 inline int RtField() const { return Bits(15, 12); } |
| 250 inline int PField() const { return Bit(24); } |
| 251 inline int UField() const { return Bit(23); } |
249 | 252 |
250 // Fields used in Data processing instructions | 253 // Fields used in Data processing instructions |
251 inline Opcode OpcodeField() const { | 254 inline Opcode OpcodeField() const { |
252 return static_cast<Opcode>(Bits(24, 21)); | 255 return static_cast<Opcode>(Bits(24, 21)); |
253 } | 256 } |
254 inline int SField() const { return Bit(20); } | 257 inline int SField() const { return Bit(20); } |
255 // with register | 258 // with register |
256 inline int RmField() const { return Bits(3, 0); } | 259 inline int RmField() const { return Bits(3, 0); } |
257 inline Shift ShiftField() const { return static_cast<Shift>(Bits(6, 5)); } | 260 inline Shift ShiftField() const { return static_cast<Shift>(Bits(6, 5)); } |
258 inline int RegShiftField() const { return Bit(4); } | 261 inline int RegShiftField() const { return Bit(4); } |
(...skipping 30 matching lines...) Expand all Loading... |
289 | 292 |
290 // Test for special encodings of type 0 instructions (extra loads and stores, | 293 // Test for special encodings of type 0 instructions (extra loads and stores, |
291 // as well as multiplications). | 294 // as well as multiplications). |
292 inline bool IsSpecialType0() const { return (Bit(7) == 1) && (Bit(4) == 1); } | 295 inline bool IsSpecialType0() const { return (Bit(7) == 1) && (Bit(4) == 1); } |
293 | 296 |
294 // Special accessors that test for existence of a value. | 297 // Special accessors that test for existence of a value. |
295 inline bool HasS() const { return SField() == 1; } | 298 inline bool HasS() const { return SField() == 1; } |
296 inline bool HasB() const { return BField() == 1; } | 299 inline bool HasB() const { return BField() == 1; } |
297 inline bool HasW() const { return WField() == 1; } | 300 inline bool HasW() const { return WField() == 1; } |
298 inline bool HasL() const { return LField() == 1; } | 301 inline bool HasL() const { return LField() == 1; } |
| 302 inline bool HasU() const { return UField() == 1; } |
299 inline bool HasSign() const { return SignField() == 1; } | 303 inline bool HasSign() const { return SignField() == 1; } |
300 inline bool HasH() const { return HField() == 1; } | 304 inline bool HasH() const { return HField() == 1; } |
301 inline bool HasLink() const { return LinkField() == 1; } | 305 inline bool HasLink() const { return LinkField() == 1; } |
302 | 306 |
303 // Instructions are read of out a code stream. The only way to get a | 307 // Instructions are read of out a code stream. The only way to get a |
304 // reference to an instruction is to convert a pointer. There is no way | 308 // reference to an instruction is to convert a pointer. There is no way |
305 // to allocate or create instances of class Instr. | 309 // to allocate or create instances of class Instr. |
306 // Use the At(pc) function to create references to Instr. | 310 // Use the At(pc) function to create references to Instr. |
307 static Instr* At(byte* pc) { return reinterpret_cast<Instr*>(pc); } | 311 static Instr* At(byte* pc) { return reinterpret_cast<Instr*>(pc); } |
308 | 312 |
(...skipping 29 matching lines...) Expand all Loading... |
338 static const char* Name(int reg); | 342 static const char* Name(int reg); |
339 | 343 |
340 private: | 344 private: |
341 static const char* names_[kNumVFPRegisters]; | 345 static const char* names_[kNumVFPRegisters]; |
342 }; | 346 }; |
343 | 347 |
344 | 348 |
345 } } // namespace assembler::arm | 349 } } // namespace assembler::arm |
346 | 350 |
347 #endif // V8_ARM_CONSTANTS_ARM_H_ | 351 #endif // V8_ARM_CONSTANTS_ARM_H_ |
OLD | NEW |