[dynarmic] avoid IsInmediate() comical call recursion (#3145)

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3145
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie 2025-12-09 05:28:01 +01:00 committed by crueter
parent 69a84ee0a6
commit 77d83b008a
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
1 changed files with 8 additions and 3 deletions

View File

@ -100,9 +100,14 @@ bool Value::IsEmpty() const noexcept {
}
bool Value::IsImmediate() const noexcept {
if (IsIdentity())
return inner.inst->GetArg(0).IsImmediate();
return type != Type::Opaque;
IR::Type current_type = type;
IR::Inst const* current_inst = inner.inst;
while (current_type == Type::Opaque && current_inst->GetOpcode() == Opcode::Identity) {
Value const& arg = current_inst->GetArg(0);
current_type = arg.type;
current_inst = arg.inner.inst;
}
return current_type != Type::Opaque;
}
Type Value::GetType() const noexcept {