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

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

Issue 2602293002: [ARM] Add vcge, vcgt instructions to assembler. (Closed)
Patch Set: Fix some assembler comments. 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
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 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, 1893 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
1894 "vmul.i%d q%d, q%d, q%d", size, Vd, Vn, Vm); 1894 "vmul.i%d q%d, q%d, q%d", size, Vd, Vn, Vm);
1895 } else if (instr->Bits(21, 20) == 0 && instr->Bits(11, 8) == 0xe && 1895 } else if (instr->Bits(21, 20) == 0 && instr->Bits(11, 8) == 0xe &&
1896 instr->Bit(4) == 0) { 1896 instr->Bit(4) == 0) {
1897 int Vd = instr->VFPDRegValue(kSimd128Precision); 1897 int Vd = instr->VFPDRegValue(kSimd128Precision);
1898 int Vm = instr->VFPMRegValue(kSimd128Precision); 1898 int Vm = instr->VFPMRegValue(kSimd128Precision);
1899 int Vn = instr->VFPNRegValue(kSimd128Precision); 1899 int Vn = instr->VFPNRegValue(kSimd128Precision);
1900 // vceq.f32 Qd, Qm, Qn. 1900 // vceq.f32 Qd, Qm, Qn.
1901 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, 1901 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
1902 "vceq.f32 q%d, q%d, q%d", Vd, Vn, Vm); 1902 "vceq.f32 q%d, q%d, q%d", Vd, Vn, Vm);
1903 } else if (instr->Bits(11, 8) == 0x3) {
1904 int size = kBitsPerByte * (1 << instr->Bits(21, 20));
1905 int Vd = instr->VFPDRegValue(kSimd128Precision);
1906 int Vm = instr->VFPMRegValue(kSimd128Precision);
1907 int Vn = instr->VFPNRegValue(kSimd128Precision);
1908 const char* op = (instr->Bit(4) == 1) ? "vcge" : "vcgt";
1909 // vcge/vcgt.s<size> Qd, Qm, Qn.
1910 out_buffer_pos_ +=
1911 SNPrintF(out_buffer_ + out_buffer_pos_, "%s.s%d q%d, q%d, q%d", op,
1912 size, Vd, Vn, Vm);
1903 } else { 1913 } else {
1904 Unknown(instr); 1914 Unknown(instr);
1905 } 1915 }
1906 break; 1916 break;
1907 case 5: 1917 case 5:
1908 if ((instr->Bits(18, 16) == 0) && (instr->Bits(11, 6) == 0x28) && 1918 if ((instr->Bits(18, 16) == 0) && (instr->Bits(11, 6) == 0x28) &&
1909 (instr->Bit(4) == 1)) { 1919 (instr->Bit(4) == 1)) {
1910 // vmovl signed 1920 // vmovl signed
1911 if ((instr->VdValue() & 1) != 0) Unknown(instr); 1921 if ((instr->VdValue() & 1) != 0) Unknown(instr);
1912 int Vd = (instr->Bit(22) << 3) | (instr->VdValue() >> 1); 1922 int Vd = (instr->Bit(22) << 3) | (instr->VdValue() >> 1);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1968 "veor q%d, q%d, q%d", Vd, Vn, Vm); 1978 "veor q%d, q%d, q%d", Vd, Vn, Vm);
1969 } 1979 }
1970 } else if (instr->Bit(21) == 0 && instr->Bits(11, 8) == 0xd && 1980 } else if (instr->Bit(21) == 0 && instr->Bits(11, 8) == 0xd &&
1971 instr->Bit(6) == 1 && instr->Bit(4) == 1) { 1981 instr->Bit(6) == 1 && instr->Bit(4) == 1) {
1972 // vmul.f32 Qd, Qn, Qm 1982 // vmul.f32 Qd, Qn, Qm
1973 int Vd = instr->VFPDRegValue(kSimd128Precision); 1983 int Vd = instr->VFPDRegValue(kSimd128Precision);
1974 int Vn = instr->VFPNRegValue(kSimd128Precision); 1984 int Vn = instr->VFPNRegValue(kSimd128Precision);
1975 int Vm = instr->VFPMRegValue(kSimd128Precision); 1985 int Vm = instr->VFPMRegValue(kSimd128Precision);
1976 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, 1986 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
1977 "vmul.f32 q%d, q%d, q%d", Vd, Vn, Vm); 1987 "vmul.f32 q%d, q%d, q%d", Vd, Vn, Vm);
1988 } else if (instr->Bit(20) == 0 && instr->Bits(11, 8) == 0xe &&
1989 instr->Bit(4) == 0) {
1990 int Vd = instr->VFPDRegValue(kSimd128Precision);
1991 int Vm = instr->VFPMRegValue(kSimd128Precision);
1992 int Vn = instr->VFPNRegValue(kSimd128Precision);
1993 const char* op = (instr->Bit(21) == 0) ? "vcge" : "vcgt";
1994 // vcge/vcgt.f32 Qd, Qm, Qn.
1995 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
1996 "%s.f32 q%d, q%d, q%d", op, Vd, Vn, Vm);
1997 } else if (instr->Bits(11, 8) == 0x3) {
1998 int size = kBitsPerByte * (1 << instr->Bits(21, 20));
1999 int Vd = instr->VFPDRegValue(kSimd128Precision);
2000 int Vm = instr->VFPMRegValue(kSimd128Precision);
2001 int Vn = instr->VFPNRegValue(kSimd128Precision);
2002 const char* op = (instr->Bit(4) == 1) ? "vcge" : "vcgt";
2003 // vcge/vcgt.u<size> Qd, Qm, Qn.
2004 out_buffer_pos_ +=
2005 SNPrintF(out_buffer_ + out_buffer_pos_, "%s.u%d q%d, q%d, q%d", op,
2006 size, Vd, Vn, Vm);
1978 } else { 2007 } else {
1979 Unknown(instr); 2008 Unknown(instr);
1980 } 2009 }
1981 break; 2010 break;
1982 case 7: 2011 case 7:
1983 if ((instr->Bits(18, 16) == 0) && (instr->Bits(11, 6) == 0x28) && 2012 if ((instr->Bits(18, 16) == 0) && (instr->Bits(11, 6) == 0x28) &&
1984 (instr->Bit(4) == 1)) { 2013 (instr->Bit(4) == 1)) {
1985 // vmovl unsigned 2014 // vmovl unsigned
1986 if ((instr->VdValue() & 1) != 0) Unknown(instr); 2015 if ((instr->VdValue() & 1) != 0) Unknown(instr);
1987 int Vd = (instr->Bit(22) << 3) | (instr->VdValue() >> 1); 2016 int Vd = (instr->Bit(22) << 3) | (instr->VdValue() >> 1);
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
2423 pc += d.InstructionDecode(buffer, pc); 2452 pc += d.InstructionDecode(buffer, pc);
2424 v8::internal::PrintF(f, "%p %08x %s\n", static_cast<void*>(prev_pc), 2453 v8::internal::PrintF(f, "%p %08x %s\n", static_cast<void*>(prev_pc),
2425 *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); 2454 *reinterpret_cast<int32_t*>(prev_pc), buffer.start());
2426 } 2455 }
2427 } 2456 }
2428 2457
2429 2458
2430 } // namespace disasm 2459 } // namespace disasm
2431 2460
2432 #endif // V8_TARGET_ARCH_ARM 2461 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698