plan 9 kernel history: overview | file list | diff list

1992/0806/pc/main.c (diff list | history)

1992/0805/sys/src/9/pc/main.c:287,3021992/0806/sys/src/9/pc/main.c:287,313 (short | long | prev | next)
1991/0913    
	 */ 
	outb(0xF0, 0xFF); 
 
	status = fpstatus() & 0xffff; 
	msg = "unknown"; 
1992/0806    
	/* 
	 *  save floating point state to check out error 
	 */ 
	fpenv(&u->fpsave); 
	status = u->fpsave.status; 
 
	msg = 0; 
1991/0913    
	for(i = 0; i < 8; i++) 
		if((1<<i) & status){ 
			msg = mathmsg[i]; 
1992/0806    
			sprint(note, "sys: fp: %s fppc=0x%lux", msg, u->fpsave.pc); 
			postnote(u->p, 1, note, NDebug); 
1991/0913    
			break; 
		} 
1991/1220    
	sprint(note, "sys: fp: %s, status 0x%ux, pc 0x%lux", msg, status, ur->pc); 
1992/0805    
print("%s cr0 %lux\n", note, getcr0()); 
1991/0913    
	postnote(u->p, 1, note, NDebug); 
1992/0806    
	if(msg == 0){ 
		sprint(note, "sys: fp: unknown fppc=0x%lux", u->fpsave.pc); 
		postnote(u->p, 1, note, NDebug); 
	} 
	if(ur->pc & KZERO) 
		panic("fp: status %lux fppc=0x%lux pc=0x%lux", status, 
			u->fpsave.pc, ur->pc); 
1991/0912    
} 
 
/* 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)