mirror of
https://github.com/corda/corda.git
synced 2025-01-23 04:48:09 +00:00
fix swapped machine codes for sar/shr instructions
This commit is contained in:
parent
e30302722e
commit
c119d4362e
@ -2088,14 +2088,14 @@ MemoryOperand::accept(Context* c, Operation op, RegisterOperand* operand)
|
|||||||
// shrd
|
// shrd
|
||||||
encode2(c, 0x0fad, tmp->value(c), this, false);
|
encode2(c, 0x0fad, tmp->value(c), this, false);
|
||||||
// sar
|
// sar
|
||||||
encode(c, 0xd3, 5, high(c), false);
|
encode(c, 0xd3, 7, high(c), false);
|
||||||
|
|
||||||
tmp->release(c);
|
tmp->release(c);
|
||||||
cx->release(c);
|
cx->release(c);
|
||||||
} else {
|
} else {
|
||||||
RegisterOperand* cx = temporary(c, rcx);
|
RegisterOperand* cx = temporary(c, rcx);
|
||||||
cx->accept(c, mov, operand);
|
cx->accept(c, mov, operand);
|
||||||
encode(c, 0xd3, 5, this, true);
|
encode(c, 0xd3, 7, this, true);
|
||||||
cx->release(c);
|
cx->release(c);
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
@ -2111,14 +2111,14 @@ MemoryOperand::accept(Context* c, Operation op, RegisterOperand* operand)
|
|||||||
// shrd
|
// shrd
|
||||||
encode2(c, 0x0fad, tmp->value(c), this, false);
|
encode2(c, 0x0fad, tmp->value(c), this, false);
|
||||||
// shr
|
// shr
|
||||||
encode(c, 0xd3, 7, high(c), false);
|
encode(c, 0xd3, 5, high(c), false);
|
||||||
|
|
||||||
tmp->release(c);
|
tmp->release(c);
|
||||||
cx->release(c);
|
cx->release(c);
|
||||||
} else {
|
} else {
|
||||||
RegisterOperand* cx = temporary(c, rcx);
|
RegisterOperand* cx = temporary(c, rcx);
|
||||||
cx->accept(c, mov, operand);
|
cx->accept(c, mov, operand);
|
||||||
encode(c, 0xd3, 7, this, true);
|
encode(c, 0xd3, 5, this, true);
|
||||||
cx->release(c);
|
cx->release(c);
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
Loading…
Reference in New Issue
Block a user