OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 } | 466 } |
467 case 'h': { // 'h: halfword operation for extra loads and stores | 467 case 'h': { // 'h: halfword operation for extra loads and stores |
468 if (instr->HasH()) { | 468 if (instr->HasH()) { |
469 Print("h"); | 469 Print("h"); |
470 } else { | 470 } else { |
471 Print("b"); | 471 Print("b"); |
472 } | 472 } |
473 return 1; | 473 return 1; |
474 } | 474 } |
475 case 'i': { // 'i: immediate value from adjacent bits. | 475 case 'i': { // 'i: immediate value from adjacent bits. |
476 // Expects tokens in the form imm%02d@%02d, ie. imm05@07, imm10@16 | 476 // Expects tokens in the form imm%02d@%02d, i.e. imm05@07, imm10@16 |
477 int width = (format[3] - '0') * 10 + (format[4] - '0'); | 477 int width = (format[3] - '0') * 10 + (format[4] - '0'); |
478 int lsb = (format[6] - '0') * 10 + (format[7] - '0'); | 478 int lsb = (format[6] - '0') * 10 + (format[7] - '0'); |
479 | 479 |
480 ASSERT((width >= 1) && (width <= 32)); | 480 ASSERT((width >= 1) && (width <= 32)); |
481 ASSERT((lsb >= 0) && (lsb <= 31)); | 481 ASSERT((lsb >= 0) && (lsb <= 31)); |
482 ASSERT((width + lsb) <= 32); | 482 ASSERT((width + lsb) <= 32); |
483 | 483 |
484 out_buffer_pos_ += OS::SNPrintF(out_buffer_ + out_buffer_pos_, | 484 out_buffer_pos_ += OS::SNPrintF(out_buffer_ + out_buffer_pos_, |
485 "%d", | 485 "%d", |
486 instr->Bits(width + lsb - 1, lsb)); | 486 instr->Bits(width + lsb - 1, lsb)); |
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1497 pc += d.InstructionDecode(buffer, pc); | 1497 pc += d.InstructionDecode(buffer, pc); |
1498 fprintf(f, "%p %08x %s\n", | 1498 fprintf(f, "%p %08x %s\n", |
1499 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); | 1499 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); |
1500 } | 1500 } |
1501 } | 1501 } |
1502 | 1502 |
1503 | 1503 |
1504 } // namespace disasm | 1504 } // namespace disasm |
1505 | 1505 |
1506 #endif // V8_TARGET_ARCH_ARM | 1506 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |