mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 05:28:56 +02:00
[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:
parent
69a84ee0a6
commit
77d83b008a
1 changed files with 8 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue