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

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

Issue 654263006: X87: Make disassembler string tables read-only. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
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 | « 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 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 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after
1691 } 1691 }
1692 1692
1693 outp += v8::internal::SNPrintF(out_buffer + outp, " %s", tmp_buffer_.start()); 1693 outp += v8::internal::SNPrintF(out_buffer + outp, " %s", tmp_buffer_.start());
1694 return instr_len; 1694 return instr_len;
1695 } // NOLINT (function is too long) 1695 } // NOLINT (function is too long)
1696 1696
1697 1697
1698 //------------------------------------------------------------------------------ 1698 //------------------------------------------------------------------------------
1699 1699
1700 1700
1701 static const char* cpu_regs[8] = { 1701 static const char* const cpu_regs[8] = {
1702 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi" 1702 "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi"
1703 }; 1703 };
1704 1704
1705 1705
1706 static const char* byte_cpu_regs[8] = { 1706 static const char* const byte_cpu_regs[8] = {
1707 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh" 1707 "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh"
1708 }; 1708 };
1709 1709
1710 1710
1711 static const char* xmm_regs[8] = { 1711 static const char* const xmm_regs[8] = {
1712 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7" 1712 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
1713 }; 1713 };
1714 1714
1715 1715
1716 const char* NameConverter::NameOfAddress(byte* addr) const { 1716 const char* NameConverter::NameOfAddress(byte* addr) const {
1717 v8::internal::SNPrintF(tmp_buffer_, "%p", addr); 1717 v8::internal::SNPrintF(tmp_buffer_, "%p", addr);
1718 return tmp_buffer_.start(); 1718 return tmp_buffer_.start();
1719 } 1719 }
1720 1720
1721 1721
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 fprintf(f, " "); 1787 fprintf(f, " ");
1788 } 1788 }
1789 fprintf(f, " %s\n", buffer.start()); 1789 fprintf(f, " %s\n", buffer.start());
1790 } 1790 }
1791 } 1791 }
1792 1792
1793 1793
1794 } // namespace disasm 1794 } // namespace disasm
1795 1795
1796 #endif // V8_TARGET_ARCH_X87 1796 #endif // V8_TARGET_ARCH_X87
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