| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_DBC. | 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC. |
| 8 #if defined(TARGET_ARCH_DBC) | 8 #if defined(TARGET_ARCH_DBC) |
| 9 | 9 |
| 10 #include "platform/assert.h" | 10 #include "platform/assert.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 FormatOperand(buf, size, "k%d", value); | 56 FormatOperand(buf, size, "k%d", value); |
| 57 } | 57 } |
| 58 | 58 |
| 59 | 59 |
| 60 static void Fmtreg(char** buf, intptr_t* size, uword pc, int32_t value) { | 60 static void Fmtreg(char** buf, intptr_t* size, uword pc, int32_t value) { |
| 61 FormatOperand(buf, size, "r%d", value); | 61 FormatOperand(buf, size, "r%d", value); |
| 62 } | 62 } |
| 63 | 63 |
| 64 | 64 |
| 65 static void Fmtxeg(char** buf, intptr_t* size, uword pc, int32_t value) { | 65 static void Fmtxeg(char** buf, intptr_t* size, uword pc, int32_t value) { |
| 66 FormatOperand(buf, size, "R(%d)", value); | 66 if (value < 0) { |
| 67 FormatOperand(buf, size, "FP[%d]", value); |
| 68 } else { |
| 69 Fmtreg(buf, size, pc, value); |
| 70 } |
| 67 } | 71 } |
| 68 | 72 |
| 69 | 73 |
| 70 static void Fmtnum(char** buf, intptr_t* size, uword pc, int32_t value) { | 74 static void Fmtnum(char** buf, intptr_t* size, uword pc, int32_t value) { |
| 71 FormatOperand(buf, size, "#%d", value); | 75 FormatOperand(buf, size, "#%d", value); |
| 72 } | 76 } |
| 73 | 77 |
| 74 | 78 |
| 75 static void Apply(char** buf, | 79 static void Apply(char** buf, |
| 76 intptr_t* size, | 80 intptr_t* size, |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 OS::SNPrint(hex_buffer, hex_size, "%08x", instr); | 228 OS::SNPrint(hex_buffer, hex_size, "%08x", instr); |
| 225 if (out_instr_size) { | 229 if (out_instr_size) { |
| 226 *out_instr_size = sizeof(uint32_t); | 230 *out_instr_size = sizeof(uint32_t); |
| 227 } | 231 } |
| 228 } | 232 } |
| 229 | 233 |
| 230 | 234 |
| 231 } // namespace dart | 235 } // namespace dart |
| 232 | 236 |
| 233 #endif // defined TARGET_ARCH_DBC | 237 #endif // defined TARGET_ARCH_DBC |
| OLD | NEW |