| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // bool InstructionSetsConditionCodes(byte* ptr) { | 122 // bool InstructionSetsConditionCodes(byte* ptr) { |
| 123 // Instr* instr = Instr::At(ptr); | 123 // Instr* instr = Instr::At(ptr); |
| 124 // int type = instr->TypeField(); | 124 // int type = instr->TypeField(); |
| 125 // return ((type == 0) || (type == 1)) && instr->HasS(); | 125 // return ((type == 0) || (type == 1)) && instr->HasS(); |
| 126 // } | 126 // } |
| 127 // | 127 // |
| 128 class Instr { | 128 class Instr { |
| 129 public: | 129 public: |
| 130 enum { | 130 enum { |
| 131 kInstrSize = 4, | 131 kInstrSize = 4, |
| 132 kInstrSizeLog2 = 2, |
| 132 kPCReadOffset = 8 | 133 kPCReadOffset = 8 |
| 133 }; | 134 }; |
| 134 | 135 |
| 135 // Get the raw instruction bits. | 136 // Get the raw instruction bits. |
| 136 inline instr_t InstructionBits() const { | 137 inline instr_t InstructionBits() const { |
| 137 return *reinterpret_cast<const instr_t*>(this); | 138 return *reinterpret_cast<const instr_t*>(this); |
| 138 } | 139 } |
| 139 | 140 |
| 140 // Set the raw instruction bits to value. | 141 // Set the raw instruction bits to value. |
| 141 inline void SetInstructionBits(instr_t value) { | 142 inline void SetInstructionBits(instr_t value) { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 226 |
| 226 private: | 227 private: |
| 227 // We need to prevent the creation of instances of class Instr. | 228 // We need to prevent the creation of instances of class Instr. |
| 228 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 229 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
| 229 }; | 230 }; |
| 230 | 231 |
| 231 | 232 |
| 232 } } // namespace assembler::arm | 233 } } // namespace assembler::arm |
| 233 | 234 |
| 234 #endif // V8_CONSTANTS_ARM_H_ | 235 #endif // V8_CONSTANTS_ARM_H_ |
| OLD | NEW |