Currently Ghidra allows partially customizing the calling convention for any given function (Edit Function Signature), but only the part related to arguments and the return value. It would be useful to be able to also override the killed register list.
This can be accomplished by defining a new custom calling convention in e.g. Ghidra/Processors/x86/data/languages/x86win.cspec, but it would be nice to be able to do one-off changes. For example, a __chkesp() function call is inserted at the end of many functions by the compiler, and this function does not clobber floating-point registers; however, the calling conventions available by default all kill ST0, which breaks data-flow analysis for any function that returns a float and calls __chkesp() before returning. A one-off override for __chkesp() would solve this more cleanly.
Also want this. But fully edit/create calling conventions too.
Would a PR that adds a Calling Convention Manager be accepted? There are so many things out there with weird calling conventions that this would be immensely useful for.
Most helpful comment
Would a PR that adds a Calling Convention Manager be accepted? There are so many things out there with weird calling conventions that this would be immensely useful for.