You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For [variadic] functions, we pass the named (and typed) parameters in the same manner as for fixed argument list functions. The remainder of the arguments are passed on the stack.
This calling convention differs from most calling conventions I've seen in other architectures, for example:
intsnprintf(char*str, char*format, ...);
The first argument str is passed in r0. The second argument format is passed in r1. All subsequent (variadic) arguments are passed on the stack. Whereas the calling convention for ARM would be to enregister all variadic arguments as well.
Describe the solution you'd like
I'd like the cspec to have an extra field to denote that variadic arguments are put on the stack
Alternatively, I'd like to be able to specify a function signature override that can specify custom storage in an Analyzer or from the GUI
Alternatively, I'd like to be able to create a completely custom function prototype/calling convention in an Analyzer so I could create a new calling convention for each variadic function
Is your feature request related to a problem? Please describe.
The Qualcomm Hexagon Application Binary Interface specifies a unique calling convention for functions that take variadic arguments:
This calling convention differs from most calling conventions I've seen in other architectures, for example:
The first argument
str
is passed inr0
. The second argumentformat
is passed inr1
. All subsequent (variadic) arguments are passed on the stack. Whereas the calling convention for ARM would be to enregister all variadic arguments as well.Describe the solution you'd like
I'd like the cspec to have an extra field to denote that variadic arguments are put on the stack
Alternatively, I'd like to be able to specify a function signature override that can specify custom storage in an Analyzer or from the GUI
Alternatively, I'd like to be able to create a completely custom function prototype/calling convention in an Analyzer so I could create a new calling convention for each variadic function
Additional context
XREF #1595
XREF toshipiazza/ghidra-plugin-hexagon#2
The text was updated successfully, but these errors were encountered: