mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-03-03 01:42:57 +00:00
IR: Implement Conditional Select
This commit is contained in:
@@ -91,6 +91,23 @@ U1 IREmitter::TestBit(const U32U64& value, const U8& bit) {
|
||||
}
|
||||
}
|
||||
|
||||
U32 IREmitter::ConditionalSelect(Cond cond, const U32& a, const U32& b) {
|
||||
return Inst<U32>(Opcode::ConditionalSelect32, Value{cond}, a, b);
|
||||
}
|
||||
|
||||
U64 IREmitter::ConditionalSelect(Cond cond, const U64& a, const U64& b) {
|
||||
return Inst<U64>(Opcode::ConditionalSelect64, Value{cond}, a, b);
|
||||
}
|
||||
|
||||
U32U64 IREmitter::ConditionalSelect(Cond cond, const U32U64& a, const U32U64& b) {
|
||||
ASSERT(a.GetType() == b.GetType());
|
||||
if (a.GetType() == Type::U32) {
|
||||
return Inst<U32>(Opcode::ConditionalSelect32, Value{cond}, a, b);
|
||||
} else {
|
||||
return Inst<U64>(Opcode::ConditionalSelect64, Value{cond}, a, b);
|
||||
}
|
||||
}
|
||||
|
||||
NZCV IREmitter::NZCVFrom(const Value& value) {
|
||||
return Inst<NZCV>(Opcode::GetNZCVFromOp, value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user