Replies: 3 comments
-
He asked because he's working on some scripts that apply formal methods to the code flow, and the use of a context register there required some extra work to accommodate, compared to the other ways of changing flow that don't use a context register. He's already taken care of it in his script(s) so there's no urgency. But the question is still of some interest to me. |
Beta Was this translation helpful? Give feedback.
-
Are the instructions a fixed size? I think you would only be able to branch over the next instruction if you can calculate where to branch to. I struggled to do this for the rl78 as it is a cisc architecture. I ultimately had to use a context register but the decompiler breaks when the skipped instruction is branched to because the context is different. Other options were to use a delay slot but this is also a problem because it is very common for the skipped instruction to be a branch so that would cause an error bookmark and the flow to stop. I think a special skip implementation for sleigh would be nice. |
Beta Was this translation helpful? Give feedback.
-
@astrelsky, nearly all the instructions for this architecture are one instruction word long (the few exceptions all being two words long), but as you say, that may prevent the simplification of all the
Agreed. |
Beta Was this translation helpful? Give feedback.
-
A fellow employee asked me about the way Ghidra models these instructions.
What I see myself in the decompile looks reasonable, but maybe I'm missing something.
He didn't mention whether he saw something in the decompile that could be simpler, so I've just emailed him to ask about that.
Beta Was this translation helpful? Give feedback.
All reactions