Replying to myself, quick update (before I have to shutdown my computer for today):
The instruction in question is 'rdhwr v1,$29' which is mips32r2, i.e. not supported on Loongson2f. GCC outputs it via a sequence like: .set push .set mips32r2 rdhwr $3,$29 .set pop I guess on MIPS the GCC runtime nowadays uses model specific register $29 (which is not CPU reg $29 !) for addressing thread local storage. To support older mipses this is implemented in kernel via an invalid opcode interrupt emulation. I.e. very slow. How can we prevent writes to thread local storage from creeping into goto*? David -- GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk2.gpg Fingerprint: B63B 6AF2 4EEB F033 46F7 7F1D 935E 6F08 E457 205F
pgpOjiQVjD3yF.pgp
Description: PGP signature