Renesas: Strange commands with an underscore sign. Watch out!

If you are working on mapswitching in Ghidra, you are probably also doing something for Japanese cars, where very often the ECU is based on a Renesas microcontroller (various models).
My students make their own attempts before they start learning with me. I have noticed that the most common problem and cause of failure is not understanding the commands preceded by an underscore: ‘_nop, _add, _mov, _extu, _mulr’ etc.).
Often the first attempts were made on drivers from Tricore, or others with purely sequential writing. What is above - is done first.
Here, unfortunately, it is different. To speed up the processor, Renesas added the following possibility to the core - two commands can be processed at once (some), whereby if the second one is written with ‘_’, it will be executed first.
So if the second one is ‘_nop’ it doesn't change anything, of course. Any other function, on the other hand, does. We have to treat it as if it were written above its predecessor.
Watch out for this - it's a really common error with Renesas analysis!

Thomas
Created with