Kaynağa Gözat

Minor corrections.

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6759 8c9fc860-2736-0410-a75d-ab315db34111
felixf 9 yıl önce
ebeveyn
işleme
a21b1b59ec

+ 1 - 1
source/FoxARMInstructionSet.Mod

@@ -2871,7 +2871,7 @@ CONST
 								value := instruction.operands[1].offsetImmediate + adr + 8;
 							END;
 							WriteReference(value, TRUE, w);
-							IF value * 8 + 32 < bitSet.GetSize() THEN
+							IF (value>=0) & (value * 8 + 32 < bitSet.GetSize()) THEN
 								WriteReference(bitSet.GetBits(value * 8, 32) - codeDisplacement, TRUE, w); (* note that data references cannot be resolved like this *)
 							END
 						END

+ 1 - 2
source/FoxIntermediateBackend.Mod

@@ -10917,7 +10917,7 @@ TYPE
 				InitVariables(scope);
 				
 				
-				IF PreciseGCSupport & (x.code = NIL) & (~procedureType.noPAF) THEN
+				IF PreciseGCSupport & (x.code = NIL) & (~procedureType.noPAF) & ~procedure.isEntry THEN
 					GetCodeSectionNameForSymbol(procedure, name);
 					Basic.SuffixSegmentedName (name, Basic.MakeString ("@Descriptor"));
 					IntermediateCode.InitAddress(right, addressType, name, 0, 0);
@@ -10926,7 +10926,6 @@ TYPE
 					IntermediateCode.InitMemory(left,addressType,fp,0);
 					Emit(Mov(position, left, right));
 				END;
-								
 				IF x.code = NIL THEN
 					VisitStatementBlock(x);
 				ELSE