/* This routine returns the correct FP status register value in *status, based on the C-bit & V-bit returned by the FCMP emulation routine in new_status. The architecture type (PA83, PA89 or PA2.0) is available in fpu_type. The y_field and the architecture type are used to determine what flavor of FCMP is being emulated.  */
static void update_status_cbit(u_int *, u_int, u_int, u_int)
/* This routine returns the correct FP status register value in *status, based on the C-bit & V-bit returned by the FCMP emulation routine in new_status. The architecture type (PA83, PA89 or PA2.0) is available in fpu_type. The y_field and the architecture type are used to determine what flavor of FCMP is being emulated.  */
static void update_status_cbit(u_int *, u_int, u_int, u_int)
{
	if ((fpu_type & TIMEX_EXTEN_FLAG) || 
	    (fpu_type & ROLEX_EXTEN_FLAG) ||
	    (fpu_type & PA2_0_FPU_FLAG)) {
		if (y_field == 0) {
			*status = ((*status & 0x04000000) >> 5) |
				  ((*status & 0x003ff000) >> 1) |
				  (new_status & 0xffc007ff);
		} else {
			*status = (*status & 0x04000000) |
				  ((new_status & 0x04000000) >> (y_field+4)) |
				  (new_status & ~0x04000000 &
				   ~(0x04000000 >> (y_field+4)));
		}
	}
	else {
		*status = new_status;
	}
}