mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2025-12-29 10:45:20 +01:00
IR: Add IR type CoprocInfo
This commit is contained in:
parent
890b2f75ad
commit
d8a37e287c
4 changed files with 19 additions and 3 deletions
|
|
@ -39,6 +39,10 @@ Value::Value(u64 value) : type(Type::U64) {
|
|||
inner.imm_u64 = value;
|
||||
}
|
||||
|
||||
Value::Value(std::array<u8, 8> value) : type(Type::CoprocInfo) {
|
||||
inner.imm_coproc = value;
|
||||
}
|
||||
|
||||
bool Value::IsImmediate() const {
|
||||
if (type == Type::Opaque)
|
||||
return inner.inst->GetOpcode() == Opcode::Identity ? inner.inst->GetArg(0).IsImmediate() : false;
|
||||
|
|
@ -103,5 +107,12 @@ u64 Value::GetU64() const {
|
|||
return inner.imm_u64;
|
||||
}
|
||||
|
||||
std::array<u8, 8> Value::GetCoprocInfo() const {
|
||||
if (type == Type::Opaque && inner.inst->GetOpcode() == Opcode::Identity)
|
||||
return inner.inst->GetArg(0).GetCoprocInfo();
|
||||
DEBUG_ASSERT(type == Type::CoprocInfo);
|
||||
return inner.imm_coproc;
|
||||
}
|
||||
|
||||
} // namespace IR
|
||||
} // namespace Dynarmic
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue