Browse Source

corrected push of floating point values less wide than address size

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7447 8c9fc860-2736-0410-a75d-ab315db34111
felixf 7 năm trước cách đây
mục cha
commit
b38157c723
1 tập tin đã thay đổi với 8 bổ sung1 xóa
  1. 8 1
      source/FoxAMDBackend.Mod

+ 8 - 1
source/FoxAMDBackend.Mod

@@ -2977,7 +2977,11 @@ TYPE
 			ELSE
 				sizeInBytes := vop.type.sizeInBits DIV 8;
 				length := vop.type.length;
-				AllocateStack(sizeInBytes*length);
+				IF sizeInBytes * length * 8 < cpuBits THEN 
+					AllocateStack(cpuBits DIV 8);
+				ELSE
+					AllocateStack(sizeInBytes*length);
+				END;
 				Assembler.InitMem(memop, SHORTINT(sizeInBytes*length),SP,0);
 				IF backend.forceFPU THEN
 					emitter.Emit1(InstructionSet.opFLD,op); INC(fpStackPointer);
@@ -3605,3 +3609,6 @@ BEGIN
 	Init;
 	usePool := Machine.NumberOfProcessors()>1;
 END FoxAMDBackend.
+
+
+SystemTools.FreeDownTo FoxAMDBackend ~