mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-09 07:22:56 +00:00
opcodes: Add 64-bit CountLeadingZeroes opcode
This commit is contained in:
@@ -427,7 +427,19 @@ U64 IREmitter::ByteReverseDual(const U64& a) {
|
||||
}
|
||||
|
||||
U32 IREmitter::CountLeadingZeros(const U32& a) {
|
||||
return Inst<U32>(Opcode::CountLeadingZeros, a);
|
||||
return Inst<U32>(Opcode::CountLeadingZeros32, a);
|
||||
}
|
||||
|
||||
U64 IREmitter::CountLeadingZeros(const U64& a) {
|
||||
return Inst<U64>(Opcode::CountLeadingZeros64, a);
|
||||
}
|
||||
|
||||
U32U64 IREmitter::CountLeadingZeros(const U32U64& a) {
|
||||
if (a.GetType() == IR::Type::U32) {
|
||||
return Inst<U32>(Opcode::CountLeadingZeros32, a);
|
||||
}
|
||||
|
||||
return Inst<U64>(Opcode::CountLeadingZeros64, a);
|
||||
}
|
||||
|
||||
ResultAndOverflow<U32> IREmitter::SignedSaturatedAdd(const U32& a, const U32& b) {
|
||||
|
||||
@@ -139,6 +139,8 @@ public:
|
||||
U16 ByteReverseHalf(const U16& a);
|
||||
U64 ByteReverseDual(const U64& a);
|
||||
U32 CountLeadingZeros(const U32& a);
|
||||
U64 CountLeadingZeros(const U64& a);
|
||||
U32U64 CountLeadingZeros(const U32U64& a);
|
||||
|
||||
ResultAndOverflow<U32> SignedSaturatedAdd(const U32& a, const U32& b);
|
||||
ResultAndOverflow<U32> SignedSaturatedSub(const U32& a, const U32& b);
|
||||
|
||||
@@ -115,7 +115,8 @@ OPCODE(ZeroExtendWordToLong, T::U64, T::U32
|
||||
OPCODE(ByteReverseWord, T::U32, T::U32 )
|
||||
OPCODE(ByteReverseHalf, T::U16, T::U16 )
|
||||
OPCODE(ByteReverseDual, T::U64, T::U64 )
|
||||
OPCODE(CountLeadingZeros, T::U32, T::U32 )
|
||||
OPCODE(CountLeadingZeros32, T::U32, T::U32 )
|
||||
OPCODE(CountLeadingZeros64, T::U64, T::U64 )
|
||||
|
||||
// Saturated instructions
|
||||
OPCODE(SignedSaturatedAdd, T::U32, T::U32, T::U32 )
|
||||
|
||||
Reference in New Issue
Block a user