added patterns for inc/dec/adp of local and external offsetted
This makes the getc() macro from C very efficient, among others
This commit is contained in:
parent
eebcf1b22c
commit
e682a47599
1 changed files with 73 additions and 8 deletions
|
@ -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 |
|
||||
|
|
Loading…
Add table
Reference in a new issue