mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-05 12:31:33 +00:00
Add shuffle decode support for VPERMQ/VPERMPD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156265 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8e27c96159
commit
156f5bb56e
@ -507,6 +507,16 @@ void llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
|
||||
Src1Name = getRegName(MI->getOperand(1).getReg());
|
||||
DestName = getRegName(MI->getOperand(0).getReg());
|
||||
break;
|
||||
case X86::VPERMQYri:
|
||||
case X86::VPERMPDYri:
|
||||
Src1Name = getRegName(MI->getOperand(1).getReg());
|
||||
// FALL THROUGH.
|
||||
case X86::VPERMQYmi:
|
||||
case X86::VPERMPDYmi:
|
||||
DecodeVPERMMask(MI->getOperand(MI->getNumOperands()-1).getImm(),
|
||||
ShuffleMask);
|
||||
DestName = getRegName(MI->getOperand(0).getReg());
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
@ -192,4 +192,12 @@ void DecodeVPERM2X128Mask(EVT VT, unsigned Imm,
|
||||
ShuffleMask.push_back(i);
|
||||
}
|
||||
|
||||
/// DecodeVPERMMask - this decodes the shuffle masks for VPERMQ/VPERMPD.
|
||||
/// No VT provided since it only works on 256-bit, 4 element vectors.
|
||||
void DecodeVPERMMask(unsigned Imm, SmallVectorImpl<int> &ShuffleMask) {
|
||||
for (unsigned i = 0; i != 4; ++i) {
|
||||
ShuffleMask.push_back((Imm >> (2*i)) & 3);
|
||||
}
|
||||
}
|
||||
|
||||
} // llvm namespace
|
||||
|
@ -60,6 +60,10 @@ void DecodeUNPCKLMask(EVT VT, SmallVectorImpl<int> &ShuffleMask);
|
||||
void DecodeVPERM2X128Mask(EVT VT, unsigned Imm,
|
||||
SmallVectorImpl<int> &ShuffleMask);
|
||||
|
||||
/// DecodeVPERMMask - this decodes the shuffle masks for VPERMQ/VPERMPD.
|
||||
/// No VT provided since it only works on 256-bit, 4 element vectors.
|
||||
void DecodeVPERMMask(unsigned Imm, SmallVectorImpl<int> &ShuffleMask);
|
||||
|
||||
} // llvm namespace
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user