Eric W. Biederman wrote:
gcc is a long ways from doing this in registers without a major re-write, which is probably about as much work as your implementation in assy. Very clever assy code, BTW.
I just picked that code along with the nrv2b algorithm out of libucl. But I can at least recognize a good thing when I see it.
Yeah, I figured that out after staring at it and the C code for a while, and then found it in the ucl library. After manipulating the decompression C-code for a while, I'm pretty convinced that compiling this without spilling registers is a hard problem, even with a lot of re-arraranging. The assy code appears to take into account additional information about the algorithm that is not readily apparent from the C code, at least, that is the conclusion I came to after an hour or so of analyzing it.
-Steve