Messages in this thread |  | | From | Keith Owens <> | Subject | Re: gcc inline asm - short question | Date | Tue, 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/
|  |