Thanks to Sean Barrett for helping me compile his bb86 app. I let it rip on this code snippet from the Unnamed RE Project. It’s interesting stuff. I omitted the push, pop, and ret instructions since basic blocks pertain to linear sequences of load, store, and arithmetic instructions:
$ ./bb86 < ~/basic-block.asm Reading stdin Warning: unknown opcode 'bswap' in line 9 Memory locations: mem1 EQU dword+(ebp_0)+08 mem5 EQU dword+(mem4)+((mem3 >> 03)) mem4 EQU dword+(mem1)+10 mem3 EQU dword+(mem1)+04 mem2 EQU dword+(ebp_0)+0c Integer registers: eax = ((mem5 < < cl_0) >> cl_0) ebx = mem4 ecx = (00000020 - mem2) edx = (mem3 >> 03) esi = mem2 edi = mem1 Floating point stack: st(0) = fp3 st(1) = fp2 st(2) = fp1 st(3) = fp0 Memory locations: [dword+(mem1)+04] < = (mem3 + mem2)
I am pretty sure that all of those register states are true at the end of the block, though they are listed in the traditional sequence rather than the logical order. I.e., cl needs to be set before eax could be correct.
I tried out bb86 on a basic block of floating point instructions (using a computation I understand, like the distance between 2 points, rather than a Fourier transform), and it was less than successful (crash). But I can not fault the program since I am feeding it data disassembled by objdump (-Mintel) rather than Microsoft's official format. Again, bb86 is an interesting effort, and I was impressed when I examined the output of test.asm that was packaged with the code (seen in Sean's original comment).