mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2025-12-31 03:37:42 +01:00
IR: Implement Conditional Select
This commit is contained in:
parent
7992a319ba
commit
6395f09f94
9 changed files with 126 additions and 0 deletions
|
|
@ -55,6 +55,10 @@ Value::Value(std::array<u8, 8> value) : type(Type::CoprocInfo) {
|
|||
inner.imm_coproc = value;
|
||||
}
|
||||
|
||||
Value::Value(Cond value) : type(Type::Cond) {
|
||||
inner.imm_cond = value;
|
||||
}
|
||||
|
||||
bool Value::IsImmediate() const {
|
||||
if (type == Type::Opaque)
|
||||
return inner.inst->GetOpcode() == Opcode::Identity ? inner.inst->GetArg(0).IsImmediate() : false;
|
||||
|
|
@ -143,5 +147,12 @@ std::array<u8, 8> Value::GetCoprocInfo() const {
|
|||
return inner.imm_coproc;
|
||||
}
|
||||
|
||||
Cond Value::GetCond() const {
|
||||
if (type == Type::Opaque && inner.inst->GetOpcode() == Opcode::Identity)
|
||||
return inner.inst->GetArg(0).GetCond();
|
||||
ASSERT(type == Type::Cond);
|
||||
return inner.imm_cond;
|
||||
}
|
||||
|
||||
} // namespace IR
|
||||
} // namespace Dynarmic
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue