https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122925
--- Comment #8 from Oleg Endo <olegendo at gcc dot gnu.org> --- AFIAR, it also depends on the ABI that is being used. GNU SH ABI (the default) mandates that args are properly extended before they are passed to functions. Renesas SH ABI treats the upper bits as undefined. Not 100% sure, but something like that.
