Bug 605352 - JM: avoid double-pin in x64 FrameState:syncFe (r=sstangl)

This commit is contained in:
Luke Wagner 2010-10-19 09:40:47 -07:00
parent 4511595997
commit 4e00bb8e1e
2 changed files with 4 additions and 2 deletions

View File

@ -597,13 +597,13 @@ FrameState::syncFe(FrameEntry *fe)
/* Get a register if necessary, without clobbering its pair. */
if (needTypeReg) {
if (backing->data.inRegister()) {
if (backing->data.inRegister() && !regstate[backing->data.reg()].isPinned()) {
pairReg = backing->data.reg();
pinReg(backing->data.reg());
}
tempRegForType(backing);
} else if (needDataReg) {
if (backing->type.inRegister()) {
if (backing->type.inRegister() && !regstate[backing->type.reg()].isPinned()) {
pairReg = backing->type.reg();
pinReg(backing->type.reg());
}

View File

@ -248,12 +248,14 @@ class FrameState
}
void pin() {
JS_ASSERT(fe_ != NULL);
assertConsistency();
save_ = fe_;
fe_ = NULL;
}
void unpin() {
JS_ASSERT(save_ != NULL);
assertConsistency();
fe_ = save_;
save_ = NULL;