add missing instructions and fix shift long instructions to pop an int instead of a long as the shift count

This commit is contained in:
Joel Dice
2007-12-26 12:19:45 -07:00
parent fdd57ad326
commit c0cf15bb37

View File

@ -18,7 +18,7 @@ vmJump(void* address, void* base, void* stack, void* thread);
namespace { namespace {
const bool Verbose = true; const bool Verbose = false;
const bool DebugTraces = false; const bool DebugTraces = false;
class MyThread: public Thread { class MyThread: public Thread {
@ -2282,6 +2282,10 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip)
c->release(a); c->release(a);
} break; } break;
case ineg: {
c->neg4(frame->topInt());
} break;
case instanceof: { case instanceof: {
uint16_t index = codeReadInt16(t, code, ip); uint16_t index = codeReadInt16(t, code, ip);
@ -2477,6 +2481,12 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip)
c->release(a); c->release(a);
} break; } break;
case land: {
Operand* a = frame->popLong();
c->and8(a, frame->topLong());
c->release(a);
} break;
case lcmp: { case lcmp: {
Operand* next = c->label(); Operand* next = c->label();
Operand* less = c->label(); Operand* less = c->label();
@ -2669,13 +2679,13 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip)
} return; } return;
case lshl: { case lshl: {
Operand* a = frame->popLong(); Operand* a = frame->popInt();
c->shl8(a, frame->topLong()); c->shl8(a, frame->topLong());
c->release(a); c->release(a);
} break; } break;
case lshr: { case lshr: {
Operand* a = frame->popLong(); Operand* a = frame->popInt();
c->shr8(a, frame->topLong()); c->shr8(a, frame->topLong());
c->release(a); c->release(a);
} break; } break;
@ -2712,7 +2722,7 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip)
} break; } break;
case lushr: { case lushr: {
Operand* a = frame->popLong(); Operand* a = frame->popInt();
c->ushr8(a, frame->topLong()); c->ushr8(a, frame->topLong());
c->release(a); c->release(a);
} break; } break;
@ -3062,6 +3072,8 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip)
default: abort(t); default: abort(t);
} }
} break; } break;
default: abort(t);
} }
} }
} }