Re: Assembly question

From: Mark Zealey (mark@zealos.org)
Date: Thu Apr 25 2002 - 18:52:41 EST


On Thu, Apr 25, 2002 at 10:32:25AM +0200, Szekeres Istvan wrote:

> void p_memset_dword( void *d, int b, int l )
> {
> __asm__ ("rep\n\t"
> "stosl\n\t"
> :
> : "D" (d), "a" (b), "c" (l)
> : "memory","edi", "eax", "ecx"

An input or output operand is implicitly clobbered, so it should be written as:

        : "D" (d), "a" (b), "c" (l)
        : "memory"

Or so.

-- 

Mark Zealey (aka JALH on irc.openprojects.net: #zealos and many more) mark@zealos.org; mark@itsolve.co.uk

UL++++>$ G!>(GCM/GCS/GS/GM) dpu? s:-@ a17! C++++>$ P++++>+++++$ L+++>+++++$ !E---? W+++>$ !w--- r++ !t---?@ !X---? !R- !tv b+ G+++ e>+++++ !h++* r!-- y-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 30 2002 - 22:00:11 EST