bogomips
Martin Mares
mj na atrey.karlin.mff.cuni.cz
Pátek Leden 30 12:45:56 CET 1998
Hi,
> najprv rutinka __delay pre x86, z include/asm/delay.h
> extern __inline__ void __delay(int loops)
> {
> __asm__ __volatile__(
> ".align 2,0x90\n1:\tdecl %0\n\tjns 1b"
> :/* no outputs */
> :"a" (loops)
> :"ax");
> }
> povedane po nasom, word align nopmi, potom dec parametra az kym nie je
> carry. cize netestuje nijake ine instrukcie..
Tohle negunfuje prilis spolehlive na Cyrixech a podobnych procesorech -- ten
align musi byt minimalne na hranici 16 bytu (viz
/usr/src/linux-2.1/arch/i386/kernel/delay.S).
Have a nice fortnight
--
Martin `MJ' Mares <mj na ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"return(ENOTOBACCO); /* Read on an empty pipe */"
Další informace o konferenci Linux