mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-05 18:22:57 +00:00
IR: Add ReplicateBit microinstruction
This commit is contained in:
@@ -469,6 +469,16 @@ U32U64 IREmitter::ExtractRegister(const U32U64& a, const U32U64& b, const U8& ls
|
||||
return Inst<U64>(Opcode::ExtractRegister64, a, b, lsb);
|
||||
}
|
||||
|
||||
U32U64 IREmitter::ReplicateBit(const U32U64& a, u8 bit) {
|
||||
if (a.GetType() == IR::Type::U32) {
|
||||
ASSERT(bit < 32);
|
||||
return Inst<U32>(Opcode::ReplicateBit32, a, Imm8(bit));
|
||||
}
|
||||
|
||||
ASSERT(bit < 64);
|
||||
return Inst<U64>(Opcode::ReplicateBit64, a, Imm8(bit));
|
||||
}
|
||||
|
||||
U32U64 IREmitter::MaxSigned(const U32U64& a, const U32U64& b) {
|
||||
if (a.GetType() == IR::Type::U32) {
|
||||
return Inst<U32>(Opcode::MaxSigned32, a, b);
|
||||
|
||||
@@ -152,6 +152,7 @@ public:
|
||||
U64 ByteReverseDual(const U64& a);
|
||||
U32U64 CountLeadingZeros(const U32U64& a);
|
||||
U32U64 ExtractRegister(const U32U64& a, const U32U64& b, const U8& lsb);
|
||||
U32U64 ReplicateBit(const U32U64& a, u8 bit);
|
||||
U32U64 MaxSigned(const U32U64& a, const U32U64& b);
|
||||
U32U64 MaxUnsigned(const U32U64& a, const U32U64& b);
|
||||
U32U64 MinSigned(const U32U64& a, const U32U64& b);
|
||||
|
||||
@@ -159,6 +159,8 @@ OPCODE(CountLeadingZeros32, U32, U32
|
||||
OPCODE(CountLeadingZeros64, U64, U64 )
|
||||
OPCODE(ExtractRegister32, U32, U32, U32, U8 )
|
||||
OPCODE(ExtractRegister64, U64, U64, U64, U8 )
|
||||
OPCODE(ReplicateBit32, U32, U32, U8 )
|
||||
OPCODE(ReplicateBit64, U64, U64, U8 )
|
||||
OPCODE(MaxSigned32, U32, U32, U32 )
|
||||
OPCODE(MaxSigned64, U64, U64, U64 )
|
||||
OPCODE(MaxUnsigned32, U32, U32, U32 )
|
||||
|
||||
Reference in New Issue
Block a user