V850 decompilation: GP is callee-saved and does not function correctly. As shown in the figure below, after the sub_28790 function, GP becomes undefined.
Hello,
Generally, on V850 gp is used as a global register. If this is not the case, enable the corresponding setting in the processor-specific options.
If it’s still not working as expected, please create a ticket on support.hex-ray.com and add a sample.
Thank you for the update. Could you please submit an issue with sample as requested?
xx.bin.i64.zip (2.1 MB)
sample function sub_287DC
Thank you. It seems the callee-saved option is a red herring, and gp is a standard global register in this binary, but its value is not used by the decompiler for some reason. We’ll investigate this.


