Forráskód Böngészése

all AMD64 media instructions available for parsing. Operand parsing done. Instruction parsing and emission still missing.

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7528 8c9fc860-2736-0410-a75d-ab315db34111
felixf 7 éve
szülő
commit
6ad5ff09ce
3 módosított fájl, 4057 hozzáadás és 2886 törlés
  1. 1 1
      source/Fox.Tool
  2. 4026 2883
      source/FoxAMD64InstructionSet.Mod
  3. 30 2
      source/FoxProgTools.Mod

+ 1 - 1
source/Fox.Tool

@@ -11,7 +11,7 @@ Compiler.Compile --noInterfaceCheck
 	SystemTools.DoCommands
 	SystemTools.Timer start ~
 
-	Compiler.Compile -p=Win32G --writeBarriers *)
+	Compiler.Compile -p=Win32G *)
 
 	BitSets.Mod ObjectFile.Mod GenericLinker.Mod StaticLinker.Mod
 	FoxBasic.Mod  FoxProgTools.Mod  FoxScanner.Mod FoxCSharpScanner.Mod FoxSyntaxTree.Mod FoxGlobal.Mod

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 4026 - 2883
source/FoxAMD64InstructionSet.Mod


+ 30 - 2
source/FoxProgTools.Mod

@@ -947,13 +947,13 @@ TYPE
 			cpuoptionReplacer.Add ("3DNOW", "3DNow");
 			cpuoptionReplacer.Add ("PRIV", "Privileged");
 			cpuoptionReplacer.Add ("PROT", "Protected");
-(*			cpuoptionReplacer.Add ("SW","");
+			cpuoptionReplacer.Add ("SW","");
 			cpuoptionReplacer.Add ("SB","");
 			cpuoptionReplacer.Add ("SMM","");
 			cpuoptionReplacer.Add ("AR1","");
 			cpuoptionReplacer.Add ("AR2","");
 			cpuoptionReplacer.Add ("ND","");
-*)
+
 			NEW(bitwidthReplacer);
 			bitwidthReplacer.Add("INV","I64");
 
@@ -969,9 +969,30 @@ TYPE
 			numberMnemonics := 0;
 			numberInstructions := 0;
 			maxMnemonicNameLength := 0;
+			
+			mnemonic := firstMnemonic;
+			WHILE (mnemonic # NIL) DO
+				w.Char(09X); w.Char(09X); w.String("AddMnemonic(");
+				w.String("op");
+				w.String(mnemonic.name);
+				w.String(", ");
+				w.Char('"');
+				w.String(mnemonic.name);
+				w.Char('"');
+				(*w.String(", ");
+				w.Int(numberInstructions,1);
+				*)
+				w.String(");");
+				w.Ln;
+				mnemonic := mnemonic.next;
+			END; 
+
 			mnemonic := firstMnemonic;
 			maxOpcodeLength:= 0;
+			
+			
 			WHILE(mnemonic # NIL) DO
+				(*
 				IF Strings.Length(mnemonic.name)+1 > maxMnemonicNameLength THEN maxMnemonicNameLength := Strings.Length(mnemonic.name)+1 END;
 				w.Char(09X); w.Char(09X); w.String("StartMnemonic(");
 				w.String("op");
@@ -986,6 +1007,7 @@ TYPE
 				w.String(");");
 				w.Ln;
 				INC(numberMnemonics);
+				*)
 				instruction := mnemonic.firstInstruction;
 				WHILE(instruction # NIL) DO
 					(*
@@ -1004,6 +1026,10 @@ TYPE
 				WHILE(instruction # NIL) DO
 					w.Char(09X); w.Char(09X); 
 					w.String("AddInstruction(");
+					w.String("op");
+					w.String(mnemonic.name);
+					w.String(", ");
+					
 					w.String('"');
 					w.String(instruction.op1);
 					IF instruction.op2 # "" THEN
@@ -1048,7 +1074,9 @@ TYPE
 				w.Int(numberInstructions-1,1);
 				w.String(");");
 				*)
+				(*
 				w.Ln;
+				*)
 				mnemonic := mnemonic.next;
 			END;
 

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott