mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-02-18 22:42:58 +00:00
ir: Add opcodes for left signed saturated shifts
This commit is contained in:
@@ -1646,6 +1646,21 @@ U128 IREmitter::VectorSignedSaturatedNeg(size_t esize, const U128& a) {
|
||||
return {};
|
||||
}
|
||||
|
||||
U128 IREmitter::VectorSignedSaturatedShiftLeft(size_t esize, const U128& a, const U128& b) {
|
||||
switch (esize) {
|
||||
case 8:
|
||||
return Inst<U128>(Opcode::VectorSignedSaturatedShiftLeft8, a, b);
|
||||
case 16:
|
||||
return Inst<U128>(Opcode::VectorSignedSaturatedShiftLeft16, a, b);
|
||||
case 32:
|
||||
return Inst<U128>(Opcode::VectorSignedSaturatedShiftLeft32, a, b);
|
||||
case 64:
|
||||
return Inst<U128>(Opcode::VectorSignedSaturatedShiftLeft64, a, b);
|
||||
}
|
||||
UNREACHABLE();
|
||||
return {};
|
||||
}
|
||||
|
||||
U128 IREmitter::VectorSub(size_t esize, const U128& a, const U128& b) {
|
||||
switch (esize) {
|
||||
case 8:
|
||||
|
||||
@@ -278,6 +278,7 @@ public:
|
||||
U128 VectorSignedSaturatedNarrowToSigned(size_t original_esize, const U128& a);
|
||||
U128 VectorSignedSaturatedNarrowToUnsigned(size_t original_esize, const U128& a);
|
||||
U128 VectorSignedSaturatedNeg(size_t esize, const U128& a);
|
||||
U128 VectorSignedSaturatedShiftLeft(size_t esize, const U128& a, const U128& b);
|
||||
U128 VectorSub(size_t esize, const U128& a, const U128& b);
|
||||
Table VectorTable(std::vector<U128> values);
|
||||
U128 VectorTableLookup(const U128& defaults, const Table& table, const U128& indices);
|
||||
|
||||
@@ -369,6 +369,10 @@ bool Inst::WritesToFPSRCumulativeSaturationBit() const {
|
||||
case Opcode::VectorSignedSaturatedNeg16:
|
||||
case Opcode::VectorSignedSaturatedNeg32:
|
||||
case Opcode::VectorSignedSaturatedNeg64:
|
||||
case Opcode::VectorSignedSaturatedShiftLeft8:
|
||||
case Opcode::VectorSignedSaturatedShiftLeft16:
|
||||
case Opcode::VectorSignedSaturatedShiftLeft32:
|
||||
case Opcode::VectorSignedSaturatedShiftLeft64:
|
||||
case Opcode::VectorUnsignedSaturatedAccumulateSigned8:
|
||||
case Opcode::VectorUnsignedSaturatedAccumulateSigned16:
|
||||
case Opcode::VectorUnsignedSaturatedAccumulateSigned32:
|
||||
|
||||
@@ -422,6 +422,10 @@ OPCODE(VectorSignedSaturatedNeg8, U128, U128
|
||||
OPCODE(VectorSignedSaturatedNeg16, U128, U128 )
|
||||
OPCODE(VectorSignedSaturatedNeg32, U128, U128 )
|
||||
OPCODE(VectorSignedSaturatedNeg64, U128, U128 )
|
||||
OPCODE(VectorSignedSaturatedShiftLeft8, U128, U128, U128 )
|
||||
OPCODE(VectorSignedSaturatedShiftLeft16, U128, U128, U128 )
|
||||
OPCODE(VectorSignedSaturatedShiftLeft32, U128, U128, U128 )
|
||||
OPCODE(VectorSignedSaturatedShiftLeft64, U128, U128, U128 )
|
||||
OPCODE(VectorSub8, U128, U128, U128 )
|
||||
OPCODE(VectorSub16, U128, U128, U128 )
|
||||
OPCODE(VectorSub32, U128, U128, U128 )
|
||||
|
||||
Reference in New Issue
Block a user