mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-02-18 22:42:58 +00:00
ir: Add opcodes for unsigned saturating left shifts
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -287,6 +287,7 @@ public:
|
||||
U128 VectorUnsignedRecipSqrtEstimate(const U128& a);
|
||||
U128 VectorUnsignedSaturatedAccumulateSigned(size_t esize, const U128& a, const U128& b);
|
||||
U128 VectorUnsignedSaturatedNarrow(size_t esize, const U128& a);
|
||||
U128 VectorUnsignedSaturatedShiftLeft(size_t esize, const U128& a, const U128& b);
|
||||
U128 VectorZeroExtend(size_t original_esize, const U128& a);
|
||||
U128 VectorZeroUpper(const U128& a);
|
||||
U128 ZeroVector();
|
||||
|
||||
@@ -380,6 +380,10 @@ bool Inst::WritesToFPSRCumulativeSaturationBit() const {
|
||||
case Opcode::VectorUnsignedSaturatedNarrow16:
|
||||
case Opcode::VectorUnsignedSaturatedNarrow32:
|
||||
case Opcode::VectorUnsignedSaturatedNarrow64:
|
||||
case Opcode::VectorUnsignedSaturatedShiftLeft8:
|
||||
case Opcode::VectorUnsignedSaturatedShiftLeft16:
|
||||
case Opcode::VectorUnsignedSaturatedShiftLeft32:
|
||||
case Opcode::VectorUnsignedSaturatedShiftLeft64:
|
||||
return true;
|
||||
|
||||
default:
|
||||
|
||||
@@ -446,6 +446,10 @@ OPCODE(VectorUnsignedSaturatedAccumulateSigned64, U128, U128
|
||||
OPCODE(VectorUnsignedSaturatedNarrow16, U128, U128 )
|
||||
OPCODE(VectorUnsignedSaturatedNarrow32, U128, U128 )
|
||||
OPCODE(VectorUnsignedSaturatedNarrow64, U128, U128 )
|
||||
OPCODE(VectorUnsignedSaturatedShiftLeft8, U128, U128, U128 )
|
||||
OPCODE(VectorUnsignedSaturatedShiftLeft16, U128, U128, U128 )
|
||||
OPCODE(VectorUnsignedSaturatedShiftLeft32, U128, U128, U128 )
|
||||
OPCODE(VectorUnsignedSaturatedShiftLeft64, U128, U128, U128 )
|
||||
OPCODE(VectorZeroExtend8, U128, U128 )
|
||||
OPCODE(VectorZeroExtend16, U128, U128 )
|
||||
OPCODE(VectorZeroExtend32, U128, U128 )
|
||||
|
||||
Reference in New Issue
Block a user