Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site rexago1.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!cwruecmp!rexago1!rich From: rich@rexago1.UUCP (K. Richard Magill) Newsgroups: net.lang.c Subject: Re: Long Longs (inline functions) Message-ID: <193@rexago1.UUCP> Date: Tue, 4-Mar-86 11:58:39 EST Article-I.D.: rexago1.193 Posted: Tue Mar 4 11:58:39 1986 Date-Received: Fri, 7-Mar-86 04:50:32 EST References: <491@faron.UUCP> <3408@umcp-cs.UUCP> Reply-To: rich@rexago1.UUCP (K. Richard Magill) Distribution: net Organization: Roadway Express Inc., Akron, OH Lines: 28 Keywords: inline functions SYSV 3b2/300 Summary: 3b2/300 has them too in reference to functions vs inline code... In article <3408@umcp-cs.UUCP> chris@umcp-cs.UUCP (Chris Torek) writes: >One method, used in the 4BSD kernel and in Franz Lisp, is to write >a `sed' script, and run the output of the compiler through this. >Thus what looks like a function call is actually expanded in-line: > > # foo.e - sed script to expand various routines in line > # > # Usage: /lib/cpp file.c | /lib/ccom | sed -f foo.e | /lib/c2 | \ > # as -o file.o > # (or use .s files if your `as' cannot read pipes). > # > # Change calls to `foo' to a `bar' instruction. > # Foo takes two arguments and presents a return > # value in r0. > /calls $2,_foo/s//movl (sp)+,r0\ > movl (sp)+,r1\ > bar r1,r0/ Paraphrased from "Maxicomputing in Microspace", (WE32100 info manual select code 451-000): Under the -O option the compiler expands functions inline providing, 1) the function has no local variables 2) no registers are saved 3) the function appears in the same file. ... K. Richard Magill