Fix an updateTrackedEffects bug for InterpOne

InterpOne was not properly tracking its effects on the stack
offset.  The return-type-means-an-extra-push thing was compensated for
in both hhbctranslator and tracebuilder.
Esse commit está contido em:
Jordan DeLong
2013-04-22 13:10:47 -07:00
commit de Sara Golemon
commit ca902ff1e8
3 arquivos alterados com 5 adições e 4 exclusões
@@ -983,7 +983,7 @@ void TraceBuilder::genNativeImpl() {
}
SSATmp* TraceBuilder::genInterpOne(uint32_t pcOff,
uint32_t stackAdjustment,
int32_t stackAdjustment,
Type resultType) {
return gen(InterpOne,
resultType,
@@ -1247,7 +1247,7 @@ void TraceBuilder::updateTrackedState(IRInstruction* inst) {
int64_t stackAdjustment = inst->getSrc(3)->getValInt();
Type resultType = inst->getTypeParam();
// push the return value if any and adjust for the popped values
m_spOffset += ((resultType == Type::None ? 0 : 1) - stackAdjustment);
m_spOffset += -stackAdjustment;
break;
}
+1 -1
Ver Arquivo
@@ -240,7 +240,7 @@ public:
SSATmp* genIterNextK(uint32_t iterId, uint32_t valLocalId, uint32_t keyLocalId);
SSATmp* genIterFree(uint32_t iterId);
SSATmp* genInterpOne(uint32_t pcOff, uint32_t stackAdjustment,
SSATmp* genInterpOne(uint32_t pcOff, int32_t stackAdjustment,
Type resultType);
Trace* getExitSlowTrace(uint32_t bcOff,
int32_t stackDeficit,
+2 -1
Ver Arquivo
@@ -3161,7 +3161,8 @@ TranslatorX64::enterTC(SrcKey sk, TCA start) {
start = TCA(0xbee5face);
}
TRACE(4, "enterTC: request(%s) args: %" PRIx64 " %" PRIx64 " %" PRIx64 " %" PRIx64 " %" PRIx64 "\n",
TRACE(2, "enterTC: request(%s) args: %" PRIx64 " %" PRIx64 " %"
PRIx64 " %" PRIx64 " %" PRIx64 "\n",
reqName(info.requestNum),
info.args[0], info.args[1], info.args[2], info.args[3],
info.args[4]);