Date: Tue, 13 Dec 2016 19:27:32 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310029 - head/sys/mips/mips Message-ID: <201612131927.uBDJRWBO087486@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Tue Dec 13 19:27:31 2016 New Revision: 310029 URL: https://svnweb.freebsd.org/changeset/base/310029 Log: Fix remove_userlocal_code() for n32. n32 kernels use a 64-bit store to the TLS register rather than a 32-bit store. Sponsored by: DARPA / AFRL Modified: head/sys/mips/mips/cpu.c Modified: head/sys/mips/mips/cpu.c ============================================================================== --- head/sys/mips/mips/cpu.c Tue Dec 13 19:22:43 2016 (r310028) +++ head/sys/mips/mips/cpu.c Tue Dec 13 19:27:31 2016 (r310029) @@ -78,9 +78,6 @@ struct mips_cpuinfo cpuinfo; # define _ADDU_V0_T0_T1 \ _ENCODE_INSN(0, T0, T1, V0, OP_DADDU) -# define _MTC0_V0_USERLOCAL \ - _ENCODE_INSN(OP_COP0, OP_DMT, V0, 4, 2) - #else /* mips 32 */ # define _LOAD_T0_MDTLS_A1 \ @@ -93,10 +90,19 @@ struct mips_cpuinfo cpuinfo; # define _ADDU_V0_T0_T1 \ _ENCODE_INSN(0, T0, T1, V0, OP_ADDU) +#endif /* ! __mips_n64 */ + +#if defined(__mips_n64) || defined(__mips_n32) + +# define _MTC0_V0_USERLOCAL \ + _ENCODE_INSN(OP_COP0, OP_DMT, V0, 4, 2) + +#else /* mips o32 */ + # define _MTC0_V0_USERLOCAL \ _ENCODE_INSN(OP_COP0, OP_MT, V0, 4, 2) -#endif /* ! __mips_n64 */ +#endif /* ! (__mips_n64 || __mipsn32) */ #define _JR_RA _ENCODE_INSN(OP_SPECIAL, RA, 0, 0, OP_JR) #define _NOP 0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612131927.uBDJRWBO087486>