prplfoundation/qemu — pull request #24 by mfortune (2014-12-19 22:18:24+00:00)
Title: Add support for .MIPS.ABIflags in user-mode

An implementation of the kernel parts of .MIPS.abiflags support documented here:
https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking

The new prctl option numbers have not yet made it to linus' kernel tree so this work should not be pushed to upstream QEMU until that has happened and/or they are reserved for this purpose.

The relatively complex code for the PR_FP_SET_MODE option is required as all executing threads within the current process group must atomically change floating point mode. This may seem like a severe performance hit but mode changing is both rare and will probably be set while the dynamic linker loads initial shared libraries which is single threaded.

The logic for processing .MIPS.abiflags has been tested along with glibc changes for the same and passes the comprehensive testsuite which is posted along with the glibc work.