mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
more JIT bugfixes
This commit is contained in:
parent
271797bead
commit
8cd18d6193
2
makefile
2
makefile
@ -28,7 +28,7 @@ src = src
|
||||
classpath = classpath
|
||||
test = test
|
||||
|
||||
input = $(test-build)/List.class
|
||||
input = $(test-build)/Misc.class
|
||||
|
||||
build-cxx = g++
|
||||
build-cc = gcc
|
||||
|
@ -3081,10 +3081,10 @@ finish(MyThread* t, Compiler* c, object method, Vector* objectPool,
|
||||
if (false and
|
||||
strcmp(reinterpret_cast<const char*>
|
||||
(&byteArrayBody(t, className(t, methodClass(t, method)), 0)),
|
||||
"Floats") == 0 and
|
||||
"java/lang/Math") == 0 and
|
||||
strcmp(reinterpret_cast<const char*>
|
||||
(&byteArrayBody(t, methodName(t, method), 0)),
|
||||
"multiply") == 0)
|
||||
"max") == 0)
|
||||
{
|
||||
asm("int3");
|
||||
}
|
||||
@ -3562,9 +3562,13 @@ class ArgumentList {
|
||||
}
|
||||
|
||||
void addLong(uint64_t v) {
|
||||
memcpy(array + position, &v, 8);
|
||||
objectMask[position] = false;
|
||||
if (BytesPerWord == 8) {
|
||||
memcpy(array + position + 1, &v, 8);
|
||||
} else {
|
||||
memcpy(array + position, &v, 8);
|
||||
}
|
||||
objectMask[position] = false;
|
||||
objectMask[position + 1] = false;
|
||||
position += 2;
|
||||
}
|
||||
|
||||
|
@ -1221,8 +1221,7 @@ RegisterOperand::apply(Context* c, Operation operation)
|
||||
break;
|
||||
|
||||
case push:
|
||||
if (selection == DefaultSelection or selection == Select4
|
||||
or (BytesPerWord == 8 and selection == Select8From4))
|
||||
if (selection == DefaultSelection or selection == Select4)
|
||||
{
|
||||
c->code.append(0x50 | value(c));
|
||||
} else {
|
||||
@ -1233,16 +1232,23 @@ RegisterOperand::apply(Context* c, Operation operation)
|
||||
break;
|
||||
|
||||
case Select8From4: {
|
||||
RegisterOperand* ax = temporary(c, rax);
|
||||
RegisterOperand* dx = temporary(c, rdx);
|
||||
|
||||
ax->accept(c, mov, register_(c, value(c)));
|
||||
c->code.append(0x99); // cdq
|
||||
dx->apply(c, push);
|
||||
ax->apply(c, push);
|
||||
|
||||
ax->release(c);
|
||||
dx->release(c);
|
||||
if (BytesPerWord == 8) {
|
||||
RegisterOperand* fullSize = register_
|
||||
(c, reference, DefaultSelection);
|
||||
fullSize->accept(c, mov, this);
|
||||
fullSize->apply(c, operation);
|
||||
} else {
|
||||
RegisterOperand* ax = temporary(c, rax);
|
||||
RegisterOperand* dx = temporary(c, rdx);
|
||||
|
||||
ax->accept(c, mov, register_(c, value(c)));
|
||||
c->code.append(0x99); // cdq
|
||||
dx->apply(c, push);
|
||||
ax->apply(c, push);
|
||||
|
||||
ax->release(c);
|
||||
dx->release(c);
|
||||
}
|
||||
} break;
|
||||
|
||||
default: abort(c);
|
||||
@ -1325,7 +1331,9 @@ RegisterOperand::accept(Context* c, Operation operation,
|
||||
break;
|
||||
|
||||
case Select4:
|
||||
c->code.append(0x89);
|
||||
case Select8From4:
|
||||
rex(c);
|
||||
c->code.append(0x63);
|
||||
c->code.append(0xc0 | (operand->value(c) << 3) | value(c));
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user