added patterns for inc/dec/adp of local and external offsetted
authorsater <none@none>
Wed, 15 Aug 1984 14:31:54 +0000 (14:31 +0000)
committersater <none@none>
Wed, 15 Aug 1984 14:31:54 +0000 (14:31 +0000)
This makes the getc() macro from C very efficient, among others

mach/pdp/cg/table

index d782340..5379d58 100644 (file)
@@ -1093,8 +1093,6 @@ lol del $1==$2 && inreg($1)==2 | |
 lol del $1==$2 | |
                        allocate(REG={LOCAL2, $1, 2})   | %[a] 
                                                        | del $2 |
-lol adp dup stl $1==$4 && $3==2 && inreg($1)==2        | | |
-                                       | lol $1 adp $2 stl $1 lol $1 |
 lol adp stl $1==$3 && $2==1 && inreg($1)==2 | |
                        remove(regvar($1))
                        "inc %(regvar($1)%)"
@@ -1109,16 +1107,33 @@ lol adp stl $1==$3 && inreg($1)==2 | |
                        erase(regvar($1))               |       | |
 lil adp sil $1==$3 && $2==1 && inreg($1)==2 | |
                        INDSTORE
-                       "inc *%(regvar($1)%)"
-                       erase(regvar($1))               |       | |
+                       "inc *%(regvar($1)%)"           |       | |
 lil adp sil $1==$3 && $2==0-1 && inreg($1)==2 | |
                        INDSTORE
-                       "dec *%(regvar($1)%)"
-                       erase(regvar($1))               |       | |
+                       "dec *%(regvar($1)%)"           |       | |
 lil adp sil $1==$3 && inreg($1)==2 | |
                        INDSTORE
-                       "add $$$2,*%(regvar($1)%)"
-                       erase(regvar($1))               |       | |
+                       "add $$$2,*%(regvar($1)%)"      |       | |
+lol lof inc lol stf $1==$4 && $2==$5 && inreg($1)==2 | |
+                       INDSTORE
+                       "inc $2(%(regvar($1)%))"
+                       setcc({regind2, regvar($1), tostring($2)}) | | |
+lol lof dec lol stf $1==$4 && $2==$5 && inreg($1)==2 | |
+                       INDSTORE
+                       "dec $2(%(regvar($1)%))"
+                       setcc({regind2, regvar($1), tostring($2)}) | | |
+lol lof adp lol stf $1==$4 && $2==$5 && inreg($1)==2 && $3==1 | |
+                       INDSTORE
+                       "inc $2(%(regvar($1)%))"
+                       setcc({regind2, regvar($1), tostring($2)}) | | |
+lol lof adp lol stf $1==$4 && $2==$5 && inreg($1)==2 && $3==0-1 | |
+                       INDSTORE
+                       "dec $2(%(regvar($1)%))"
+                       setcc({regind2, regvar($1), tostring($2)}) | | |
+lol lof adp lol stf $1==$4 && $2==$5 && inreg($1)==2 | |
+                       INDSTORE
+                       "add $3,$2(%(regvar($1)%))"
+                       setcc({regind2, regvar($1), tostring($2)}) | | |
 #endif
 lol loc sbi stl $1==$4 && $3==2 | | 
                        remove(indordef)
@@ -1198,6 +1213,56 @@ loe loi adp loe sti $1==$4 && $2==2 && $5==2 | |
                        INDSTORE
                        "add $$$3,*$1"
                        setcc({reldef2,$1})             |       | |
+lol lof inc lol stf $1==$4 && $2==$5 | |
+                       INDSTORE
+                       allocate(REG={LOCAL2, $1, 2})
+                       "inc $2(%[a])"
+                       setcc({regind2, %[a], tostring($2)}) | | |
+lol lof dec lol stf $1==$4 && $2==$5 | |
+                       INDSTORE
+                       allocate(REG={LOCAL2, $1, 2})
+                       "dec $2(%[a])"
+                       setcc({regind2, %[a], tostring($2)}) | | |
+lol lof adp lol stf $1==$4 && $2==$5 && $3==1 | |
+                       INDSTORE
+                       allocate(REG={LOCAL2, $1, 2})
+                       "inc $2(%[a])"
+                       setcc({regind2, %[a], tostring($2)}) | | |
+lol lof adp lol stf $1==$4 && $2==$5 && $3==0-1 | |
+                       INDSTORE
+                       allocate(REG={LOCAL2, $1, 2})
+                       "dec $2(%[a])"
+                       setcc({regind2, %[a], tostring($2)}) | | |
+lol lof adp lol stf $1==$4 && $2==$5 | |
+                       INDSTORE
+                       allocate(REG={LOCAL2, $1, 2})
+                       "add $3,$2(%[a])"
+                       setcc({regind2, %[a], tostring($2)}) | | |
+loe lof inc loe stf $1==$4 && $2==$5 | |
+                       INDSTORE
+                       allocate(REG={relative2, $1})
+                       "inc $2(%[a])"
+                       setcc({regind2, %[a], tostring($2)}) | | |
+loe lof dec loe stf $1==$4 && $2==$5 | |
+                       INDSTORE
+                       allocate(REG={relative2, $1})
+                       "dec $2(%[a])"
+                       setcc({regind2, %[a], tostring($2)}) | | |
+loe lof adp loe stf $1==$4 && $2==$5 && $3==1 | |
+                       INDSTORE
+                       allocate(REG={relative2, $1})
+                       "inc $2(%[a])"
+                       setcc({regind2, %[a], tostring($2)}) | | |
+loe lof adp loe stf $1==$4 && $2==$5 && $3==0-1 | |
+                       INDSTORE
+                       allocate(REG={relative2, $1})
+                       "dec $2(%[a])"
+                       setcc({regind2, %[a], tostring($2)}) | | |
+loe lof adp loe stf $1==$4 && $2==$5 | |
+                       INDSTORE
+                       allocate(REG={relative2, $1})
+                       "add $3,$2(%[a])"
+                       setcc({regind2, %[a], tostring($2)}) | | |
 loe ine $1==$2 | |
                        allocate(REG={relative2, $1})   | %[a] 
                                                        | ine $2 |