https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124688

Jose E. Marchesi <jemarch at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jemarch at gcc dot gnu.org

--- Comment #3 from Jose E. Marchesi <jemarch at gcc dot gnu.org> ---
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 ();
  }

Reply via email to