I have two routines (which, in C, are a total of 300 lines of code with comments, so not much code here) that I want to implement as inline x86 assembler (both MASM and AT&T format). One routine I have already translated to MASM format and hand optimized. But I am no asm guru. So your mission with this code is to simply look at what I have done and advise. Then translate into AT&T format suitable for inlining with gcc. The other routine I have not even attempted: I have a feeling that the right person could do this much better than the compiler's code generator is spitting out. For this code you'll have the .asm file from MSVC to use for a starting point. The deliverable is the same code in MASM format and AT&T format hand optimized. Let me conclude by saying I am looking for someone with a lot of experience with x86 assembly language. I know enough to do better than the compiler myself but I am looking for expertise here. If you do not know about stuff like AGI stalls, using LEA instructions to eliminate shifts etc... then please don't bid. x86 gurus only, please.
1) Code listings for 2 routines. Both listings must be given in MASM (suitable for embedding with __asm in MSVC) and AT&T (suitable for embedding with asm("") in gcc) formats.
to be inlined in C code that is built with MSVC7.0 and gcc on win32 x86 and freebsd x86.