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

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

Issue 2757783003: Set TARGET_OS_* from GN, falling back to HOST_OS_*. (Closed)
Patch Set: . Created 3 years, 9 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
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/disassembler.h" 5 #include "vm/disassembler.h"
6 6
7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
8 #if defined(TARGET_ARCH_ARM) 8 #if defined(TARGET_ARCH_ARM)
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // Print the condition guarding the instruction. 105 // Print the condition guarding the instruction.
106 void ARMDecoder::PrintCondition(Instr* instr) { 106 void ARMDecoder::PrintCondition(Instr* instr) {
107 Print(cond_names[instr->ConditionField()]); 107 Print(cond_names[instr->ConditionField()]);
108 } 108 }
109 109
110 110
111 // These register names are defined in a way to match the native disassembler 111 // These register names are defined in a way to match the native disassembler
112 // formatting, except for register alias pp (r5). 112 // formatting, except for register alias pp (r5).
113 // See for example the command "objdump -d <binary file>". 113 // See for example the command "objdump -d <binary file>".
114 static const char* reg_names[kNumberOfCpuRegisters] = { 114 static const char* reg_names[kNumberOfCpuRegisters] = {
115 #if defined(TARGET_ABI_IOS) 115 #if defined(TARGET_OS_MACOS) || TARGET_OS_IOS
116 "r0", "r1", "r2", "r3", "r4", "pp", "r6", "fp", 116 "r0", "r1", "r2", "r3", "r4", "pp", "r6", "fp",
117 "r8", "r9", "thr", "r11", "ip", "sp", "lr", "pc", 117 "r8", "r9", "thr", "r11", "ip", "sp", "lr", "pc",
118 #elif defined(TARGET_ABI_EABI) 118 #else
119 "r0", "r1", "r2", "r3", "r4", "pp", "r6", "r7", 119 "r0", "r1", "r2", "r3", "r4", "pp", "r6", "r7",
120 "r8", "r9", "thr", "fp", "ip", "sp", "lr", "pc", 120 "r8", "r9", "thr", "fp", "ip", "sp", "lr", "pc",
121 #else
122 #error Unknown ABI
123 #endif 121 #endif
124 }; 122 };
125 123
126 124
127 // Print the register name according to the active name converter. 125 // Print the register name according to the active name converter.
128 void ARMDecoder::PrintRegister(int reg) { 126 void ARMDecoder::PrintRegister(int reg) {
129 ASSERT(0 <= reg); 127 ASSERT(0 <= reg);
130 ASSERT(reg < kNumberOfCpuRegisters); 128 ASSERT(reg < kNumberOfCpuRegisters);
131 Print(reg_names[reg]); 129 Print(reg_names[reg]);
132 } 130 }
(...skipping 1405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 *object = NULL; 1536 *object = NULL;
1539 } 1537 }
1540 } 1538 }
1541 } 1539 }
1542 1540
1543 #endif // !PRODUCT 1541 #endif // !PRODUCT
1544 1542
1545 } // namespace dart 1543 } // namespace dart
1546 1544
1547 #endif // defined TARGET_ARCH_ARM 1545 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698