Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: src/arm64/disasm-arm64.cc

Issue 1996983003: [ARM64] Make BufferDisassembler print the instruction encoding (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <assert.h> 5 #include <assert.h>
6 #include <stdarg.h> 6 #include <stdarg.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #if V8_TARGET_ARCH_ARM64 10 #if V8_TARGET_ARCH_ARM64
(...skipping 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1795 //------------------------------------------------------------------------------ 1795 //------------------------------------------------------------------------------
1796 1796
1797 class BufferDisassembler : public v8::internal::DisassemblingDecoder { 1797 class BufferDisassembler : public v8::internal::DisassemblingDecoder {
1798 public: 1798 public:
1799 explicit BufferDisassembler(v8::internal::Vector<char> out_buffer) 1799 explicit BufferDisassembler(v8::internal::Vector<char> out_buffer)
1800 : out_buffer_(out_buffer) { } 1800 : out_buffer_(out_buffer) { }
1801 1801
1802 ~BufferDisassembler() { } 1802 ~BufferDisassembler() { }
1803 1803
1804 virtual void ProcessOutput(v8::internal::Instruction* instr) { 1804 virtual void ProcessOutput(v8::internal::Instruction* instr) {
1805 v8::internal::SNPrintF(out_buffer_, "%s", GetOutput()); 1805 v8::internal::SNPrintF(out_buffer_, "%08" PRIx32 " %s",
1806 instr->InstructionBits(), GetOutput());
1806 } 1807 }
1807 1808
1808 private: 1809 private:
1809 v8::internal::Vector<char> out_buffer_; 1810 v8::internal::Vector<char> out_buffer_;
1810 }; 1811 };
1811 1812
1812 Disassembler::Disassembler(const NameConverter& converter) 1813 Disassembler::Disassembler(const NameConverter& converter)
1813 : converter_(converter) {} 1814 : converter_(converter) {}
1814 1815
1815 1816
(...skipping 23 matching lines...) Expand all
1839 decoder.AppendVisitor(&disasm); 1840 decoder.AppendVisitor(&disasm);
1840 1841
1841 for (byte* pc = start; pc < end; pc += v8::internal::kInstructionSize) { 1842 for (byte* pc = start; pc < end; pc += v8::internal::kInstructionSize) {
1842 decoder.Decode(reinterpret_cast<v8::internal::Instruction*>(pc)); 1843 decoder.Decode(reinterpret_cast<v8::internal::Instruction*>(pc));
1843 } 1844 }
1844 } 1845 }
1845 1846
1846 } // namespace disasm 1847 } // namespace disasm
1847 1848
1848 #endif // V8_TARGET_ARCH_ARM64 1849 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698