assert that jump offsets fit into 32-bit words

This commit is contained in:
Joel Dice 2008-01-08 17:23:10 -07:00
parent e3be0d197e
commit 96ddae1742

View File

@ -1584,6 +1584,8 @@ unconditional(Context* c, unsigned jump, AddressOperand* operand)
} else {
v = 0;
}
assert(c, isInt32(v));
c->code.append(jump);
c->code.append4(v);
@ -1600,6 +1602,8 @@ conditional(Context* c, unsigned condition, AddressOperand* operand)
} else {
v = 0;
}
assert(c, isInt32(v));
c->code.append(0x0f);
c->code.append(condition);