Date: Tue, 15 Apr 1997 11:19:57 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: ccsanady@nyx.pr.mcs.net (Chris Csanady) Cc: hackers@FreeBSD.ORG Subject: Re: inline asm question.. Message-ID: <199704151819.LAA22852@phaeton.artisoft.com> In-Reply-To: <199704150943.EAA03061@nyx.pr.mcs.net> from "Chris Csanady" at Apr 15, 97 04:43:37 am
next in thread | previous in thread | raw e-mail | index | archive | help
> I am trying to create an inline asm function, and was wondering if someone > might help. I am getting quite frustrated with all of the cryptic gcc/as > commands, and still have no clue as to how it translates into instructions. > > All I wanted to do was to make the below inline function generate the > following code. (It is a piece from one of Van Jacobsons mails..) I > realize this is for sparc, but it really doesnt matter.. > > /* NB - ocadd is an inline gcc assembler function */ > cksum = ocadd(ocadd(ocadd(ocadd(cksum, seq), ack), flg), sum); Is it an inline function, or is it a function which has been inlined? I belive you can't inline (using the "inline" keyword) a function with asm statements. Use a macro definition instead to cause the asm statements to be expanded "in line" by the preprocessor. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704151819.LAA22852>