The libffi library expects an integer return type to be promoted to a full word. This patch to libgo implements 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. This fixes GCC PR 91781. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Bootstrapped and ran some of the libgo tests on powerpc64-linux-gnu. Committed to mainline. Ian