Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/i386 Delete dead code.
details: https://anonhg.NetBSD.org/src/rev/f05c15bf6a8c
branches: trunk
changeset: 511333:f05c15bf6a8c
user: sommerfeld <sommerfeld%NetBSD.org@localhost>
date: Mon Jun 18 03:33:59 2001 +0000
description:
Delete dead code.
Mask segment registers from trap frame with 0xffff for cleanliness.
diffstat:
sys/arch/i386/i386/process_machdep.c | 27 +++++++--------------------
1 files changed, 7 insertions(+), 20 deletions(-)
diffs (56 lines):
diff -r 28ee6c2ec7a9 -r f05c15bf6a8c sys/arch/i386/i386/process_machdep.c
--- a/sys/arch/i386/i386/process_machdep.c Mon Jun 18 03:32:14 2001 +0000
+++ b/sys/arch/i386/i386/process_machdep.c Mon Jun 18 03:33:59 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: process_machdep.c,v 1.33 2001/06/17 21:01:35 sommerfeld Exp $ */
+/* $NetBSD: process_machdep.c,v 1.34 2001/06/18 03:33:59 sommerfeld Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -116,10 +116,10 @@
} else
#endif
{
- regs->r_gs = tf->tf_gs;
- regs->r_fs = tf->tf_fs;
- regs->r_es = tf->tf_es;
- regs->r_ds = tf->tf_ds;
+ regs->r_gs = tf->tf_gs & 0xffff;
+ regs->r_fs = tf->tf_fs & 0xffff;
+ regs->r_es = tf->tf_es & 0xffff;
+ regs->r_ds = tf->tf_ds & 0xffff;
regs->r_eflags = tf->tf_eflags;
}
regs->r_edi = tf->tf_edi;
@@ -130,9 +130,9 @@
regs->r_ecx = tf->tf_ecx;
regs->r_eax = tf->tf_eax;
regs->r_eip = tf->tf_eip;
- regs->r_cs = tf->tf_cs;
+ regs->r_cs = tf->tf_cs & 0xffff;
regs->r_esp = tf->tf_esp;
- regs->r_ss = tf->tf_ss;
+ regs->r_ss = tf->tf_ss & 0xffff;
return (0);
}
@@ -191,19 +191,6 @@
} else
#endif
{
-#define verr_ldt(slot) (slot < pmap->pm_ldt_len && \
- (pmap->pm_ldt[slot].sd.sd_type & SDT_MEMRO) != 0 && \
- pmap->pm_ldt[slot].sd.sd_dpl == SEL_UPL && \
- pmap->pm_ldt[slot].sd.sd_p == 1)
-#define verr_gdt(slot) (slot < NGDT && \
- (gdt[slot].sd.sd_type & SDT_MEMRO) != 0 && \
- gdt[slot].sd.sd_dpl == SEL_UPL && \
- gdt[slot].sd.sd_p == 1)
-#define verr(sel) (ISLDT(sel) ? verr_ldt(IDXSEL(sel)) : \
- verr_gdt(IDXSEL(sel)))
-#define valid_sel(sel) (ISPL(sel) == SEL_UPL && verr(sel))
-#define null_sel(sel) (!ISLDT(sel) && IDXSEL(sel) == 0)
-
/*
* Check for security violations.
*/
Home |
Main Index |
Thread Index |
Old Index