Use 16bit register in inline asm code to set segment registers.

This commit is contained in:
Luoqi Chen 1998-08-31 16:18:45 +00:00
parent d224dbc106
commit 492fa09693
2 changed files with 6 additions and 6 deletions

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.304 1998/08/18 07:46:58 msmith Exp $
* $Id: machdep.c,v 1.305 1998/08/31 08:41:36 kato Exp $
*/
#include "apm.h"
@ -835,8 +835,8 @@ setregs(p, entry, stack)
pcb->pcb_fs = _udatasel;
pcb->pcb_gs = _udatasel;
if (pcb == curpcb) {
__asm("mov %0,%%fs" : : "r" (_udatasel));
__asm("mov %0,%%gs" : : "r" (_udatasel));
__asm("movw %w0,%%fs" : : "r" (_udatasel));
__asm("movw %w0,%%gs" : : "r" (_udatasel));
}
/*

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.304 1998/08/18 07:46:58 msmith Exp $
* $Id: machdep.c,v 1.305 1998/08/31 08:41:36 kato Exp $
*/
#include "apm.h"
@ -835,8 +835,8 @@ setregs(p, entry, stack)
pcb->pcb_fs = _udatasel;
pcb->pcb_gs = _udatasel;
if (pcb == curpcb) {
__asm("mov %0,%%fs" : : "r" (_udatasel));
__asm("mov %0,%%gs" : : "r" (_udatasel));
__asm("movw %w0,%%fs" : : "r" (_udatasel));
__asm("movw %w0,%%gs" : : "r" (_udatasel));
}
/*