avoid unecessary subtraction in tableswitch

This commit is contained in:
Joel Dice 2009-03-06 17:11:14 -07:00
parent b5f76d96dc
commit 33ba8d084d

View File

@ -3730,9 +3730,12 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip,
saveStateAndCompile(t, frame, defaultIp);
Compiler::Operand* normalizedKey
= (bottom ? c->sub(4, c->constant(bottom), key) : key);
c->jmp(c->load(BytesPerWord, BytesPerWord,
c->memory(start, 0, c->sub(4, c->constant(bottom), key),
BytesPerWord), BytesPerWord));
c->memory(start, 0, normalizedKey, BytesPerWord),
BytesPerWord));
Compiler::State* state = c->saveState();