2
0
Эх сурвалжийг харах

Minor patches

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6776 8c9fc860-2736-0410-a75d-ab315db34111
felixf 9 жил өмнө
parent
commit
2e03908b35

+ 12 - 0
source/ARM.ARMRuntime.Mod

@@ -450,6 +450,12 @@ TYPE
 		FPE64.FloatInt64(x, SYSTEM.VAL(FPE64.Float64, flt)); RETURN flt
 	END ConvF64S64;
 
+	(* stub in order to make the runtime itself compile, cf next procedure. This module needs to be compiled with FPU support on *)
+	PROCEDURE ConvF64U32*(x: UNSIGNED32): FLOAT64;
+	BEGIN
+		HALT(100); 
+	END ConvF64U32;
+
 	(* if an FPU64 is available, the result must be made available via FPU register *)
 	PROCEDURE ConvF64S64F*(x: DoubleWord): LONGREAL;
 	VAR l,h:LONGREAL;
@@ -613,6 +619,12 @@ TYPE
 		RETURN ConvF32F64(ConvF64S64(x))
 	END ConvF32S64;
 
+	(* stub in order to make the runtime itself compile, cf next procedure. This module needs to be compiled with FPU support on *)
+	PROCEDURE ConvF32U32*(x: UNSIGNED32): FLOAT32;
+	BEGIN
+		HALT(100); 
+	END ConvF32U32;
+	
 	(* if an FPU32 is available, the result must be made available via FPU register *)
 	PROCEDURE ConvF32S64F*(x: DoubleWord): REAL;
 	VAR l,h:REAL;

+ 1 - 1
source/FoxARMBackend.Mod

@@ -2972,7 +2972,6 @@ TYPE
 					(* to non-complex integer: *)
 					IF IsInteger(irSource) THEN
 						(* integer to non-complex integer *)
-						ASSERT(~IsComplex(irSource));
 						GetPartType(irSource.type, Low, partType);
 						SignOrZeroExtendOperand(source[Low], partType);
 						MovIfDifferent(destination[Low], source[Low])
@@ -3034,6 +3033,7 @@ TYPE
 			ELSIF IsDoublePrecisionFloat(irDestination) THEN
 				(* to double precision float: *)
 			 	IF IsInteger(irSource) THEN
+					ASSERT(~IsComplex(irSource));
 			 		(* integer to double precision float: ignore high part of source *)
 			 		temp := GetFreeRegister(IntermediateCode.FloatType(32));
 			 		Emit2(opFMSR, temp, source[Low]);