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

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

Issue 1872203005: Fix printf formats (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix unused param found by GC mole Created 4 years, 8 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/heap/spaces.cc ('k') | src/isolate.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 #if V8_TARGET_ARCH_IA32 9 #if V8_TARGET_ARCH_IA32
10 10
11 #include "src/base/compiler-specific.h"
11 #include "src/disasm.h" 12 #include "src/disasm.h"
12 13
13 namespace disasm { 14 namespace disasm {
14 15
15 enum OperandOrder { 16 enum OperandOrder {
16 UNSET_OP_ORDER = 0, 17 UNSET_OP_ORDER = 0,
17 REG_OPER_OP_ORDER, 18 REG_OPER_OP_ORDER,
18 OPER_REG_OP_ORDER 19 OPER_REG_OP_ORDER
19 }; 20 };
20 21
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 int D1D3C1Instruction(byte* data); 383 int D1D3C1Instruction(byte* data);
383 int JumpShort(byte* data); 384 int JumpShort(byte* data);
384 int JumpConditional(byte* data, const char* comment); 385 int JumpConditional(byte* data, const char* comment);
385 int JumpConditionalShort(byte* data, const char* comment); 386 int JumpConditionalShort(byte* data, const char* comment);
386 int SetCC(byte* data); 387 int SetCC(byte* data);
387 int CMov(byte* data); 388 int CMov(byte* data);
388 int FPUInstruction(byte* data); 389 int FPUInstruction(byte* data);
389 int MemoryFPUInstruction(int escape_opcode, int regop, byte* modrm_start); 390 int MemoryFPUInstruction(int escape_opcode, int regop, byte* modrm_start);
390 int RegisterFPUInstruction(int escape_opcode, byte modrm_byte); 391 int RegisterFPUInstruction(int escape_opcode, byte modrm_byte);
391 int AVXInstruction(byte* data); 392 int AVXInstruction(byte* data);
392 void AppendToBuffer(const char* format, ...); 393 PRINTF_FORMAT(2, 3) void AppendToBuffer(const char* format, ...);
393
394 394
395 void UnimplementedInstruction() { 395 void UnimplementedInstruction() {
396 if (abort_on_unimplemented_) { 396 if (abort_on_unimplemented_) {
397 UNIMPLEMENTED(); 397 UNIMPLEMENTED();
398 } else { 398 } else {
399 AppendToBuffer("'Unimplemented Instruction'"); 399 AppendToBuffer("'Unimplemented Instruction'");
400 } 400 }
401 } 401 }
402 }; 402 };
403 403
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 1267
1268 bool processed = true; // Will be set to false if the current instruction 1268 bool processed = true; // Will be set to false if the current instruction
1269 // is not in 'instructions' table. 1269 // is not in 'instructions' table.
1270 // Decode AVX instructions. 1270 // Decode AVX instructions.
1271 if (vex_byte0_ != 0) { 1271 if (vex_byte0_ != 0) {
1272 data += AVXInstruction(data); 1272 data += AVXInstruction(data);
1273 } else { 1273 } else {
1274 const InstructionDesc& idesc = instruction_table_->Get(*data); 1274 const InstructionDesc& idesc = instruction_table_->Get(*data);
1275 switch (idesc.type) { 1275 switch (idesc.type) {
1276 case ZERO_OPERANDS_INSTR: 1276 case ZERO_OPERANDS_INSTR:
1277 AppendToBuffer(idesc.mnem); 1277 AppendToBuffer("%s", idesc.mnem);
1278 data++; 1278 data++;
1279 break; 1279 break;
1280 1280
1281 case TWO_OPERANDS_INSTR: 1281 case TWO_OPERANDS_INSTR:
1282 data++; 1282 data++;
1283 data += PrintOperands(idesc.mnem, idesc.op_order_, data); 1283 data += PrintOperands(idesc.mnem, idesc.op_order_, data);
1284 break; 1284 break;
1285 1285
1286 case JUMP_CONDITIONAL_SHORT_INSTR: 1286 case JUMP_CONDITIONAL_SHORT_INSTR:
1287 data += JumpConditionalShort(data, branch_hint); 1287 data += JumpConditionalShort(data, branch_hint);
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
2279 fprintf(f, " "); 2279 fprintf(f, " ");
2280 } 2280 }
2281 fprintf(f, " %s\n", buffer.start()); 2281 fprintf(f, " %s\n", buffer.start());
2282 } 2282 }
2283 } 2283 }
2284 2284
2285 2285
2286 } // namespace disasm 2286 } // namespace disasm
2287 2287
2288 #endif // V8_TARGET_ARCH_IA32 2288 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698