All VAX: Fix Coverity identified issues

This commit is contained in:
Mark Pizzolato 2019-05-02 22:20:20 -07:00
parent ab3e07a401
commit 758bfb7853
2 changed files with 6 additions and 1 deletions

View file

@ -463,6 +463,7 @@ switch (opc) { /* case on opcode */
case ADDP4: case SUBP4:
op[4] = op[2]; /* copy dst */
op[5] = op[3];
/* fall through */
case ADDP6: case SUBP6:
if ((PSL & PSL_FPD) || (op[0] > 31) ||
(op[2] > 31) || (op[4] > 31))
@ -632,6 +633,7 @@ switch (opc) { /* case on opcode */
case CMPP3:
op[3] = op[2]; /* reposition ops */
op[2] = op[0];
/* fall through */
case CMPP4:
if ((PSL & PSL_FPD) || (op[0] > 31) || (op[2] > 31))
RSVD_OPND_FAULT(CMPP);

View file

@ -1045,6 +1045,8 @@ return;
void h_unpackh (int32 *hflt, UFPH *r)
{
int32 thflt0;
r->sign = hflt[0] & FPSIGN; /* get sign */
r->exp = H_GETEXP (hflt[0]); /* get exponent */
if (r->exp == 0) { /* exp = 0? */
@ -1054,7 +1056,8 @@ if (r->exp == 0) { /* exp = 0? */
r->frac.f2 = r->frac.f3 = 0;
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.f1 = WORDSWAP (hflt[2]);
r->frac.f0 = WORDSWAP (hflt[3]);