mirror of
https://github.com/corda/corda.git
synced 2025-01-09 14:33:30 +00:00
fix shift bugs
This commit is contained in:
parent
bf08cc4c53
commit
7b809efd3f
@ -1626,7 +1626,7 @@ doShift(Context* c, void (*shift)
|
|||||||
|
|
||||||
Assembler::Register cx(rcx);
|
Assembler::Register cx(rcx);
|
||||||
moveRR(c, BytesPerWord, a, &cx);
|
moveRR(c, BytesPerWord, a, &cx);
|
||||||
shift(c, size, &cx, b);
|
shift(c, size, &cx, &target);
|
||||||
|
|
||||||
if (b->low == rcx) {
|
if (b->low == rcx) {
|
||||||
moveRR(c, BytesPerWord, &target, b);
|
moveRR(c, BytesPerWord, &target, b);
|
||||||
@ -1656,7 +1656,7 @@ doShift(Context* c, void (*shift)
|
|||||||
|
|
||||||
c->client->restore(rcx);
|
c->client->restore(rcx);
|
||||||
} else {
|
} else {
|
||||||
rex(c);
|
if (size == 8) rex(c);
|
||||||
if (v == 1) {
|
if (v == 1) {
|
||||||
c->code.append(0xd1);
|
c->code.append(0xd1);
|
||||||
c->code.append(type | b->low);
|
c->code.append(type | b->low);
|
||||||
@ -1701,7 +1701,7 @@ shiftLeftRR(Context* c, unsigned size, Assembler::Register* a,
|
|||||||
moveRR(c, 4, b, &bh); // 2 bytes
|
moveRR(c, 4, b, &bh); // 2 bytes
|
||||||
xorRR(c, 4, b, b); // 2 bytes
|
xorRR(c, 4, b, b); // 2 bytes
|
||||||
} else {
|
} else {
|
||||||
rex(c);
|
if (size == 8) rex(c);
|
||||||
c->code.append(0xd3);
|
c->code.append(0xd3);
|
||||||
c->code.append(0xe0 | b->low);
|
c->code.append(0xe0 | b->low);
|
||||||
}
|
}
|
||||||
@ -1748,7 +1748,7 @@ shiftRightRR(Context* c, unsigned size, Assembler::Register* a,
|
|||||||
c->code.append(0xf8 | b->high);
|
c->code.append(0xf8 | b->high);
|
||||||
c->code.append(31);
|
c->code.append(31);
|
||||||
} else {
|
} else {
|
||||||
rex(c);
|
if (size == 8) rex(c);
|
||||||
c->code.append(0xd3);
|
c->code.append(0xd3);
|
||||||
c->code.append(0xf8 | b->low);
|
c->code.append(0xf8 | b->low);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user