Hi all,
ARM AAPCS-ABI specifies the result format of composite types in section 5.4 "Result Return":
Composite Type not larger than 4 bytes is returned in r0.
The format is as if the result had been stored in memory at a word-aligned address and then loaded into r0 with an LDR instruction.
Any bits in r0 that lie outside the bounds of the result have unspecified values.
This patch implements return format of composite types <= 4 bytes by using the "upper" part of register r0 (instead of lower part as in little endian) to transfer the data value.
CFE emits additional shift instructions in big endian mode.
Please review, thanks,
Christian
Maybe making the BE code return earlier, than keeping the same code for little-endian below.