mirror of
https://github.com/open-simh/simh.git
synced 2026-04-30 21:49:00 +00:00
All VAX: Fix Coverity identified issues
This commit is contained in:
@@ -463,6 +463,7 @@ switch (opc) { /* case on opcode */
|
|||||||
case ADDP4: case SUBP4:
|
case ADDP4: case SUBP4:
|
||||||
op[4] = op[2]; /* copy dst */
|
op[4] = op[2]; /* copy dst */
|
||||||
op[5] = op[3];
|
op[5] = op[3];
|
||||||
|
/* fall through */
|
||||||
case ADDP6: case SUBP6:
|
case ADDP6: case SUBP6:
|
||||||
if ((PSL & PSL_FPD) || (op[0] > 31) ||
|
if ((PSL & PSL_FPD) || (op[0] > 31) ||
|
||||||
(op[2] > 31) || (op[4] > 31))
|
(op[2] > 31) || (op[4] > 31))
|
||||||
@@ -632,6 +633,7 @@ switch (opc) { /* case on opcode */
|
|||||||
case CMPP3:
|
case CMPP3:
|
||||||
op[3] = op[2]; /* reposition ops */
|
op[3] = op[2]; /* reposition ops */
|
||||||
op[2] = op[0];
|
op[2] = op[0];
|
||||||
|
/* fall through */
|
||||||
case CMPP4:
|
case CMPP4:
|
||||||
if ((PSL & PSL_FPD) || (op[0] > 31) || (op[2] > 31))
|
if ((PSL & PSL_FPD) || (op[0] > 31) || (op[2] > 31))
|
||||||
RSVD_OPND_FAULT(CMPP);
|
RSVD_OPND_FAULT(CMPP);
|
||||||
|
|||||||
@@ -1045,6 +1045,8 @@ return;
|
|||||||
|
|
||||||
void h_unpackh (int32 *hflt, UFPH *r)
|
void h_unpackh (int32 *hflt, UFPH *r)
|
||||||
{
|
{
|
||||||
|
int32 thflt0;
|
||||||
|
|
||||||
r->sign = hflt[0] & FPSIGN; /* get sign */
|
r->sign = hflt[0] & FPSIGN; /* get sign */
|
||||||
r->exp = H_GETEXP (hflt[0]); /* get exponent */
|
r->exp = H_GETEXP (hflt[0]); /* get exponent */
|
||||||
if (r->exp == 0) { /* exp = 0? */
|
if (r->exp == 0) { /* exp = 0? */
|
||||||
@@ -1054,7 +1056,8 @@ if (r->exp == 0) { /* exp = 0? */
|
|||||||
r->frac.f2 = r->frac.f3 = 0;
|
r->frac.f2 = r->frac.f3 = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
r->frac.f3 = WORDSWAP ((hflt[0] & ~(FPSIGN | H_EXP)) | H_HB);
|
thflt0 = ((hflt[0] & ~(FPSIGN | H_EXP)) | H_HB);
|
||||||
|
r->frac.f3 = WORDSWAP (thflt0);
|
||||||
r->frac.f2 = WORDSWAP (hflt[1]);
|
r->frac.f2 = WORDSWAP (hflt[1]);
|
||||||
r->frac.f1 = WORDSWAP (hflt[2]);
|
r->frac.f1 = WORDSWAP (hflt[2]);
|
||||||
r->frac.f0 = WORDSWAP (hflt[3]);
|
r->frac.f0 = WORDSWAP (hflt[3]);
|
||||||
|
|||||||
Reference in New Issue
Block a user