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

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

Issue 322423003: ARM: add AArch32 support and new vcvt instructions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/constants-arm.h ('k') | src/arm/simulator-arm.h » ('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 // A Disassembler object is used to disassemble a block of code instruction by 5 // A Disassembler object is used to disassemble a block of code instruction by
6 // instruction. The default implementation of the NameConverter object can be 6 // instruction. The default implementation of the NameConverter object can be
7 // overriden to modify register names or to do symbol lookup on addresses. 7 // overriden to modify register names or to do symbol lookup on addresses.
8 // 8 //
9 // The example below will disassemble a block of code and print it to stdout. 9 // The example below will disassemble a block of code and print it to stdout.
10 // 10 //
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 out_buffer_pos_ += OS::SNPrintF(out_buffer_ + out_buffer_pos_, 1610 out_buffer_pos_ += OS::SNPrintF(out_buffer_ + out_buffer_pos_,
1611 "pld [r%d, #-%d]", Rn, offset); 1611 "pld [r%d, #-%d]", Rn, offset);
1612 } else { 1612 } else {
1613 out_buffer_pos_ += OS::SNPrintF(out_buffer_ + out_buffer_pos_, 1613 out_buffer_pos_ += OS::SNPrintF(out_buffer_ + out_buffer_pos_,
1614 "pld [r%d, #+%d]", Rn, offset); 1614 "pld [r%d, #+%d]", Rn, offset);
1615 } 1615 }
1616 } else { 1616 } else {
1617 Unknown(instr); 1617 Unknown(instr);
1618 } 1618 }
1619 break; 1619 break;
1620 case 0x1D:
1621 if ((instr->Bits(21, 18) == 0xF) && (instr->Bits(11, 9) == 5) &&
1622 (instr->Bit(6) == 1) && (instr->Bit(4) == 0)) {
1623 // AArch32 vcvt instructions.
1624 int size = instr->Bit(8);
1625 int Vd = instr->VFPDRegValue(kSinglePrecision);
1626 int Vm = instr->VFPMRegValue(static_cast<VFPRegPrecision>(size));
1627 int rounding_mode = instr->Bits(17, 16);
1628 int data_type = instr->Bit(7);
1629 char rounding_name;
1630 switch (rounding_mode) {
1631 case kVcvtTiesToAway: rounding_name = 'a'; break;
1632 case kVcvtTiesToEven: rounding_name = 'n'; break;
1633 case kVcvtTowardPlusInfinity: rounding_name = 'p'; break;
1634 case kVcvtTowardMinusInfinity: rounding_name = 'm'; break;
1635 default: UNREACHABLE();
1636 }
1637 char data_name = (data_type == 0) ? 'u' : 's';
1638 if (size == 0) {
1639 out_buffer_pos_ +=
1640 OS::SNPrintF(out_buffer_ + out_buffer_pos_,
1641 "vcvt%c.%c32.f32 s%d, s%d", rounding_name, data_name,
1642 Vd, Vm);
1643 } else {
1644 out_buffer_pos_ +=
1645 OS::SNPrintF(out_buffer_ + out_buffer_pos_,
1646 "vcvt%c.%c32.f64 s%d, d%d", rounding_name, data_name,
1647 Vd, Vm);
1648 }
1649 } else {
1650 Unknown(instr);
1651 }
1652 break;
1620 default: 1653 default:
1621 Unknown(instr); 1654 Unknown(instr);
1622 break; 1655 break;
1623 } 1656 }
1624 } 1657 }
1625 1658
1626 #undef VERIFIY 1659 #undef VERIFIY
1627 1660
1628 bool Decoder::IsConstantPoolAt(byte* instr_ptr) { 1661 bool Decoder::IsConstantPoolAt(byte* instr_ptr) {
1629 int instruction_bits = *(reinterpret_cast<int*>(instr_ptr)); 1662 int instruction_bits = *(reinterpret_cast<int*>(instr_ptr));
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 v8::internal::PrintF( 1815 v8::internal::PrintF(
1783 f, "%p %08x %s\n", 1816 f, "%p %08x %s\n",
1784 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); 1817 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start());
1785 } 1818 }
1786 } 1819 }
1787 1820
1788 1821
1789 } // namespace disasm 1822 } // namespace disasm
1790 1823
1791 #endif // V8_TARGET_ARCH_ARM 1824 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/constants-arm.h ('k') | src/arm/simulator-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698