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

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

Issue 2602293002: [ARM] Add vcge, vcgt instructions to assembler. (Closed)
Patch Set: Rebase. 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->Bits(11, 8) == 0x3) {
1903 int size = kBitsPerByte * (1 << instr->Bits(21, 20));
1904 int Vd = instr->VFPDRegValue(kSimd128Precision);
1905 int Vm = instr->VFPMRegValue(kSimd128Precision);
1906 int Vn = instr->VFPNRegValue(kSimd128Precision);
1907 const char* op = (instr->Bit(4) == 1) ? "vcge" : "vcgt";
1908 // vcge/vcgt.s<size> Qd, Qm, Qn.
1909 out_buffer_pos_ +=
1910 SNPrintF(out_buffer_ + out_buffer_pos_, "%s.s%d q%d, q%d, q%d", op,
1911 size, Vd, Vn, Vm);
1902 } else if (instr->Bit(20) == 0 && instr->Bits(11, 8) == 0xf && 1912 } else if (instr->Bit(20) == 0 && instr->Bits(11, 8) == 0xf &&
1903 instr->Bit(6) == 1 && instr->Bit(4) == 1) { 1913 instr->Bit(6) == 1 && instr->Bit(4) == 1) {
1904 int Vd = instr->VFPDRegValue(kSimd128Precision); 1914 int Vd = instr->VFPDRegValue(kSimd128Precision);
1905 int Vm = instr->VFPMRegValue(kSimd128Precision); 1915 int Vm = instr->VFPMRegValue(kSimd128Precision);
1906 int Vn = instr->VFPNRegValue(kSimd128Precision); 1916 int Vn = instr->VFPNRegValue(kSimd128Precision);
1907 const char* op = instr->Bit(21) == 0 ? "vrecps" : "vrsqrts"; 1917 const char* op = instr->Bit(21) == 0 ? "vrecps" : "vrsqrts";
1908 // vrecps/vrsqrts.f32 Qd, Qm, Qn. 1918 // vrecps/vrsqrts.f32 Qd, Qm, Qn.
1909 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, 1919 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
1910 "%s.f32 q%d, q%d, q%d", op, Vd, Vn, Vm); 1920 "%s.f32 q%d, q%d, q%d", op, Vd, Vn, Vm);
1911 } else { 1921 } else {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1976 "veor q%d, q%d, q%d", Vd, Vn, Vm); 1986 "veor q%d, q%d, q%d", Vd, Vn, Vm);
1977 } 1987 }
1978 } else if (instr->Bit(21) == 0 && instr->Bits(11, 8) == 0xd && 1988 } else if (instr->Bit(21) == 0 && instr->Bits(11, 8) == 0xd &&
1979 instr->Bit(6) == 1 && instr->Bit(4) == 1) { 1989 instr->Bit(6) == 1 && instr->Bit(4) == 1) {
1980 // vmul.f32 Qd, Qn, Qm 1990 // vmul.f32 Qd, Qn, Qm
1981 int Vd = instr->VFPDRegValue(kSimd128Precision); 1991 int Vd = instr->VFPDRegValue(kSimd128Precision);
1982 int Vn = instr->VFPNRegValue(kSimd128Precision); 1992 int Vn = instr->VFPNRegValue(kSimd128Precision);
1983 int Vm = instr->VFPMRegValue(kSimd128Precision); 1993 int Vm = instr->VFPMRegValue(kSimd128Precision);
1984 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, 1994 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
1985 "vmul.f32 q%d, q%d, q%d", Vd, Vn, Vm); 1995 "vmul.f32 q%d, q%d, q%d", Vd, Vn, Vm);
1996 } else if (instr->Bit(20) == 0 && instr->Bits(11, 8) == 0xe &&
1997 instr->Bit(4) == 0) {
1998 int Vd = instr->VFPDRegValue(kSimd128Precision);
1999 int Vm = instr->VFPMRegValue(kSimd128Precision);
2000 int Vn = instr->VFPNRegValue(kSimd128Precision);
2001 const char* op = (instr->Bit(21) == 0) ? "vcge" : "vcgt";
2002 // vcge/vcgt.f32 Qd, Qm, Qn.
2003 out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
2004 "%s.f32 q%d, q%d, q%d", op, Vd, Vn, Vm);
2005 } else if (instr->Bits(11, 8) == 0x3) {
2006 int size = kBitsPerByte * (1 << instr->Bits(21, 20));
2007 int Vd = instr->VFPDRegValue(kSimd128Precision);
2008 int Vm = instr->VFPMRegValue(kSimd128Precision);
2009 int Vn = instr->VFPNRegValue(kSimd128Precision);
2010 const char* op = (instr->Bit(4) == 1) ? "vcge" : "vcgt";
2011 // vcge/vcgt.u<size> Qd, Qm, Qn.
2012 out_buffer_pos_ +=
2013 SNPrintF(out_buffer_ + out_buffer_pos_, "%s.u%d q%d, q%d, q%d", op,
2014 size, Vd, Vn, Vm);
1986 } else { 2015 } else {
1987 Unknown(instr); 2016 Unknown(instr);
1988 } 2017 }
1989 break; 2018 break;
1990 case 7: 2019 case 7:
1991 if ((instr->Bits(18, 16) == 0) && (instr->Bits(11, 6) == 0x28) && 2020 if ((instr->Bits(18, 16) == 0) && (instr->Bits(11, 6) == 0x28) &&
1992 (instr->Bit(4) == 1)) { 2021 (instr->Bit(4) == 1)) {
1993 // vmovl unsigned 2022 // vmovl unsigned
1994 if ((instr->VdValue() & 1) != 0) Unknown(instr); 2023 if ((instr->VdValue() & 1) != 0) Unknown(instr);
1995 int Vd = (instr->Bit(22) << 3) | (instr->VdValue() >> 1); 2024 int Vd = (instr->Bit(22) << 3) | (instr->VdValue() >> 1);
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
2438 pc += d.InstructionDecode(buffer, pc); 2467 pc += d.InstructionDecode(buffer, pc);
2439 v8::internal::PrintF(f, "%p %08x %s\n", static_cast<void*>(prev_pc), 2468 v8::internal::PrintF(f, "%p %08x %s\n", static_cast<void*>(prev_pc),
2440 *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); 2469 *reinterpret_cast<int32_t*>(prev_pc), buffer.start());
2441 } 2470 }
2442 } 2471 }
2443 2472
2444 2473
2445 } // namespace disasm 2474 } // namespace disasm
2446 2475
2447 #endif // V8_TARGET_ARCH_ARM 2476 #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