iu_simulator.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/* Integer Unit simulator for Sparc FPU simulator. */
#include <sys/privregs.h>
#include <sys/vis_simulator.h>
/*
* fbcc_sim() also handles V9 fbpcc, and ignores the prediction bit.
*/
static enum ftt_type
{
int fbpcc = 0;
union {
int32_t i; /* for sign_ext(disp22) */
} fp;
enum icc_type {
} icc;
fbpcc = 1;
if (fbpcc) {
switch (nfcc) {
case fcc_0:
break;
case fcc_1:
break;
case fcc_2:
break;
case fcc_3:
break;
}
} else {
}
switch (icc) {
case fbn:
takeit = 0;
break;
case fbl:
break;
case fbg:
break;
case fbu:
break;
case fbe:
break;
case fblg:
break;
case fbul:
break;
case fbug:
break;
case fbue:
break;
case fbge:
break;
case fble:
break;
case fbne:
break;
case fbuge:
break;
case fbule:
break;
case fbo:
break;
case fba:
takeit = 1;
break;
}
if (takeit) { /* Branch taken. */
if (fbpcc) {
} else {
}
} else {
if (fbpcc) {
} else {
}
}
} else { /* Branch not taken. */
if (annul) { /* Annul next instruction. */
} else { /* Execute next instruction. */
}
}
return (ftt_none);
}
/* PUBLIC FUNCTIONS */
enum ftt_type
void *prw, /* Pointer to locals and ins. */
{
case 0: /* fbcc and V9 fbpcc */
case 2:
case 0x28:
else
return (ftt_unimplemented);
case 0x30:
else
return (ftt_unimplemented);
case 0x2C:
default:
return (ftt_unimplemented);
}
case 3:
default:
return (ftt_unimplemented);
}
}