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