summaryrefslogtreecommitdiffstats
path: root/sys/mips/include
diff options
context:
space:
mode:
authorgonzo <gonzo@FreeBSD.org>2012-02-09 22:17:13 +0000
committergonzo <gonzo@FreeBSD.org>2012-02-09 22:17:13 +0000
commit4fc3bdaf2c31a67f9ade71bdaf263600f8ffe3fd (patch)
tree39bde5cec6ce044e029846a1e06092663f2f7638 /sys/mips/include
parentc8d9c45343d1af57f79ef8e55c281fb910ade3b9 (diff)
downloadFreeBSD-src-4fc3bdaf2c31a67f9ade71bdaf263600f8ffe3fd.zip
FreeBSD-src-4fc3bdaf2c31a67f9ade71bdaf263600f8ffe3fd.tar.gz
- Emulate RDHWR instruction for TLS support
Reading register $29 with RDHWR is becoming the de-facto standard to implement TLS. According to linux-mips wiki, MIPS Technologies has reserved hardware register $29 for ABI use. Furthermore current GCC makes the following assumptions: - RDHWR is natively available or otherwise emulated by the kernel - Register $29 holds the TLS pointer Submitted by: Robert Millan <rmh@debian.org>
Diffstat (limited to 'sys/mips/include')
-rw-r--r--sys/mips/include/mips_opcode.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/mips/include/mips_opcode.h b/sys/mips/include/mips_opcode.h
index 72f281a..fd0e976 100644
--- a/sys/mips/include/mips_opcode.h
+++ b/sys/mips/include/mips_opcode.h
@@ -176,6 +176,11 @@ typedef union {
#define OP_LDL 032
#define OP_LDR 033
+#define OP_SPECIAL2 034
+#define OP_JALX 035
+
+#define OP_SPECIAL3 037
+
#define OP_LB 040
#define OP_LH 041
#define OP_LWL 042
@@ -389,6 +394,11 @@ typedef union {
#define OP_R_BGEZALL OP_BGEZALL
/*
+ * Values for the 'func' field when 'op' == OP_SPECIAL3.
+ */
+#define OP_RDHWR 073
+
+/*
* Values for the 'rs' field when 'op' == OP_COPz.
*/
#define OP_MF 000
OpenPOWER on IntegriCloud