mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-08 15:38:19 +01:00
IR: Implement Conditional Select
This commit is contained in:
parent
7992a319ba
commit
6395f09f94
9 changed files with 126 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue