This has happened because (I think!) this has never before been tested with
guest code addresses >= 2^48. This in turn means that this is the first
time that
p = imm64_to_ireg(p, /*x*/9, i->ARM64in.XDirect.dstGA);
has been called upon to emit a constant which is non-zero in all four 16-bit
chunks, so it generates 4 instructions rather than (at most, in all previous
runs) 3, and so the "how many insns at max" assertions failed. This commit
fixes the assertions.
/* Fix up the conditional jump, if there was one. */
if (i->ARM64in.XDirect.cond != ARM64cc_AL) {
Int delta = (UChar*)p - (UChar*)ptmp; /* must be signed */
- vassert(delta > 0 && delta < 40);
+ vassert(delta > 0 && delta <= 40);
vassert((delta & 3) == 0);
UInt notCond = 1 ^ (UInt)i->ARM64in.XDirect.cond;
vassert(notCond <= 13); /* Neither AL nor NV */
/*NOTREACHED*/
done:
- vassert(((UChar*)p) - &buf[0] <= 36);
+ vassert(((UChar*)p) - &buf[0] <= 40);
return ((UChar*)p) - &buf[0];
}