OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1672 if (instr->ConditionField() == kSpecialCondition) { | 1672 if (instr->ConditionField() == kSpecialCondition) { |
1673 DecodeSpecialCondition(instr); | 1673 DecodeSpecialCondition(instr); |
1674 return Instruction::kInstrSize; | 1674 return Instruction::kInstrSize; |
1675 } | 1675 } |
1676 int instruction_bits = *(reinterpret_cast<int*>(instr_ptr)); | 1676 int instruction_bits = *(reinterpret_cast<int*>(instr_ptr)); |
1677 if ((instruction_bits & kConstantPoolMarkerMask) == kConstantPoolMarker) { | 1677 if ((instruction_bits & kConstantPoolMarkerMask) == kConstantPoolMarker) { |
1678 out_buffer_pos_ += OS::SNPrintF(out_buffer_ + out_buffer_pos_, | 1678 out_buffer_pos_ += OS::SNPrintF(out_buffer_ + out_buffer_pos_, |
1679 "constant pool begin (length %d)", | 1679 "constant pool begin (length %d)", |
1680 DecodeConstantPoolLength(instruction_bits)); | 1680 DecodeConstantPoolLength(instruction_bits)); |
1681 return Instruction::kInstrSize; | 1681 return Instruction::kInstrSize; |
| 1682 } else if (instruction_bits == kCodeAgeJumpInstruction) { |
| 1683 // The code age prologue has a constant immediatly following the jump |
| 1684 // instruction. |
| 1685 Instruction* target = Instruction::At(instr_ptr + Instruction::kInstrSize); |
| 1686 DecodeType2(instr); |
| 1687 OS::SNPrintF(out_buffer_ + out_buffer_pos_, |
| 1688 " (0x%08x)", target->InstructionBits()); |
| 1689 return 2 * Instruction::kInstrSize; |
1682 } | 1690 } |
1683 switch (instr->TypeValue()) { | 1691 switch (instr->TypeValue()) { |
1684 case 0: | 1692 case 0: |
1685 case 1: { | 1693 case 1: { |
1686 DecodeType01(instr); | 1694 DecodeType01(instr); |
1687 break; | 1695 break; |
1688 } | 1696 } |
1689 case 2: { | 1697 case 2: { |
1690 DecodeType2(instr); | 1698 DecodeType2(instr); |
1691 break; | 1699 break; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1795 v8::internal::PrintF( | 1803 v8::internal::PrintF( |
1796 f, "%p %08x %s\n", | 1804 f, "%p %08x %s\n", |
1797 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); | 1805 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); |
1798 } | 1806 } |
1799 } | 1807 } |
1800 | 1808 |
1801 | 1809 |
1802 } // namespace disasm | 1810 } // namespace disasm |
1803 | 1811 |
1804 #endif // V8_TARGET_ARCH_ARM | 1812 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |