reflect: promote integer closure return to full word

The libffi library expects an integer return type to be promoted to a
full word.  Implement that when returning from a closure written in Go.
This only matters on big-endian systems when returning an integer smaller
than the pointer size, which is why we didn't notice it until now.


Change-Id: I60ac5af4fc4a857ad0609db6db0ab1609bf543fa
Reviewed-by: Than McIntosh <>
3 files changed