lkml.org 
[lkml]   [2002]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Assembly question
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/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:2.980 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site