From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3658b755213322c8dfc67a2ccb692cca@plan9.bell-labs.com> Date: Fri, 20 May 2005 11:07:44 -0400 From: jmk@plan9.bell-labs.com To: russcox@gmail.com, 9fans@cse.psu.edu Subject: Re: [9fans] return vlong In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Cc: Topicbox-Message-UUID: 4dc4dddc-ead0-11e9-9d60-3106f5b1d025 that's on the 386. other architectures may return the value in one or two registers. On Fri May 20 11:01:27 EDT 2005, russcox@gmail.com wrote: > a call to a function that returns a vlong or structure > passes an invisible (to the c programmer) first argument > that is a pointer to somewhere to write the return value. > so the following two functions have equivalent assembly > (but different c types): > > vlong > return0(void) > { > return 0; > } > > void > return0(vlong *v) > { > *v = 0; > } > > russ