dschmenk / PLASMA

Proto Language AsSeMbler for All (formerly Apple)
MIT License
191 stars 26 forks source link

Optimise "CB 1:SHL" to "DUP:ADD" #25

Closed ZornsLemma closed 7 years ago

ZornsLemma commented 7 years ago

Hi Dave,

Here's a simple tweak to the peephole optimiser - I believe this is valid, and it saves one byte and (by a quick count) 11 cycles every time. I've given this a light test so I thought given it's so straightforward I'd send it straight over to you without sitting on it for a while.

Cheers.

Steve

ZornsLemma commented 7 years ago

Great, thanks Dave.