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

Added support for 4-vectors with 8/16 bit entries.

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

+ 7 - 2
source/FoxAMDBackend.Mod

@@ -241,7 +241,7 @@ TYPE
 			sizeInBits := type.sizeInBits;
 			form := type.form;
 			IF (type.length > 1) THEN
-				IF (* (type.form = IntermediateCode.Float) &*)  (type.sizeInBits=32) & (type.length =4) THEN
+				IF (* (type.form = IntermediateCode.Float) &*)  (type.sizeInBits<=32) & (type.length =4) THEN
 					i := Get(XMM7, XMM0);
 				ELSE
 					HALT(100)
@@ -639,8 +639,13 @@ TYPE
 			IF type.length > 1 THEN
 				IF type.length = 4 THEN
 					(*ASSERT(type.form = IntermediateCode.Float);*)
-					ASSERT(type.sizeInBits = 32);
+					IF (*(type.form = IntermediateCode.Float) & *) (type.sizeInBits = 32) THEN
 					SpecialMove(InstructionSet.opMOVUPS, InstructionSet.opMOVUPS, TRUE, dest, src, type);
+					ELSIF (type.sizeInBits = 16) THEN
+						SpecialMove(InstructionSet.opMOVQ, InstructionSet.opMOVQ, TRUE, dest, src, type);
+					ELSIF  (type.sizeInBits = 8) THEN
+						SpecialMove(InstructionSet.opMOVD, InstructionSet.opMOVD, TRUE, dest, src, type);
+					END;
 				ELSE
 					(*
 					ASSERT(type.form = IntermediateCode.Float);