https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116467
--- Comment #2 from rsaxvc at gmail dot com --- I had wondered about that too but hadn't been able to find anything about it. User ccrause on esp32.com knew where it was though. From https://www.cadence.com/content/dam/cadence-www/global/en_US/documents/tools/silicon-solutions/compute-ip/isa-summary.pdf. >From section 10.1.4, Argument Passing in AR Registers > All arguments consist of an integral number of 4-byte words. Thus, the > minimum argument size is one word. Integer values smaller than a word (that > is, char and short) are stored in the least significant portion of the > argument word, with the upper bits set to zero for unsigned values or > sign-extended for signed values. >From section 10.1.5, Return Values in AR Registers: > Return values smaller than a word are stored in the least-significant part of > AR[2], with the upper bits set to zero for unsigned values or sign-extended > for signed values. So I think extending just once should be safe, at least for LX cores.