lkml.org 
[lkml]   [2002]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: gcc inline asm - short question
Date
On Mon, 18 Mar 2002 15:27:40 -0800 (PST), 
Carl Spalletta <cspalletta@yahoo.com> wrote:
> asm ( assembler template
> : output operands (optional)
> : input operands (optional)
> : list of clobbered registers (optional)
> );
>
> I have read all the docs and I still can't clearly understand when it
>is required to specify a clobberlist - a register or memory that will
>be modified and must be preserved by gcc.

The clobber list is _extra_ clobbers, registers or memory that gcc
cannot deduce from the other parameters. =d" (xloops), "=&a" (d0)
already tells gcc that edx and eax are used, you do not need to
explicitly specify them as clobbers. OTOH, asm ("mov 1, %eax")
requires a clobber because the operands do not mention eax.

-
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:21    [W:0.035 / U:5.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site