mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-02-25 16:22:57 +00:00
IR: Add IR type CoprocInfo
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user