[9158] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

RE: inline assembly interpretation

daemon@ATHENA.MIT.EDU (Dunlap, Randy)
Mon Jul 10 19:49:30 2000

Message-ID: <D5E932F578EBD111AC3F00A0C96B1E6F0545CF36@orsmsx31.jf.intel.com>
From:	"Dunlap, Randy" <randy.dunlap@intel.com>
To:	"'hiren_mehta@agilent.com'" <hiren_mehta@agilent.com>,
	linux-scsi@vger.rutgers.edu, linux-kernel@vger.rutgers.edu
Date:	Mon, 10 Jul 2000 16:42:00 -0700
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"

Hi,

Are you looking for help with gcc's inline assembly
or with what the instructions (or functions) are doing?

For gcc's assembler info, see
http://gcc.gnu.org/onlinedocs/gcc_4.html#SEC97 & following
pages.

~Randy
___________________________________________________
|Randy Dunlap     Intel Corp., DAL    Sr. SW Engr.|
|randy.dunlap.at.intel.com            503-696-2055|
|NOTE:  Any views presented here are mine alone   |
|and may not represent the views of my employer.  |
|_________________________________________________|

> -----Original Message-----
> From: hiren_mehta@agilent.com [mailto:hiren_mehta@agilent.com]
> Sent: Monday, July 10, 2000 11:24 AM
> To: linux-scsi@vger.rutgers.edu; linux-kernel@vger.rutgers.edu
> Subject: inline assembly interpretation
> 
> 
> Is there any document which can help me understand
> the following lines of inline assembly code ?
> 
> inline void __const_udelay(unsigned long xloops)
> {
> 	int d0;
> 	__asm__("mull %0"
> 		:"=d" (xloops), "=&a" (d0)
> 		:"1" (xloops),"0" (current_cpu_data.loops_per_sec));
>         __delay(xloops);
> }
> 
> 
> void __delay(unsigned long loops)
> {
> 	int d0;
> 	__asm__ __volatile__(
> 		"\tjmp 1f\n"
> 		".align 16\n"
> 		"1:\tjmp 2f\n"
> 		".align 16\n"
> 		"2:\tdecl %0\n\tjns 2b"
> 		:"=&a" (d0)
> 		:"0" (loops));
> }
> 
> Thanks
> -hiren


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post