/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Copyright (c) 1988 by Sun Microsystems, Inc.
*/
/* Unpack procedures for Sparc FPU simulator. */
#include "_Qquad.h"
#include "_Qglobals.h"
PRIVATE void
int x; /* packed integer */
{
unsigned ux;
if (x == 0) {
} else {
}
}
void
single_type x; /* packed single */
{
unsigned u;
u = x.significand;
if (x.exponent == 0) { /* zero or sub */
if (x.significand == 0) { /* zero */
return;
} else { /* subnormal */
pu->significand[0]=u;
return;
}
if (x.significand == 0) { /* inf */
return;
} else { /* nan */
if ((u & 0x400000) != 0) { /* quiet */
} else {/* signaling */
}
return;
}
}
}
void
double_type x; /* packed double */
unsigned y;
{
unsigned u;
u = x.significand;
if (x.exponent == 0) { /* zero or sub */
if ((x.significand == 0) && (y == 0)) { /* zero */
return;
} else { /* subnormal */
pu->significand[0] = u;
return;
}
if ((u|y) == 0) { /* inf */
return;
} else { /* nan */
if ((u & 0x80000) != 0) { /* quiet */
} else {/* signaling */
}
return;
}
}
}
PRIVATE void
extended_type x; /* packed extended */
unsigned y, z, w;
{
unsigned u;
u = x.significand;
return;
} else { /* normal or subnormal */
if(x.exponent==0) {
}
return;
}
} else { /* inf or nan */
if ((u|z|y|w) == 0) { /* inf */
return;
} else { /* nan */
if ((u & 0x00008000) != 0) { /* quiet */
} else {/* signaling */
}
return;
}
}
}
void
int *n; /* input array */
{
switch ((int) dtype) {
case fp_op_integer:
unpackinteger(pu, n[0]);
break;
case fp_op_single:
{
single_type x;
*(int*)&x = n[0];
unpacksingle(pu, x);
break;
}
case fp_op_double:
{
double_type x;
*(int*)&x = n[i0];
break;
}
case fp_op_extended:
{
*(int*)&x = n[i0];
break;
}
}
}