Przeglądaj źródła

Added i386 description

ceriel 32 lat temu
rodzic
commit
0bfa4970c5

+ 1 - 0
util/ego/descr/.distr

@@ -1,6 +1,7 @@
 proto.make
 descr.sed
 i86.descr
+i386.descr
 m68020.descr
 m68k2.descr
 m68k4.descr

+ 1 - 1
util/ego/descr/em22.descr

@@ -70,7 +70,7 @@ overflow harmful?:  yes
 array bound harmful?:  yes
 reduce sli if shift count larger than:  0
 %%CS
-#include "../../../h/em_mnem.h"
+#include "em_mnem.h"
 first time then space:
 addressing modes: -1
                   -1

+ 1 - 1
util/ego/descr/em24.descr

@@ -70,7 +70,7 @@ overflow harmful?:  yes
 array bound harmful?:  yes
 reduce sli if shift count larger than:  0
 %%CS
-#include "../../../h/em_mnem.h"
+#include "em_mnem.h"
 first time then space:
 addressing modes: -1
                   -1

+ 1 - 1
util/ego/descr/em44.descr

@@ -70,7 +70,7 @@ overflow harmful?:  yes
 array bound harmful?:  yes
 reduce sli if shift count larger than:  0
 %%CS
-#include "../../../h/em_mnem.h"
+#include "em_mnem.h"
 first time then space:
 addressing modes: -1
                   -1

+ 100 - 0
util/ego/descr/i386.descr

@@ -0,0 +1,100 @@
+wordsize: 4
+pointersize: 4
+%%RA
+general registers: 2
+address registers: 0
+floating point registers: 0
+use general as pointer: yes
+
+register score parameters:
+        local variable:
+                (2 cases)
+                pointer,general
+                        (1 size)
+                        default ->      (8,4)
+                general,general
+                        (1 size)
+                        default ->      (4,2)
+        address of local variable:
+                (2 cases)
+                pointer,general
+                        (1 size)
+                        default ->      (0,0)
+                general,general
+                        (1 size)
+                        default ->      (2,2)
+        constant:
+                (1 sizes)
+                default ->      (2,2)
+        double constant:
+                (1 size)
+                default ->      (-1,-1)
+        address of global variable:
+                (1 size)
+                default ->      (4,2)
+        address of procedure:
+                (1 size)
+                default ->      (2,2)
+
+opening cost parameters:
+        local variable:
+                (2 cases)
+                pointer
+                        (1 size)
+                        default ->      (9,4)
+                general
+                        (1 size)
+                        default ->      (9,4)
+        address of local variable:
+                (2 cases)
+                pointer
+                        (1 size)
+                        default ->      (10,6)
+                general
+                        (1 size)
+                        general ->      (10,6)
+        constant:
+                (1 size)
+                default ->      (4,4)
+        double constant:
+                (1 size)
+                default ->      (1000,1000)
+        address of global variable:
+                (1 size)
+                default ->      (4,4)
+        address of procedure:
+                (1 size)
+                default ->      (4,4)
+
+register save costs:
+        (4 cases)
+        0 -> (0,0)
+        1 -> (18,2)
+        2 -> (36,4)
+        0 -> (0,0)
+
+%%UD
+access costs of global variables:
+	(1 size)
+	default ->	(4,2)
+access costs of local variables:
+	(1 size)
+	default ->	(4,2)
+%%SR
+overflow harmful?:  no
+array bound harmful?:  no
+reduce sli if shift count larger than:  0
+%%CS
+#include "em_mnem.h"
+first time then space:
+addressing modes: op_adp op_lof op_ldf op_loi op_dch op_lpb -1
+                  op_adp op_lof op_ldf op_loi op_dch op_lpb -1
+cheap operations: op_cii op_cui op_ciu op_cuu -1
+                  op_cii op_cui op_ciu op_cuu -1
+lexical tresholds: 1 1
+indirection limit: 8
+do not eliminate sli if index on shiftcounts:   -1
+                                                -1
+forbidden operators: -1 -1
+%%SP
+global stack pollution allowed?: no

+ 1 - 1
util/ego/descr/i86.descr

@@ -85,7 +85,7 @@ overflow harmful?:  no
 array bound harmful?:  no
 reduce sli if shift count larger than:  0
 %%CS
-#include "../../../h/em_mnem.h"
+#include "em_mnem.h"
 first time then space:
 addressing modes: op_adp op_lof op_ldf op_loi op_dch op_lpb -1
                   op_adp op_lof op_ldf op_loi op_dch op_lpb -1

