Ticket #702: bf-without-bsr-ret.patch
File bf-without-bsr-ret.patch, 0.9 KB (added by fperrad, 12 years ago) |
---|
-
bfco.pir
7 7 # XXX does no register range checking 8 8 # it runs the bench.bf 15 times faster then bfc.imc 9 9 10 .macro debug() 11 concat code, "# depth " 12 $S0 = depth 13 concat code, $S0 14 concat code, " reg " 15 $S0 = reg 16 concat code, $S0 17 concat code, "\n" 18 .endm 19 10 20 .sub main :main 11 21 .param pmc argv 12 22 … … 141 151 goto gt_loop 142 152 emit_gt: 143 153 reg += n_gt 144 bsr debug154 .debug() 145 155 pc = $I0 - 1 146 156 goto NEXT 147 157 … … 158 168 goto lt_loop 159 169 emit_lt: 160 170 reg -= n_lt 161 bsr debug171 .debug() 162 172 pc = $I0 - 1 163 173 goto NEXT 164 174 … … 264 274 $P0 = $P1( code ) 265 275 $P0() 266 276 end 267 268 debug:269 ret270 concat code, "# depth "271 $S0 = depth272 concat code, $S0273 concat code, " reg "274 $S0 = reg275 concat code, $S0276 concat code, "\n"277 ret278 277 .end 279 278 280 279 # Local Variables: