> The documentation for this comes under the " Passing Function Arguments on > the Stack" section, which says: > > "This target hook returns true if an argument declared in a prototype as an > integral type smaller than int should actually be passed as an int. In > addition to avoiding errors in certain cases of mismatch, it also makes for > better code on certain machines." > > I would have thought if the args smaller than an int are actually passed as > an int, that would have meant the promotion had already taken place and so > wasn't needed in the callee. It could also be said that it makes worse code > on other machines :)
Yes, that's a bit counter-intuitive, but might have been intended and hinted at by the "avoiding errors in certain cases of mismatch". In any case, the hook should probably not be set to true if the ABI already promotes arguments. -- Eric Botcazou
