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

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

Issue 659663005: Make disassembler string tables read-only. (Closed)
Patch Set: Created 6 years, 2 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/arm/disasm-arm.cc ('k') | src/ia32/disasm-ia32.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 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 #include "src/v8.h" 10 #include "src/v8.h"
(...skipping 1677 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 1688
1689 AppendToOutput("p%sl%d%s", ls, level, ks); 1689 AppendToOutput("p%sl%d%s", ls, level, ks);
1690 return 6; 1690 return 6;
1691 } 1691 }
1692 1692
1693 int Disassembler::SubstituteBarrierField(Instruction* instr, 1693 int Disassembler::SubstituteBarrierField(Instruction* instr,
1694 const char* format) { 1694 const char* format) {
1695 DCHECK(format[0] == 'M'); 1695 DCHECK(format[0] == 'M');
1696 USE(format); 1696 USE(format);
1697 1697
1698 static const char* options[4][4] = { 1698 static const char* const options[4][4] = {
1699 { "sy (0b0000)", "oshld", "oshst", "osh" }, 1699 { "sy (0b0000)", "oshld", "oshst", "osh" },
1700 { "sy (0b0100)", "nshld", "nshst", "nsh" }, 1700 { "sy (0b0100)", "nshld", "nshst", "nsh" },
1701 { "sy (0b1000)", "ishld", "ishst", "ish" }, 1701 { "sy (0b1000)", "ishld", "ishst", "ish" },
1702 { "sy (0b1100)", "ld", "st", "sy" } 1702 { "sy (0b1100)", "ld", "st", "sy" }
1703 }; 1703 };
1704 int domain = instr->ImmBarrierDomain(); 1704 int domain = instr->ImmBarrierDomain();
1705 int type = instr->ImmBarrierType(); 1705 int type = instr->ImmBarrierType();
1706 1706
1707 AppendToOutput("%s", options[domain][type]); 1707 AppendToOutput("%s", options[domain][type]);
1708 return 1; 1708 return 1;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1825 decoder.AppendVisitor(&disasm); 1825 decoder.AppendVisitor(&disasm);
1826 1826
1827 for (byte* pc = start; pc < end; pc += v8::internal::kInstructionSize) { 1827 for (byte* pc = start; pc < end; pc += v8::internal::kInstructionSize) {
1828 decoder.Decode(reinterpret_cast<v8::internal::Instruction*>(pc)); 1828 decoder.Decode(reinterpret_cast<v8::internal::Instruction*>(pc));
1829 } 1829 }
1830 } 1830 }
1831 1831
1832 } // namespace disasm 1832 } // namespace disasm
1833 1833
1834 #endif // V8_TARGET_ARCH_ARM64 1834 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/disasm-arm.cc ('k') | src/ia32/disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698