lkml.org 
[lkml]   [2002]   [Mar]   [18]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
FromKeith Owens <>
SubjectRe: gcc inline asm - short question
DateTue, 19 Mar 2002 10:50:36 +1100
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 12:21    [from the cache]
©2003-2008