After replacing more inline assembly with C/C++ I was indeed able to get
something to render so I could at least visually debug. That means I can
now work backwards: adding blocks of inline assembly back in and
carefully verifying that the gcc inline assembly matches the original
through disassembly.
In addition, I also found some documentation which should help me make
proper run-time tests, as such tests are the only real way to verify the
C/C++ and make sure this works on architectures besides x86-32.
Between those two methods I think I'll be able to smoothly finish this.
Thank you both very much!
On 12/28/2012 06:46 PM, Oleg Endo wrote:
On Sun, 2012-12-23 at 00:39 -0500, John Cotton Ericson wrote:
I agree, I tried to make my inline assembly as match the original as
much is possible. But you just can't rule it out while it's still there.
Well, as a first step, I'd replace all inline asm stuff with C/C++
implementations in the original version using MSVC. Performance might
become worse than the original, or it might not. Either way, I'd leave
those optimizations for later. Moreover, it would give you a CPU
independent version of the code, which is often a good thing :)
For testing would you recommend something like
http://check.sourceforge.net/ ?
A test_main with a bunch of assert checks should suffice as a start.
Cheers,
Oleg