Chromium Code Reviews| Index: src/arm/disasm-arm.cc |
| diff --git a/src/arm/disasm-arm.cc b/src/arm/disasm-arm.cc |
| index 225cd7b41197163c5a4bb2d2885d216619e9889c..9aac9721ee30dcd4b356d60a2b380fd35ed72f78 100644 |
| --- a/src/arm/disasm-arm.cc |
| +++ b/src/arm/disasm-arm.cc |
| @@ -2181,11 +2181,30 @@ void Decoder::DecodeSpecialCondition(Instruction* instr) { |
| "vmovl.u%d q%d, d%d", imm3 * 8, Vd, Vm); |
| } else if (instr->Opc1Value() == 7 && instr->Bit(4) == 0) { |
| if (instr->Bits(11, 7) == 0x18) { |
| - int Vd = instr->VFPDRegValue(kSimd128Precision); |
| int Vm = instr->VFPMRegValue(kDoublePrecision); |
| - int index = instr->Bit(19); |
| - out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, |
| - "vdup q%d, d%d[%d]", Vd, Vm, index); |
| + int imm4 = instr->Bits(19, 16); |
| + int size = 0, index = 0; |
| + if ((imm4 & 0x1) != 0) { |
| + size = 8; |
| + index = imm4 >> 1; |
| + } else if ((imm4 & 0x2) != 0) { |
| + size = 16; |
| + index = imm4 >> 2; |
| + } else { |
| + size = 32; |
| + index = imm4 >> 3; |
| + } |
| + if (instr->Bit(6) == 0) { |
| + int Vd = instr->VFPDRegValue(kDoublePrecision); |
| + out_buffer_pos_ += |
| + SNPrintF(out_buffer_ + out_buffer_pos_, "vdup.%i d%d, d%d[%d]", |
| + size, Vd, Vm, index); |
| + } else { |
| + int Vd = instr->VFPDRegValue(kSimd128Precision); |
| + out_buffer_pos_ += |
| + SNPrintF(out_buffer_ + out_buffer_pos_, "vdup.%i q%d, d%d[%d]", |
| + size, Vd, Vm, index); |
| + } |
| } else if (instr->Bits(11, 10) == 0x2) { |
| int Vd = instr->VFPDRegValue(kDoublePrecision); |
| int Vn = instr->VFPNRegValue(kDoublePrecision); |
| @@ -2316,6 +2335,30 @@ void Decoder::DecodeSpecialCondition(Instruction* instr) { |
| out_buffer_pos_ += |
| SNPrintF(out_buffer_ + out_buffer_pos_, "vshr.u%d q%d, q%d, #%d", |
| size, Vd, Vm, shift); |
| + } else if (instr->Bits(11, 8) == 0x5 && instr->Bit(6) == 0 && |
|
martyn.capewell
2017/05/10 12:38:06
Consider combining these - bit 8 determines how sh
bbudge
2017/05/10 17:54:52
That occurred to me too. I think it's a good idea.
|
| + instr->Bit(4) == 1) { |
| + // vsli.<size> Dd, Dm, shift |
| + int imm7 = instr->Bits(21, 16); |
| + if (instr->Bit(7) != 0) imm7 += 64; |
| + int size = base::bits::RoundDownToPowerOfTwo32(imm7); |
| + int shift = imm7 - size; |
| + int Vd = instr->VFPDRegValue(kDoublePrecision); |
| + int Vm = instr->VFPMRegValue(kDoublePrecision); |
| + out_buffer_pos_ += |
| + SNPrintF(out_buffer_ + out_buffer_pos_, "vsli.%d d%d, d%d, #%d", |
| + size, Vd, Vm, shift); |
| + } else if (instr->Bits(11, 8) == 0x4 && instr->Bit(6) == 0 && |
| + instr->Bit(4) == 1) { |
| + // vsri.<size> Dd, Dm, shift |
| + int imm7 = instr->Bits(21, 16); |
| + if (instr->Bit(7) != 0) imm7 += 64; |
| + int size = base::bits::RoundDownToPowerOfTwo32(imm7); |
| + int shift = 2 * size - imm7; |
| + int Vd = instr->VFPDRegValue(kDoublePrecision); |
| + int Vm = instr->VFPMRegValue(kDoublePrecision); |
| + out_buffer_pos_ += |
| + SNPrintF(out_buffer_ + out_buffer_pos_, "vsri.%d d%d, d%d, #%d", |
| + size, Vd, Vm, shift); |
| } else { |
| Unknown(instr); |
| } |