*
*/
-/* #define REGPATCH /* save all registers in link block */
-/* #define UNTESTED /* include untested rules */
+/* #define REGPATCH \* save all registers in link block */
+/* #define UNTESTED \* include untested rules */
#ifdef REGPATCH
#define SL 8
#define NC nocoercions:
/* options */
-/* #define DORCK /* rck is expanded instead of thrown away */
+/* #define DORCK \* rck is expanded instead of thrown away */
#define REGVARS /* use register variables */
EM_WSIZE=2
sti $1==1 | REG source1or2 |
INDSTORE
move(%[2],{regdef1,%[1]}) | | |
-... | NC regconst2 source1or2 |
+... | regconst2 source1or2 |
INDSTORE
move(%[2],{regind1,%[1.reg],%[1.ind]}) | | |
-... | NC ADDR_EXTERNAL source1or2 |
+... | ADDR_EXTERNAL source1or2 |
INDSTORE
move(%[2],{relative1,%[1.ind]}) | | |
-... | NC ADDR_LOCAL source1or2 |
+... | ADDR_LOCAL source1or2 |
INDSTORE
move(%[2],{regind1, lb, tostring(%[1.ind])}) | | |
-... | NC relative2 source1or2 |
+... | relative2 source1or2 |
INDSTORE
move(%[2],{reldef1,%[1.ind]}) | | |
-... | NC regind2 source1or2 |
+... | regind2 source1or2 |
INDSTORE
move(%[2],{reginddef1,%[1.reg],%[1.ind]}) | | |
-sti $1==4 | NC dadres2 FLT_REG |
+sti $1==4 | dadres2 FLT_REG |
INDSTORE
"movfo %[2],*%[1]"
samecc | | |
-... | NC dadres2 ftolong |
+... | dadres2 ftolong |
INDSTORE
"setl\nmovfi %[2.reg],*%[1]\nseti"
samecc | | |
-... | NC regconst2 FLT_REG |
+... | regconst2 FLT_REG |
INDSTORE
"movfo %[2],%[1.ind](%[1.reg])"
samecc | | |
-... | NC regconst2 ftolong |
+... | regconst2 ftolong |
INDSTORE
"setl\nmovfi %[2.reg],%[1.ind](%[1.reg])\nseti"
samecc | | |
-... | NC ADDR_LOCAL FLT_REG |
+... | ADDR_LOCAL FLT_REG |
INDSTORE
"movfo %[2],%[1.ind](r5)"
samecc | | |
-... | NC ADDR_LOCAL ftolong |
+... | ADDR_LOCAL ftolong |
INDSTORE
"setl\nmovfi %[2.reg],%[1.ind](r5)\nseti"
samecc | | |
-... | NC ADDR_EXTERNAL FLT_REG |
+... | ADDR_EXTERNAL FLT_REG |
INDSTORE
"movfo %[2],%[1.ind]"
samecc | | |
-... | NC ADDR_EXTERNAL ftolong |
+... | ADDR_EXTERNAL ftolong |
INDSTORE
"setl\nmovfi %[2.reg],%[1.ind]\nseti"
samecc | | |
"mov (sp)+,(%[1])+"
"mov (sp)+,(%[1])"
erase(%[1]) | | | (4,2040)
-sti $1==8 | NC dadres2 DBL_REG |
+sti $1==8 | dadres2 DBL_REG |
INDSTORE
"movf %[2],*%[1]"
samecc | | |
-... | NC regconst2 DBL_REG |
+... | regconst2 DBL_REG |
INDSTORE
"movf %[2],%[1.ind](%[1.reg])"
samecc | | |
-... | NC ADDR_LOCAL DBL_REG |
+... | ADDR_LOCAL DBL_REG |
INDSTORE
"movf %[2],%[1.ind](r5)"
samecc | | |
-... | NC ADDR_EXTERNAL DBL_REG |
+... | ADDR_EXTERNAL DBL_REG |
INDSTORE
"movf %[2],%[1.ind]"
samecc | | |
... | NC SCR_REG regconst2 |
"add %[2.reg],%[1]" erase(%[1]) |
{regconst2,%[1],%[2.ind]} | | (2,450)
+... | NC CONST2+ADDR_EXTERNAL+ADDR_LOCAL+regconst2 SCR_REG |
+ | %[1] %[2] | adi 2 |
... | NC source2-REG CONST2+ADDR_EXTERNAL+ADDR_LOCAL |
allocate(%[1],REG=%[1]) | %[2] %[a] | adi 2 |
... | NC regconst2 CONST2 | |
move(%[1],r0)
"jsr pc,adi~" | | |
#endif
+loc sbi $2==2 | | | | loc 0-$1 adi 2 |
sbi $1==2 | source2 SCR_REG |
"sub %[1],%[2]"
setcc(%[2]) erase(%[2]) | %[2] | | (2,450)+%[1]
"jsr pc,rmu~" | | |
#endif
slu | | | | sli $1 |
+loc slu | | | | loc $1 sli $2 |
sru $1==2 | SCR_REG xsource2 |
allocate(%[2],REG_PAIR)
move(%[2],%[a.2])
lol lol adp stl $1==$2 && $2==$4 && inreg($1)==2 | |
allocate(REG=regvar($1)) | %[a]
| lol $2 adp $3 stl $2 |
+lol lol adp stl $1==$2 && $2==$4 | |
+ allocate(REG={LOCAL2, $1, 2}) | %[a]
+ | lol $2 adp $3 stl $2 |
lol adp stl $1==$3 && $2==1 && inreg($1)==2 | |
remove(regvar($1))
"inc %(regvar($1)%)"
* Group 15 : Miscellaneous instructions *
************************************************/
-asp $1==2 | | remove(all)
+asp $1==2 | NC xsource2 | | | |
+... | | remove(all)
"tst (sp)+" | | |
asp $1==4 | | remove(all)
"cmp (sp)+,(sp)+" | | |
"mov (sp)+,r1"
"jmp csa~" | | |
#endif
-lae csb $2==2 | source2 |
+lae csb $2==2 | NC source2 |
remove(all)
move(%[1],r1)
move({ADDR_EXTERNAL,$1},r0)
"jmp csb~" | | |
+... | |
+ remove(all)
+ move({ADDR_EXTERNAL,$1},r0)
+ "mov (sp)+,r1"
+ "jmp csb~" | | |
csb $1==2 | |
remove(all)