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 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1648 | 1648 |
1649 bool Decoder::IsConstantPoolAt(byte* instr_ptr) { | 1649 bool Decoder::IsConstantPoolAt(byte* instr_ptr) { |
1650 int instruction_bits = *(reinterpret_cast<int*>(instr_ptr)); | 1650 int instruction_bits = *(reinterpret_cast<int*>(instr_ptr)); |
1651 return (instruction_bits & kConstantPoolMarkerMask) == kConstantPoolMarker; | 1651 return (instruction_bits & kConstantPoolMarkerMask) == kConstantPoolMarker; |
1652 } | 1652 } |
1653 | 1653 |
1654 | 1654 |
1655 int Decoder::ConstantPoolSizeAt(byte* instr_ptr) { | 1655 int Decoder::ConstantPoolSizeAt(byte* instr_ptr) { |
1656 if (IsConstantPoolAt(instr_ptr)) { | 1656 if (IsConstantPoolAt(instr_ptr)) { |
1657 int instruction_bits = *(reinterpret_cast<int*>(instr_ptr)); | 1657 int instruction_bits = *(reinterpret_cast<int*>(instr_ptr)); |
1658 return DecodeConstantPoolLength(instruction_bits) / Assembler::kInstrSize; | 1658 return DecodeConstantPoolLength(instruction_bits); |
1659 } else { | 1659 } else { |
1660 return -1; | 1660 return -1; |
1661 } | 1661 } |
1662 } | 1662 } |
1663 | 1663 |
1664 | 1664 |
1665 // Disassemble the instruction at *instr_ptr into the output buffer. | 1665 // Disassemble the instruction at *instr_ptr into the output buffer. |
1666 int Decoder::InstructionDecode(byte* instr_ptr) { | 1666 int Decoder::InstructionDecode(byte* instr_ptr) { |
1667 Instruction* instr = Instruction::At(instr_ptr); | 1667 Instruction* instr = Instruction::At(instr_ptr); |
1668 // Print raw instruction bytes. | 1668 // Print raw instruction bytes. |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1795 v8::internal::PrintF( | 1795 v8::internal::PrintF( |
1796 f, "%p %08x %s\n", | 1796 f, "%p %08x %s\n", |
1797 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); | 1797 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); |
1798 } | 1798 } |
1799 } | 1799 } |
1800 | 1800 |
1801 | 1801 |
1802 } // namespace disasm | 1802 } // namespace disasm |
1803 | 1803 |
1804 #endif // V8_TARGET_ARCH_ARM | 1804 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |