H8/300H normal mode implementation errors #6426
-
Hi, I am currently trying to implement H8/300H in ghidra and I am getting a couple of hard-to-debug issues The issueI am often getting a message in the decompiler panel saying "Offset must be between 0xffffffffffff8000 and 0x7fff, got 0xfffffffc instead!" (sceenshot) The behaviorThis architecture has a My definition for the call is
where pushpc is:
These are my definitions (make, make install): https://github.com/Thodoris1999/H8-38602R Additionally, what is the workflow to debug these errors? Is there a tool that does inspection and nice visualization of pcodes? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
As far as debugging the errors, there's a listing field for pcode that can be enabled. It shows the pcode for each instruction. That may be helpful for you. Hopefully that can indicate what could be causing that offset |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
I've never seen that error. A couple thoughts:
You can try adding
growth="negative"
to yourstackpointer
definition like so:<stackpointer register="er7" space="mem" growth="negative"/>
Second, I don't know anything about this architecture, but it seems strange to me that the stack pointer is 32-bits but you only use 16-bits to access the stack. I'm not sure how that works.