summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/reg.h
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-06-07 04:36:10 +0000
committerbde <bde@FreeBSD.org>1997-06-07 04:36:10 +0000
commit6babbddd762aaa221ade16215d4b4e93bb669f79 (patch)
tree9369720c6fe0f8bc2adda5e0852adf5a669345ef /sys/amd64/include/reg.h
parent093956d0d4afe268c9113da9f84c22d843b9e750 (diff)
downloadFreeBSD-src-6babbddd762aaa221ade16215d4b4e93bb669f79.zip
FreeBSD-src-6babbddd762aaa221ade16215d4b4e93bb669f79.tar.gz
Preserve %fs and %gs across context switches. This has a relatively low
cost since it is only done in cpu_switch(), not for every exception. The extra state is kept in the pcb, and handled much like the npx state, with similar deficiencies (the state is not preserved across signal handlers, and error handling loses state).
Diffstat (limited to 'sys/amd64/include/reg.h')
-rw-r--r--sys/amd64/include/reg.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/amd64/include/reg.h b/sys/amd64/include/reg.h
index c896fe5..5d36f27 100644
--- a/sys/amd64/include/reg.h
+++ b/sys/amd64/include/reg.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)reg.h 5.5 (Berkeley) 1/18/91
- * $Id: reg.h,v 1.13 1997/02/22 09:35:07 peter Exp $
+ * $Id: reg.h,v 1.14 1997/06/07 00:49:45 bde Exp $
*/
#ifndef _MACHINE_REG_H_
@@ -69,6 +69,16 @@
#define tSS (16)
/*
+ * Indices for registers in `struct regs' only.
+ *
+ * Some registers live in the pcb and are only in an "array" with the
+ * other registers in application interfaces that copy all the registers
+ * to or from a `struct regs'.
+ */
+#define tFS (17)
+#define tGS (18)
+
+/*
* Register set accessible via /proc/$pid/regs and PT_{SET,GET}REGS.
*/
struct reg {
@@ -89,6 +99,8 @@ struct reg {
unsigned int r_eflags;
unsigned int r_esp;
unsigned int r_ss;
+ unsigned int r_fs;
+ unsigned int r_gs;
};
/*
OpenPOWER on IntegriCloud