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

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

Issue 2804883008: [WASM SIMD] Implement horizontal add for float and integer types. (Closed)
Patch Set: Rebase, reformat. Created 3 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/arm/constants-arm.h ('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 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after
1943 break; 1943 break;
1944 } 1944 }
1945 case 0xa: { 1945 case 0xa: {
1946 // vpmin/vpmax.s<size> Dd, Dm, Dn. 1946 // vpmin/vpmax.s<size> Dd, Dm, Dn.
1947 const char* op = instr->Bit(4) == 1 ? "vpmin" : "vpmax"; 1947 const char* op = instr->Bit(4) == 1 ? "vpmin" : "vpmax";
1948 out_buffer_pos_ += 1948 out_buffer_pos_ +=
1949 SNPrintF(out_buffer_ + out_buffer_pos_, "%s.s%d d%d, d%d, d%d", 1949 SNPrintF(out_buffer_ + out_buffer_pos_, "%s.s%d d%d, d%d, d%d",
1950 op, size, Vd, Vn, Vm); 1950 op, size, Vd, Vn, Vm);
1951 break; 1951 break;
1952 } 1952 }
1953 case 0xb: {
1954 // vpadd.i<size> Dd, Dm, Dn.
1955 out_buffer_pos_ +=
1956 SNPrintF(out_buffer_ + out_buffer_pos_, "vpadd.i%d d%d, d%d, d%d",
1957 size, Vd, Vn, Vm);
1958 break;
1959 }
1953 case 0xd: { 1960 case 0xd: {
1954 if (instr->Bit(4) == 0) { 1961 if (instr->Bit(4) == 0) {
1955 const char* op = (instr->Bits(21, 20) == 0) ? "vadd" : "vsub"; 1962 const char* op = (instr->Bits(21, 20) == 0) ? "vadd" : "vsub";
1956 // vadd/vsub.f32 Qd, Qm, Qn. 1963 // vadd/vsub.f32 Qd, Qm, Qn.
1957 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, 1964 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
1958 "%s.f32 q%d, q%d, q%d", op, Vd, Vn, Vm); 1965 "%s.f32 q%d, q%d, q%d", op, Vd, Vn, Vm);
1959 } else { 1966 } else {
1960 Unknown(instr); 1967 Unknown(instr);
1961 } 1968 }
1962 break; 1969 break;
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 } 2130 }
2124 case 0xa: { 2131 case 0xa: {
2125 // vpmin/vpmax.u<size> Dd, Dm, Dn. 2132 // vpmin/vpmax.u<size> Dd, Dm, Dn.
2126 const char* op = instr->Bit(4) == 1 ? "vpmin" : "vpmax"; 2133 const char* op = instr->Bit(4) == 1 ? "vpmin" : "vpmax";
2127 out_buffer_pos_ += 2134 out_buffer_pos_ +=
2128 SNPrintF(out_buffer_ + out_buffer_pos_, "%s.u%d d%d, d%d, d%d", 2135 SNPrintF(out_buffer_ + out_buffer_pos_, "%s.u%d d%d, d%d, d%d",
2129 op, size, Vd, Vn, Vm); 2136 op, size, Vd, Vn, Vm);
2130 break; 2137 break;
2131 } 2138 }
2132 case 0xd: { 2139 case 0xd: {
2133 if (instr->Bit(21) == 0 && instr->Bit(6) == 1 && instr->Bit(4) == 1) { 2140 if (instr->Bits(21, 20) == 0 && instr->Bit(6) == 1 &&
2134 // vmul.f32 Qd, Qn, Qm 2141 instr->Bit(4) == 1) {
2142 // vmul.f32 Qd, Qm, Qn
2135 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, 2143 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
2136 "vmul.f32 q%d, q%d, q%d", Vd, Vn, Vm); 2144 "vmul.f32 q%d, q%d, q%d", Vd, Vn, Vm);
2145 } else if (instr->Bits(21, 20) == 0 && instr->Bit(6) == 0 &&
2146 instr->Bit(4) == 0) {
2147 // vpadd.f32 Dd, Dm, Dn.
2148 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
2149 "vpadd.f32 d%d, d%d, d%d", Vd, Vn, Vm);
2137 } else { 2150 } else {
2138 Unknown(instr); 2151 Unknown(instr);
2139 } 2152 }
2140 break; 2153 break;
2141 } 2154 }
2142 case 0xe: { 2155 case 0xe: {
2143 if (instr->Bit(20) == 0 && instr->Bit(4) == 0) { 2156 if (instr->Bit(20) == 0 && instr->Bit(4) == 0) {
2144 const char* op = (instr->Bit(21) == 0) ? "vcge" : "vcgt"; 2157 const char* op = (instr->Bit(21) == 0) ? "vcge" : "vcgt";
2145 // vcge/vcgt.f32 Qd, Qm, Qn. 2158 // vcge/vcgt.f32 Qd, Qm, Qn.
2146 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, 2159 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
2641 pc += d.InstructionDecode(buffer, pc); 2654 pc += d.InstructionDecode(buffer, pc);
2642 v8::internal::PrintF(f, "%p %08x %s\n", static_cast<void*>(prev_pc), 2655 v8::internal::PrintF(f, "%p %08x %s\n", static_cast<void*>(prev_pc),
2643 *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); 2656 *reinterpret_cast<int32_t*>(prev_pc), buffer.start());
2644 } 2657 }
2645 } 2658 }
2646 2659
2647 2660
2648 } // namespace disasm 2661 } // namespace disasm
2649 2662
2650 #endif // V8_TARGET_ARCH_ARM 2663 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/constants-arm.h ('k') | src/arm/simulator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698