mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +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
|
classpath = classpath
|
||||||
test = test
|
test = test
|
||||||
|
|
||||||
input = $(test-build)/List.class
|
input = $(test-build)/Misc.class
|
||||||
|
|
||||||
build-cxx = g++
|
build-cxx = g++
|
||||||
build-cc = gcc
|
build-cc = gcc
|
||||||
|
@ -3081,10 +3081,10 @@ finish(MyThread* t, Compiler* c, object method, Vector* objectPool,
|
|||||||
if (false and
|
if (false and
|
||||||
strcmp(reinterpret_cast<const char*>
|
strcmp(reinterpret_cast<const char*>
|
||||||
(&byteArrayBody(t, className(t, methodClass(t, method)), 0)),
|
(&byteArrayBody(t, className(t, methodClass(t, method)), 0)),
|
||||||
"Floats") == 0 and
|
"java/lang/Math") == 0 and
|
||||||
strcmp(reinterpret_cast<const char*>
|
strcmp(reinterpret_cast<const char*>
|
||||||
(&byteArrayBody(t, methodName(t, method), 0)),
|
(&byteArrayBody(t, methodName(t, method), 0)),
|
||||||
"multiply") == 0)
|
"max") == 0)
|
||||||
{
|
{
|
||||||
asm("int3");
|
asm("int3");
|
||||||
}
|
}
|
||||||
@ -3562,9 +3562,13 @@ class ArgumentList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void addLong(uint64_t v) {
|
void addLong(uint64_t v) {
|
||||||
|
if (BytesPerWord == 8) {
|
||||||
|
memcpy(array + position + 1, &v, 8);
|
||||||
|
} else {
|
||||||
memcpy(array + position, &v, 8);
|
memcpy(array + position, &v, 8);
|
||||||
|
}
|
||||||
objectMask[position] = false;
|
objectMask[position] = false;
|
||||||
objectMask[position] = false;
|
objectMask[position + 1] = false;
|
||||||
position += 2;
|
position += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1221,8 +1221,7 @@ RegisterOperand::apply(Context* c, Operation operation)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case push:
|
case push:
|
||||||
if (selection == DefaultSelection or selection == Select4
|
if (selection == DefaultSelection or selection == Select4)
|
||||||
or (BytesPerWord == 8 and selection == Select8From4))
|
|
||||||
{
|
{
|
||||||
c->code.append(0x50 | value(c));
|
c->code.append(0x50 | value(c));
|
||||||
} else {
|
} else {
|
||||||
@ -1233,6 +1232,12 @@ RegisterOperand::apply(Context* c, Operation operation)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Select8From4: {
|
case Select8From4: {
|
||||||
|
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* ax = temporary(c, rax);
|
||||||
RegisterOperand* dx = temporary(c, rdx);
|
RegisterOperand* dx = temporary(c, rdx);
|
||||||
|
|
||||||
@ -1243,6 +1248,7 @@ RegisterOperand::apply(Context* c, Operation operation)
|
|||||||
|
|
||||||
ax->release(c);
|
ax->release(c);
|
||||||
dx->release(c);
|
dx->release(c);
|
||||||
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
default: abort(c);
|
default: abort(c);
|
||||||
@ -1325,7 +1331,9 @@ RegisterOperand::accept(Context* c, Operation operation,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Select4:
|
case Select4:
|
||||||
c->code.append(0x89);
|
case Select8From4:
|
||||||
|
rex(c);
|
||||||
|
c->code.append(0x63);
|
||||||
c->code.append(0xc0 | (operand->value(c) << 3) | value(c));
|
c->code.append(0xc0 | (operand->value(c) << 3) | value(c));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user