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

Side by Side Diff: src/ia32/disasm-ia32.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/arm64/disasm-arm64.cc ('k') | src/x64/disasm-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after
1683 outp += v8::internal::SNPrintF(out_buffer + outp, 1683 outp += v8::internal::SNPrintF(out_buffer + outp,
1684 " %s", 1684 " %s",
1685 tmp_buffer_.start()); 1685 tmp_buffer_.start());
1686 return instr_len; 1686 return instr_len;
1687 } // NOLINT (function is too long) 1687 } // NOLINT (function is too long)
1688 1688
1689 1689
1690 //------------------------------------------------------------------------------ 1690 //------------------------------------------------------------------------------
1691 1691
1692 1692
1693 static const char* cpu_regs[8] = { 1693 static const char* const cpu_regs[8] = {
1694 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi" 1694 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi"
1695 }; 1695 };
1696 1696
1697 1697
1698 static const char* byte_cpu_regs[8] = { 1698 static const char* const byte_cpu_regs[8] = {
1699 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh" 1699 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh"
1700 }; 1700 };
1701 1701
1702 1702
1703 static const char* xmm_regs[8] = { 1703 static const char* const xmm_regs[8] = {
1704 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7" 1704 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
1705 }; 1705 };
1706 1706
1707 1707
1708 const char* NameConverter::NameOfAddress(byte* addr) const { 1708 const char* NameConverter::NameOfAddress(byte* addr) const {
1709 v8::internal::SNPrintF(tmp_buffer_, "%p", addr); 1709 v8::internal::SNPrintF(tmp_buffer_, "%p", addr);
1710 return tmp_buffer_.start(); 1710 return tmp_buffer_.start();
1711 } 1711 }
1712 1712
1713 1713
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1779 fprintf(f, " "); 1779 fprintf(f, " ");
1780 } 1780 }
1781 fprintf(f, " %s\n", buffer.start()); 1781 fprintf(f, " %s\n", buffer.start());
1782 } 1782 }
1783 } 1783 }
1784 1784
1785 1785
1786 } // namespace disasm 1786 } // namespace disasm
1787 1787
1788 #endif // V8_TARGET_ARCH_IA32 1788 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/disasm-arm64.cc ('k') | src/x64/disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698