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

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

Issue 1299563003: Remove grab-bag includes of v8.h from architecture ports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | « src/mips/deoptimizer-mips.cc ('k') | src/mips/frames-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 // A Disassembler object is used to disassemble a block of code instruction by 5 // A Disassembler object is used to disassemble a block of code instruction by
6 // instruction. The default implementation of the NameConverter object can be 6 // instruction. The default implementation of the NameConverter object can be
7 // overriden to modify register names or to do symbol lookup on addresses. 7 // overriden to modify register names or to do symbol lookup on addresses.
8 // 8 //
9 // The example below will disassemble a block of code and print it to stdout. 9 // The example below will disassemble a block of code and print it to stdout.
10 // 10 //
11 // NameConverter converter; 11 // NameConverter converter;
12 // Disassembler d(converter); 12 // Disassembler d(converter);
13 // for (byte* pc = begin; pc < end;) { 13 // for (byte* pc = begin; pc < end;) {
14 // v8::internal::EmbeddedVector<char, 256> buffer; 14 // v8::internal::EmbeddedVector<char, 256> buffer;
15 // byte* prev_pc = pc; 15 // byte* prev_pc = pc;
16 // pc += d.InstructionDecode(buffer, pc); 16 // pc += d.InstructionDecode(buffer, pc);
17 // printf("%p %08x %s\n", 17 // printf("%p %08x %s\n",
18 // prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer); 18 // prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer);
19 // } 19 // }
20 // 20 //
21 // The Disassembler class also has a convenience method to disassemble a block 21 // The Disassembler class also has a convenience method to disassemble a block
22 // of code into a FILE*, meaning that the above functionality could also be 22 // of code into a FILE*, meaning that the above functionality could also be
23 // achieved by just calling Disassembler::Disassemble(stdout, begin, end); 23 // achieved by just calling Disassembler::Disassemble(stdout, begin, end);
24 24
25
26 #include <assert.h> 25 #include <assert.h>
27 #include <stdarg.h> 26 #include <stdarg.h>
28 #include <stdio.h> 27 #include <stdio.h>
29 #include <string.h> 28 #include <string.h>
30 29
31 #include "src/v8.h"
32
33 #if V8_TARGET_ARCH_MIPS 30 #if V8_TARGET_ARCH_MIPS
34 31
35 #include "src/base/platform/platform.h" 32 #include "src/base/platform/platform.h"
36 #include "src/disasm.h" 33 #include "src/disasm.h"
37 #include "src/macro-assembler.h" 34 #include "src/macro-assembler.h"
38 #include "src/mips/constants-mips.h" 35 #include "src/mips/constants-mips.h"
39 36
40 namespace v8 { 37 namespace v8 {
41 namespace internal { 38 namespace internal {
42 39
(...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); 1704 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start());
1708 } 1705 }
1709 } 1706 }
1710 1707
1711 1708
1712 #undef UNSUPPORTED 1709 #undef UNSUPPORTED
1713 1710
1714 } // namespace disasm 1711 } // namespace disasm
1715 1712
1716 #endif // V8_TARGET_ARCH_MIPS 1713 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/deoptimizer-mips.cc ('k') | src/mips/frames-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698