https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124688
--- Comment #4 from Vineet Gupta <vineetg at gcc dot gnu.org> ---
(In reply to Jose E. Marchesi from comment #3)
> In compiler explorer:
>
> short foo (void);
> void baz (int);
>
> void bar ()
> {
> baz (foo ());
> }
>
> Compiler: BPF GCC trunk
> Options: -masm=pseudoc -O2 -mcpu=v4 -g
>
> I get:
>
> bar:
> call foo
> w1 = (s16) w0
> call baz
> exit
>
> Link to CE: https://godbolt.org/z/WjeKvG9PK
>
> As far as I can tell, this conversion has nothing to do with calling
> conventions. You get the same if you do for example:
>
> void bar()
> {
> int x = foo ();
> }
Right that's because there's an explicit mode conversion here: foo() returns
short which is reinterpreted as int on both examples, hence the (s16).
But I'm missing the point you are trying to make, if any ?