mirror of
https://github.com/corda/corda.git
synced 2025-01-23 12:58:35 +00:00
fix encoding of single byte register-to-memory moves on x86_64
We need to prefix instructions of the form "mov R,M" with a REX byte when R is %spl, %bpl, %sil, or %dil. Such moves are unencodable on 32-bit x86, and, because of the order in which we pick registers, pretty rare on 64-bit systems, which is why this took so long to notice.
This commit is contained in:
parent
5d781a0584
commit
3bc37d6e2a
@ -518,7 +518,7 @@ void
|
|||||||
maybeRex(Context* c, unsigned size, Assembler::Register* a,
|
maybeRex(Context* c, unsigned size, Assembler::Register* a,
|
||||||
Assembler::Memory* b)
|
Assembler::Memory* b)
|
||||||
{
|
{
|
||||||
maybeRex(c, size, a->low, b->index, b->base, false);
|
maybeRex(c, size, a->low, b->index, b->base, size == 1 and (a->low & 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user