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

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

Issue 2600153002: [ARM] Add vrecpe, vrecps, vrsqrte, vrsqrts instructions to assembler. (Closed)
Patch Set: Add a comment for vrecpe, vrsqrte. Created 3 years, 11 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/arm/assembler-arm.cc ('k') | src/arm/simulator-arm.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 // 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 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after
1892 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, 1892 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
1893 "vmul.i%d q%d, q%d, q%d", size, Vd, Vn, Vm); 1893 "vmul.i%d q%d, q%d, q%d", size, Vd, Vn, Vm);
1894 } else if (instr->Bits(21, 20) == 0 && instr->Bits(11, 8) == 0xe && 1894 } else if (instr->Bits(21, 20) == 0 && instr->Bits(11, 8) == 0xe &&
1895 instr->Bit(4) == 0) { 1895 instr->Bit(4) == 0) {
1896 int Vd = instr->VFPDRegValue(kSimd128Precision); 1896 int Vd = instr->VFPDRegValue(kSimd128Precision);
1897 int Vm = instr->VFPMRegValue(kSimd128Precision); 1897 int Vm = instr->VFPMRegValue(kSimd128Precision);
1898 int Vn = instr->VFPNRegValue(kSimd128Precision); 1898 int Vn = instr->VFPNRegValue(kSimd128Precision);
1899 // vceq.f32 Qd, Qm, Qn. 1899 // vceq.f32 Qd, Qm, Qn.
1900 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, 1900 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
1901 "vceq.f32 q%d, q%d, q%d", Vd, Vn, Vm); 1901 "vceq.f32 q%d, q%d, q%d", Vd, Vn, Vm);
1902 } else if (instr->Bit(20) == 0 && instr->Bits(11, 8) == 0xf &&
1903 instr->Bit(6) == 1 && instr->Bit(4) == 1) {
1904 int Vd = instr->VFPDRegValue(kSimd128Precision);
1905 int Vm = instr->VFPMRegValue(kSimd128Precision);
1906 int Vn = instr->VFPNRegValue(kSimd128Precision);
1907 const char* op = instr->Bit(21) == 0 ? "vrecps" : "vrsqrts";
1908 // vrecps/vrsqrts.f32 Qd, Qm, Qn.
1909 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
1910 "%s.f32 q%d, q%d, q%d", op, Vd, Vn, Vm);
1902 } else { 1911 } else {
1903 Unknown(instr); 1912 Unknown(instr);
1904 } 1913 }
1905 break; 1914 break;
1906 case 5: 1915 case 5:
1907 if ((instr->Bits(18, 16) == 0) && (instr->Bits(11, 6) == 0x28) && 1916 if ((instr->Bits(18, 16) == 0) && (instr->Bits(11, 6) == 0x28) &&
1908 (instr->Bit(4) == 1)) { 1917 (instr->Bit(4) == 1)) {
1909 // vmovl signed 1918 // vmovl signed
1910 if ((instr->VdValue() & 1) != 0) Unknown(instr); 1919 if ((instr->VdValue() & 1) != 0) Unknown(instr);
1911 int Vd = (instr->Bit(22) << 3) | (instr->VdValue() >> 1); 1920 int Vd = (instr->Bit(22) << 3) | (instr->VdValue() >> 1);
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
2074 SNPrintF(out_buffer_ + out_buffer_pos_, "vabs.%s%d q%d, q%d", 2083 SNPrintF(out_buffer_ + out_buffer_pos_, "vabs.%s%d q%d, q%d",
2075 type, size, Vd, Vm); 2084 type, size, Vd, Vm);
2076 } else if (instr->Bits(9, 6) == 0xf) { 2085 } else if (instr->Bits(9, 6) == 0xf) {
2077 // vneg<type>.<size> Qd, Qm. 2086 // vneg<type>.<size> Qd, Qm.
2078 out_buffer_pos_ += 2087 out_buffer_pos_ +=
2079 SNPrintF(out_buffer_ + out_buffer_pos_, "vneg.%s%d q%d, q%d", 2088 SNPrintF(out_buffer_ + out_buffer_pos_, "vneg.%s%d q%d, q%d",
2080 type, size, Vd, Vm); 2089 type, size, Vd, Vm);
2081 } else { 2090 } else {
2082 Unknown(instr); 2091 Unknown(instr);
2083 } 2092 }
2093 } else if (instr->Bits(19, 18) == 0x2 && instr->Bits(11, 8) == 0x5) {
2094 int Vd = instr->VFPDRegValue(kSimd128Precision);
2095 int Vm = instr->VFPMRegValue(kSimd128Precision);
2096 const char* op = instr->Bit(7) == 0 ? "vrecpe" : "vrsqrte";
2097 // vrecpe/vrsqrte.f32 Qd, Qm.
2098 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
2099 "%s.f32 q%d, q%d", op, Vd, Vm);
2084 } else { 2100 } else {
2085 Unknown(instr); 2101 Unknown(instr);
2086 } 2102 }
2087 } else { 2103 } else {
2088 Unknown(instr); 2104 Unknown(instr);
2089 } 2105 }
2090 break; 2106 break;
2091 case 8: 2107 case 8:
2092 if (instr->Bits(21, 20) == 0) { 2108 if (instr->Bits(21, 20) == 0) {
2093 // vst1 2109 // vst1
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
2422 pc += d.InstructionDecode(buffer, pc); 2438 pc += d.InstructionDecode(buffer, pc);
2423 v8::internal::PrintF(f, "%p %08x %s\n", static_cast<void*>(prev_pc), 2439 v8::internal::PrintF(f, "%p %08x %s\n", static_cast<void*>(prev_pc),
2424 *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); 2440 *reinterpret_cast<int32_t*>(prev_pc), buffer.start());
2425 } 2441 }
2426 } 2442 }
2427 2443
2428 2444
2429 } // namespace disasm 2445 } // namespace disasm
2430 2446
2431 #endif // V8_TARGET_ARCH_ARM 2447 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | src/arm/simulator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698