On Tue, Sep 23, 2014 at 4:32 PM, Jakub Jelinek <ja...@redhat.com> wrote: > You are doing a call in the inline-asm behind compiler's back, and > some registers are call clobbered in the ABI. So, unless you call a very > special function written in assembly that doesn't clobber those registers > (basically, uses a custom calling convention), you need to tell the compiler > that your inline-asm clobbers all call clobbered registers in the inline-asm > pattern. That is not just about general purpose registers, but e.g. > SSE registers or i387 registers are clobbered too. > > Jakub
Sorry I still don't get it. The inline-asm codes are put in the very end of the test function just before return, so the clobbered registers are not used by gcc. The %edx gets overwritten before the inline-asm block. I just did a modification to the inline-asm codes to indicate to gcc that %edx is clobbered, but it did not help. Regards, Bin