+ 1 - 1
util/ego/descr/m68020.descr

@@ -94,7 +94,7 @@ overflow harmful?:  no
 array bound harmful?:  no
 reduce sli if shift count larger than:  3
 %%CS
-#include "../../../h/em_mnem.h"
+#include "em_mnem.h"
 first time then space:
 addressing modes: op_ads op_adp op_lof op_ldf op_loi op_dch op_lpb -1
 		  op_ads op_adp op_lof op_ldf op_loi op_dch op_lpb -1

+ 1 - 1
util/ego/descr/m68k2.descr

@@ -92,7 +92,7 @@ overflow harmful?:  no
 array bound harmful?:  no
 reduce sli if shift count larger than:  0
 %%CS
-#include "../../../h/em_mnem.h"
+#include "em_mnem.h"
 first time then space:
 addressing modes: op_adp op_lof op_ldf op_loi op_dch op_lpb -1
 		  op_adp op_lof op_ldf op_loi op_dch op_lpb -1

+ 1 - 1
util/ego/descr/m68k4.descr

@@ -94,7 +94,7 @@ overflow harmful?:  no
 array bound harmful?:  no
 reduce sli if shift count larger than:  0
 %%CS
-#include "../../../h/em_mnem.h"
+#include "em_mnem.h"
 first time then space:
 addressing modes: op_adp op_lof op_ldf op_loi op_dch op_lpb -1
 		  op_adp op_lof op_ldf op_loi op_dch op_lpb -1

+ 1 - 1
util/ego/descr/pdp.descr

@@ -84,7 +84,7 @@ overflow harmful?:  no
 array bound harmful?:  no
 reduce sli if shift count larger than:  0
 %%CS
-#include "../../../h/em_mnem.h"
+#include "em_mnem.h"
 first time then space:
 addressing modes: op_adp op_lof op_ldf op_loi op_dch op_lpb -1
 		  op_adp op_lof op_ldf op_loi op_dch op_lpb -1

+ 5 - 1
util/ego/descr/proto.make

@@ -8,6 +8,7 @@ EMH = $(TARGET_HOME)/h
 
 SOURCES = \
 	$(SRC_DIR)/i86.descr \
+	$(SRC_DIR)/i386.descr \
 	$(SRC_DIR)/m68k2.descr \
 	$(SRC_DIR)/pdp.descr \
 	$(SRC_DIR)/vax4.descr \
@@ -19,7 +20,7 @@ SOURCES = \
 	$(SRC_DIR)/em44.descr
 
 TARGETS = i86descr m68k2descr vax4descr pdpdescr m68k4descr m68020descr \
-	  em22descr em24descr em44descr sparcdescr
+	  em22descr em24descr em44descr sparcdescr i386descr
 
 PRFILES = $(SRC_DIR)/proto.make $(SRC_DIR)/descr.sed $(SOURCES)
 
@@ -70,3 +71,6 @@ em44descr:	$(SRC_DIR)/em44.descr $(SRC_DIR)/descr.sed
 sparcdescr:	$(SRC_DIR)/sparc.descr $(SRC_DIR)/descr.sed
 		$(CPP) -P -I$(EMH) $(SRC_DIR)/sparc.descr | sed -f $(SRC_DIR)/descr.sed > sparcdescr
 
+i386descr:	$(SRC_DIR)/i386.descr $(SRC_DIR)/descr.sed
+		$(CPP) -P -I$(EMH) $(SRC_DIR)/i386.descr | sed -f $(SRC_DIR)/descr.sed > i386descr
+

+ 1 - 1
util/ego/descr/sparc.descr

@@ -89,7 +89,7 @@ overflow harmful?:  no
 array bound harmful?:  yes
 reduce sli if shift count larger than:  0
 %%CS
-#include "../../../h/em_mnem.h"
+#include "em_mnem.h"
 first time then space:
 addressing modes: -1
                   -1

+ 1 - 1
util/ego/descr/vax4.descr

@@ -103,7 +103,7 @@ overflow harmful?:  no
 array bound harmful?:  no
 reduce sli if shift count larger than:  3
 %%CS
-#include "../../../h/em_mnem.h"
+#include "em_mnem.h"
 first time then space:
 addressing modes: op_adp op_lof op_ldf op_loi op_dch op_lpb -1
 		  op_adp op_lof op_ldf op_loi op_dch op_lpb -1