ir: Add opcodes for unsigned saturating left shifts

This commit is contained in:
Lioncash 2018-09-18 18:09:47 -04:00 committed by MerryMage
parent ab60720418
commit d426dfe942
5 changed files with 76 additions and 0 deletions

View file

@ -1735,6 +1735,21 @@ U128 IREmitter::VectorUnsignedSaturatedNarrow(size_t esize, const U128& a) {
return {};
}
U128 IREmitter::VectorUnsignedSaturatedShiftLeft(size_t esize, const U128& a, const U128& b) {
switch (esize) {
case 8:
return Inst<U128>(Opcode::VectorUnsignedSaturatedShiftLeft8, a, b);
case 16:
return Inst<U128>(Opcode::VectorUnsignedSaturatedShiftLeft16, a, b);
case 32:
return Inst<U128>(Opcode::VectorUnsignedSaturatedShiftLeft32, a, b);
case 64:
return Inst<U128>(Opcode::VectorUnsignedSaturatedShiftLeft64, a, b);
}
UNREACHABLE();
return {};
}
U128 IREmitter::VectorZeroExtend(size_t original_esize, const U128& a) {
switch (original_esize) {
case 8: