On 18/02/2010 07:17, Jie Zhang wrote:
> We are trying to add a 16bit integer division library function for
> bfin port. I just found GCC didn't do integral promotions when calling
> library function.
> Is this expected?
I wasn't aware of this myself, but it kind-of makes sense given the way that
macros such as FUNCTION_ARG and INIT_CUMULATIVE_ARGS don't get passed any type
info in the case of libcalls; I'm guessing here, but that would imply to me
that all libcalls are effectively using unnamed stdargs-style arg passing.
Not sure how to check this theory without extensively reading the source
though. I imagine it's done for efficiency, and there should always be
libcall functions existing for the precise types you're passing?
cheers,
DaveK