Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [Fall 05 final Q-M3] return value for function in mips

0 views
Skip to first unread message

Jeremy Cowles

unread,
Aug 13, 2008, 11:31:37 PM8/13/08
to
The 7th line implicitly sets the return value - that is, the return value is
the same value that gets returned from malloc().


"james mcallister" <cs61...@imail.EECS.Berkeley.EDU> wrote in message
news:g80889$26q7$1...@agate.berkeley.edu...
>
> The solution for this exam has the type for foo as char*, and part c
> implies
> that this should be the case; however, I thought that values returned from
> a
> function call should be passed in the $v[0|1] registers (per register
> conventions).
>
> Where is the return value (char*) coming from?
>
> Also note, first line of foo_end should be $t0 (dest) rather than $t1
> (src).

Jeremy Cowles

unread,
Aug 13, 2008, 11:54:01 PM8/13/08
to
>> > Also note, first line of foo_end should be $t0 (dest) rather than $t1
>> > (src).

I think you're right - I can't see how that would work.

0 new messages