Instruction Parsing Problems
Kneesnap opened this issue · 10 comments
These are all correct. They are simplified. For example daddu v0, zero, zero
is v0 = 0 + 0
which is the same as dmove v0, 0
or
v0 = 0
dmove is not a valid instruction in the emotion engine though. That's the problem.
I think it would be nice to have an option to disable those macros.
I don't think it would be very easy to add an option to enable/disable these instructions because of how sleigh works, but I might be wrong.
They were borrowed from other instruction sets to simplify the decompilation results, similar to what pcsx2 has in their debugger. I never intended for the decompiled output from this extension to be reused, but if people will find it more useful to use the strict instruction set then it can be changed.
We could remove them as they may no longer be required - but, my guess is that it would be a breaking change and might break existing projects.
Edit: upon further investigation, we could make this pseudo instructions optional using a flag.
Just because it shows up in an emulator doesn't mean it's valid. Neither the official PS2 instruction set documentation, nor the PS2SDK recognize either
qmove
ordmove
as valid instructions.
Just as a reference, PCSX2's debugger was implemented by the same person that made armips, and as such it has some macros defined, but you can still view the un-macro'd instrunctions (and the bytes they are decoded from) by pressing tab in the assembly view
I don't think it would be very easy to add an option to enable/disable these instructions because of how sleigh works, but I might be wrong.
They were borrowed from other instruction sets to simplify the decompilation results, similar to what pcsx2 has in their debugger. I never intended for the decompiled output from this extension to be reused, but if people will find it more useful to use the strict instruction set then it can be changed.We could remove them as they may no longer be required - but, my guess is that it would be a breaking change and might break existing projects.
Edit: upon further investigation, we could make this pseudo instructions optional using a flag.
We could. Not sure if we mean the same thing, but we could also use the context register. You would need to redisassemble to see the changes though.