undo temporary big endian offset correction before leaving maybeMove

This commit is contained in:
Joel Dice 2009-03-06 12:14:37 -07:00
parent 7388da6282
commit e61d05f00b

View File

@ -2448,10 +2448,11 @@ maybeMove(Context* c, BinaryOperation type, unsigned srcSize,
addSite(c, dst, target); addSite(c, dst, target);
if (srcSize != srcSelectSize bool addOffset = srcSize != srcSelectSize
and c->arch->bigEndian() and c->arch->bigEndian()
and src->source->type(c) == MemoryOperand) and src->source->type(c) == MemoryOperand;
{
if (addOffset) {
static_cast<MemorySite*>(src->source)->offset static_cast<MemorySite*>(src->source)->offset
+= (srcSize - srcSelectSize); += (srcSize - srcSelectSize);
} }
@ -2516,6 +2517,11 @@ maybeMove(Context* c, BinaryOperation type, unsigned srcSize,
target->thaw(c, dst); target->thaw(c, dst);
} }
if (addOffset) {
static_cast<MemorySite*>(src->source)->offset
-= (srcSize - srcSelectSize);
}
} else { } else {
target = src->source; target = src->source;