mirror of
https://github.com/corda/corda.git
synced 2025-01-09 06:23:04 +00:00
do constant-to-memory movq in one instruction on amd64 when possible
This commit is contained in:
parent
61ecb56e21
commit
f9145528c8
@ -958,6 +958,13 @@ moveCM(Context* c, unsigned aSize UNUSED, Assembler::Constant* a,
|
||||
break;
|
||||
|
||||
case 8: {
|
||||
if (BytesPerWord == 8
|
||||
and a->value->resolved()
|
||||
and isInt32(a->value->value()))
|
||||
{
|
||||
encode(c, 0xc7, 0, b, true);
|
||||
c->code.append4(a->value->value());
|
||||
} else {
|
||||
Assembler::Constant ah(shiftMaskPromise(c, a->value, 32, 0xFFFFFFFF));
|
||||
Assembler::Constant al(shiftMaskPromise(c, a->value, 0, 0xFFFFFFFF));
|
||||
|
||||
@ -965,6 +972,7 @@ moveCM(Context* c, unsigned aSize UNUSED, Assembler::Constant* a,
|
||||
|
||||
moveCM(c, 4, &al, 4, b);
|
||||
moveCM(c, 4, &ah, 4, &bh);
|
||||
}
|
||||
} break;
|
||||
|
||||
default: abort(c);
|
||||
|
Loading…
Reference in New Issue
Block a user