mirror of
https://github.com/corda/corda.git
synced 2025-02-15 07:02:24 +00:00
handle unresolved constants in moveCM
This commit is contained in:
parent
671fd1c0f9
commit
e859502811
11
src/x86.cpp
11
src/x86.cpp
@ -895,8 +895,6 @@ void
|
|||||||
moveCM(Context* c, unsigned aSize UNUSED, Assembler::Constant* a,
|
moveCM(Context* c, unsigned aSize UNUSED, Assembler::Constant* a,
|
||||||
unsigned bSize, Assembler::Memory* b)
|
unsigned bSize, Assembler::Memory* b)
|
||||||
{
|
{
|
||||||
int64_t v = a->value->value();
|
|
||||||
|
|
||||||
switch (bSize) {
|
switch (bSize) {
|
||||||
case 1:
|
case 1:
|
||||||
encode(c, 0xc6, 0, b, false);
|
encode(c, 0xc6, 0, b, false);
|
||||||
@ -910,10 +908,17 @@ moveCM(Context* c, unsigned aSize UNUSED, Assembler::Constant* a,
|
|||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
encode(c, 0xc7, 0, b, false);
|
encode(c, 0xc7, 0, b, false);
|
||||||
c->code.append4(a->value->value());
|
if (a->value->resolved()) {
|
||||||
|
c->code.append4(a->value->value());
|
||||||
|
} else {
|
||||||
|
appendImmediateTask(c, a->value, offset(c));
|
||||||
|
c->code.append4(0);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8: {
|
case 8: {
|
||||||
|
int64_t v = a->value->value();
|
||||||
|
|
||||||
ResolvedPromise high((v >> 32) & 0xFFFFFFFF);
|
ResolvedPromise high((v >> 32) & 0xFFFFFFFF);
|
||||||
Assembler::Constant ah(&high);
|
Assembler::Constant ah(&high);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user