Sfoglia il codice sorgente

Reserve RBX for activity pointer in 64-bit mode

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@8160 8c9fc860-2736-0410-a75d-ab315db34111
negelef 7 anni fa
parent
commit
ae0bedf522
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5 1
      source/FoxAMDBackend.Mod

+ 5 - 1
source/FoxAMDBackend.Mod

@@ -588,7 +588,11 @@ TYPE
 		BEGIN
 			spillStack.Init;
 			IF backend.cooperative THEN
-				ap := ReservePhysicalRegister(IntermediateCode.GeneralPurposeRegister,IntermediateCode.UnsignedIntegerType(cpuBits),RC,in.pc);
+				IF cpuBits=32 THEN
+					ap := ReservePhysicalRegister(IntermediateCode.GeneralPurposeRegister,IntermediateCode.UnsignedIntegerType(cpuBits),ECX,in.pc);
+				ELSE
+					ap := ReservePhysicalRegister(IntermediateCode.GeneralPurposeRegister,IntermediateCode.UnsignedIntegerType(cpuBits),RBX,in.pc);
+				END;
 				ap.spillable := FALSE;
 			END;
 			emitter.SetCode(out);