The file hashfunctions.c in SOAPdenovo2 has many hardware intensive functions, and one of them is coded in assembly language.
static uint32_t cpuid ( uint32_t functionInput )
asm ( “pushl %%ebx\n\t” /* save %ebx */
“movl %%ebx, %[ebx]\n\t” /* save what cpuid just put in %ebx */
- “popl %%ebx” : “=a” ( eax ), [ebx] “=r” ( ebx ), “=c” ( ecx ), “=d” ( edx ) :
- “a” ( functionInput )
asm ( “cpuid” : “=a” ( eax ), “=b” ( ebx ), “=c” ( ecx ), “=d” ( edx ) : “a” ( functionInput ) );
We were looking for a good source on assembly language features of gcc and found this website. Please note that there are two different formats - Intel code and AT&T; code. SOAPdenovo2 seems to be following AT&T; format.
Separately, we were searching for few good websites on multi-threading and found following two excellent links -