Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Nov 2004 23:16:11 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 64386 for review
Message-ID:  <200411052316.iA5NGBZo040480@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help

http://perforce.freebsd.org/chv.cgi?CH=64386

Change 64386 by peter@peter_daintree on 2004/11/05 23:15:13

	use amd64-centric methods for the emulated environment

Affected files ...

.. //depot/projects/hammer/lib/libc/i386/gen/_set_tp.c#2 edit

Differences ...

==== //depot/projects/hammer/lib/libc/i386/gen/_set_tp.c#2 (text+ko) ====

@@ -34,9 +34,12 @@
 void
 _set_tp(void *tp)
 {
+#ifndef COMPAT_32BIT
 	union descriptor ldt;
+#endif
 	int sel;
 
+#ifndef COMPAT_32BIT
 	memset(&ldt, 0, sizeof(ldt));
 	ldt.sd.sd_lolimit = 0xffff;	/* 4G limit */
 	ldt.sd.sd_lobase = ((uintptr_t)tp) & 0xffffff;
@@ -49,4 +52,7 @@
 	ldt.sd.sd_hibase = (((uintptr_t)tp) >> 24) & 0xff;
 	sel = i386_set_ldt(LDT_AUTO_ALLOC, &ldt, 1);
 	__asm __volatile("movl %0,%%gs" : : "rm" ((sel << 3) | 7));
+#else
+	_amd64_set_gs(tp);
+#endif
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411052316.iA5NGBZo040480>