PERFORCE change 64386 for review

Peter Wemm peter at FreeBSD.org
Fri Nov 5 15:16:13 PST 2004


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

Change 64386 by peter at 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
 }


More information about the p4-projects mailing list