tweaks to address concerns flagged by Coverity

This commit is contained in:
Vern Paxson 2021-09-13 12:57:15 -07:00
parent 8414d13030
commit 7f3993ca0e
8 changed files with 45 additions and 10 deletions

View file

@ -371,21 +371,25 @@ bool ZAMCompiler::BuiltIn_sub_bytes(const NameExpr* n, const ExprPList& args)
break;
case 0x4: // first argument a constant
ASSERT(c);
z = ZInstI(OP_SUB_BYTES_VVVC, nslot, v3, v4, c);
z.op_type = OP_VVVC;
break;
case 0x5: // first and third constant
ASSERT(c);
z = ZInstI(OP_SUB_BYTES_VViC, nslot, v3, v4, c);
z.op_type = OP_VVVC_I3;
break;
case 0x6: // first and second constant - flip!
ASSERT(c);
z = ZInstI(OP_SUB_BYTES_ViVC, nslot, v4, v3, c);
z.op_type = OP_VVVC_I3;
break;
case 0x7: // whole shebang
ASSERT(c);
z = ZInstI(OP_SUB_BYTES_ViiC, nslot, v3, v4, c);
z.op_type = OP_VVVC_I2_I3;
break;