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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 case 'm': { | 495 case 'm': { |
496 if (format[1] == 'w') { | 496 if (format[1] == 'w') { |
497 // 'mw: movt/movw instructions. | 497 // 'mw: movt/movw instructions. |
498 PrintMovwMovt(instr); | 498 PrintMovwMovt(instr); |
499 return 2; | 499 return 2; |
500 } | 500 } |
501 if (format[1] == 'e') { // 'memop: load/store instructions. | 501 if (format[1] == 'e') { // 'memop: load/store instructions. |
502 ASSERT(STRING_STARTS_WITH(format, "memop")); | 502 ASSERT(STRING_STARTS_WITH(format, "memop")); |
503 if (instr->HasL()) { | 503 if (instr->HasL()) { |
504 Print("ldr"); | 504 Print("ldr"); |
505 } else if ((instr->Bits(27, 25) == 0) && (instr->Bit(20) == 0)) { | 505 } else { |
506 if (instr->Bits(7, 4) == 0xf) { | 506 if ((instr->Bits(27, 25) == 0) && (instr->Bit(20) == 0) && |
507 Print("strd"); | 507 (instr->Bits(7, 6) == 3) && (instr->Bit(4) == 1)) { |
508 } else { | 508 if (instr->Bit(5) == 1) { |
509 Print("ldrd"); | 509 Print("strd"); |
| 510 } else { |
| 511 Print("ldrd"); |
| 512 } |
| 513 return 5; |
510 } | 514 } |
511 } else { | |
512 Print("str"); | 515 Print("str"); |
513 } | 516 } |
514 return 5; | 517 return 5; |
515 } | 518 } |
516 // 'msg: for simulator break instructions | 519 // 'msg: for simulator break instructions |
517 ASSERT(STRING_STARTS_WITH(format, "msg")); | 520 ASSERT(STRING_STARTS_WITH(format, "msg")); |
518 byte* str = | 521 byte* str = |
519 reinterpret_cast<byte*>(instr->InstructionBits() & 0x0fffffff); | 522 reinterpret_cast<byte*>(instr->InstructionBits() & 0x0fffffff); |
520 out_buffer_pos_ += OS::SNPrintF(out_buffer_ + out_buffer_pos_, | 523 out_buffer_pos_ += OS::SNPrintF(out_buffer_ + out_buffer_pos_, |
521 "%s", converter_.NameInCode(str)); | 524 "%s", converter_.NameInCode(str)); |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 // Other data processing instructions | 1082 // Other data processing instructions |
1080 if ((instr->Opc2Value() == 0x0) && (instr->Opc3Value() == 0x1)) { | 1083 if ((instr->Opc2Value() == 0x0) && (instr->Opc3Value() == 0x1)) { |
1081 // vmov register to register. | 1084 // vmov register to register. |
1082 if (instr->SzValue() == 0x1) { | 1085 if (instr->SzValue() == 0x1) { |
1083 Format(instr, "vmov.f64'cond 'Dd, 'Dm"); | 1086 Format(instr, "vmov.f64'cond 'Dd, 'Dm"); |
1084 } else { | 1087 } else { |
1085 Format(instr, "vmov.f32'cond 'Sd, 'Sm"); | 1088 Format(instr, "vmov.f32'cond 'Sd, 'Sm"); |
1086 } | 1089 } |
1087 } else if ((instr->Opc2Value() == 0x0) && (instr->Opc3Value() == 0x3)) { | 1090 } else if ((instr->Opc2Value() == 0x0) && (instr->Opc3Value() == 0x3)) { |
1088 // vabs | 1091 // vabs |
1089 Format(instr, "vabs'cond 'Dd, 'Dm"); | 1092 Format(instr, "vabs.f64'cond 'Dd, 'Dm"); |
1090 } else if ((instr->Opc2Value() == 0x1) && (instr->Opc3Value() == 0x1)) { | 1093 } else if ((instr->Opc2Value() == 0x1) && (instr->Opc3Value() == 0x1)) { |
1091 // vneg | 1094 // vneg |
1092 Format(instr, "vneg'cond 'Dd, 'Dm"); | 1095 Format(instr, "vneg.f64'cond 'Dd, 'Dm"); |
1093 } else if ((instr->Opc2Value() == 0x7) && (instr->Opc3Value() == 0x3)) { | 1096 } else if ((instr->Opc2Value() == 0x7) && (instr->Opc3Value() == 0x3)) { |
1094 DecodeVCVTBetweenDoubleAndSingle(instr); | 1097 DecodeVCVTBetweenDoubleAndSingle(instr); |
1095 } else if ((instr->Opc2Value() == 0x8) && (instr->Opc3Value() & 0x1)) { | 1098 } else if ((instr->Opc2Value() == 0x8) && (instr->Opc3Value() & 0x1)) { |
1096 DecodeVCVTBetweenFloatingPointAndInteger(instr); | 1099 DecodeVCVTBetweenFloatingPointAndInteger(instr); |
1097 } else if (((instr->Opc2Value() >> 1) == 0x6) && | 1100 } else if (((instr->Opc2Value() >> 1) == 0x6) && |
1098 (instr->Opc3Value() & 0x1)) { | 1101 (instr->Opc3Value() & 0x1)) { |
1099 DecodeVCVTBetweenFloatingPointAndInteger(instr); | 1102 DecodeVCVTBetweenFloatingPointAndInteger(instr); |
1100 } else if (((instr->Opc2Value() == 0x4) || (instr->Opc2Value() == 0x5)) && | 1103 } else if (((instr->Opc2Value() == 0x4) || (instr->Opc2Value() == 0x5)) && |
1101 (instr->Opc3Value() & 0x1)) { | 1104 (instr->Opc3Value() & 0x1)) { |
1102 DecodeVCMP(instr); | 1105 DecodeVCMP(instr); |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1494 pc += d.InstructionDecode(buffer, pc); | 1497 pc += d.InstructionDecode(buffer, pc); |
1495 fprintf(f, "%p %08x %s\n", | 1498 fprintf(f, "%p %08x %s\n", |
1496 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); | 1499 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); |
1497 } | 1500 } |
1498 } | 1501 } |
1499 | 1502 |
1500 | 1503 |
1501 } // namespace disasm | 1504 } // namespace disasm |
1502 | 1505 |
1503 #endif // V8_TARGET_ARCH_ARM | 1506 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |