I love looking at the resulting tal code from my little C programs, I've been trying to compile a 6502 assembler for uxn. When writing uxntal I have this tool called uxnli that does simple graph reduction and finds little optimizations, it found a couple of things, here's a few highlights:
I love looking at the resulting tal code from my little C programs, I've been trying to compile a 6502 assembler for uxn. When writing uxntal I have this tool called uxnli that does simple graph reduction and finds little optimizations, it found a couple of things, here's a few highlights:
STH2kr LDA
->LDAkr STHr
SWP ORA
, ORA doesn't need a specific orderDUP2 LDA
->LDAk
#10 SFT
->DUP ADD
#0002 ADD2
->INC2 INC2
#ffff NEQ2
->INC2 ORA
Keep up the good work! xneko really made my day.