[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Intel Assembly error

Branden Robinson <branden@debian.org> wrote:

>> /* the original bogomips code from the Linux kernel */
>> static __inline__ void delay(int loops)
>> {
>>   __asm__(".align 2,0x90\n1:\tdecl %0\n\tjns 1b": :"a" (loops):"ax");
>> }

You can either read the GCC FAQ or the GCC info on the details of this

But in order to add some signal to this message, the above line should be
rewritten as

int bradon;
__asm__(".align 2,0x90\n1:\tdecl %0\n\tjns 1b"
	: "=a" (=brandon): "0" (loops));

> I am not an assembly guru on any architecture, but here's what I think this
> means.  Please be warned that these could be the ravings of a deranged
> lunatic.

Which they are, as usual.
Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Reply to: