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

Side by Side Diff: runtime/vm/assembler_x64.cc

Issue 2359313002: Disassembler: use the register names we generally use with our assembler. (Closed)
Patch Set: Created 4 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 | runtime/vm/disassembler_arm.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // NOLINT 5 #include "vm/globals.h" // NOLINT
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
(...skipping 3749 matching lines...) Expand 10 before | Expand all | Expand 10 after
3760 return FieldAddress(array, 3760 return FieldAddress(array,
3761 index, 3761 index,
3762 ToScaleFactor(index_scale), 3762 ToScaleFactor(index_scale),
3763 Instance::DataOffsetFor(cid)); 3763 Instance::DataOffsetFor(cid));
3764 } 3764 }
3765 } 3765 }
3766 3766
3767 3767
3768 static const char* cpu_reg_names[kNumberOfCpuRegisters] = { 3768 static const char* cpu_reg_names[kNumberOfCpuRegisters] = {
3769 "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi", 3769 "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
3770 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15" 3770 "r8", "r9", "r10", "r11", "r12", "r13", "thr", "pp"
3771 }; 3771 };
3772 3772
3773 3773
3774 const char* Assembler::RegisterName(Register reg) { 3774 const char* Assembler::RegisterName(Register reg) {
3775 ASSERT((0 <= reg) && (reg < kNumberOfCpuRegisters)); 3775 ASSERT((0 <= reg) && (reg < kNumberOfCpuRegisters));
3776 return cpu_reg_names[reg]; 3776 return cpu_reg_names[reg];
3777 } 3777 }
3778 3778
3779 3779
3780 static const char* xmm_reg_names[kNumberOfXmmRegisters] = { 3780 static const char* xmm_reg_names[kNumberOfXmmRegisters] = {
3781 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", 3781 "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7",
3782 "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15" 3782 "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15"
3783 }; 3783 };
3784 3784
3785 3785
3786 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3786 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3787 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 3787 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
3788 return xmm_reg_names[reg]; 3788 return xmm_reg_names[reg];
3789 } 3789 }
3790 3790
3791 } // namespace dart 3791 } // namespace dart
3792 3792
3793 #endif // defined TARGET_ARCH_X64 3793 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/disassembler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698