unicorn
unicorn copied to clipboard
Update RH850 code in staging
This PR updates the RH850 code in the staging branch - it's effectively my way of saying "I've reviewed the code", but there were a lot of changes to be made, so I decided make those changes, since https://github.com/unicorn-engine/unicorn/pull/1918 is a bit old and I didn't want to burden the author with dozens of comments :^).
The main highlights are:
- Cleaned up main RH850 header
- Removing unnecessary code that isn't used by unicorn
- Ensured that code hooks work (only block hook support was present)
- Ensured usage of the instance-specific
tcg_ctxfor all register manipulation, rather than static variables - Adjusted naming convention where it was inconsistent
- Cleaned up the test
@virtualabs if you have the time, it'd be great if you can take a look at these changes. If they look good to you, I'd consider RH850 ready. One question I had though is, why name it RH850 and not V850? From the little searching I did online, the RH850 cores are the same as the V850e3v5, so it'd make more sense to name this "V850" as that's the architecture, and then RH850/V850e3v5 is one cpu "model" that can be implemented (then, in theory, we could also support emulating v850e1/e2 chips as well).