[Mono-list] MONO_TYPE_TVALUE

Ferguson, Neale Neale.Ferguson@SoftwareAG-USA.com
Thu, 3 Oct 2002 11:12:27 -0400


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C26AEF.48FAF710
Content-Type: text/plain;
	charset="iso-8859-1"

When you're trampoline is invoked and the routine to be called returns a
structure what do you return to the caller of the trampoline? For S/390 when
you are returned a structure, you pass a hidden parameter to the callee
which points to an area on the stack it can use to return the data. So I
make room on the stack, point (in S/390's case) R2 to it and call the
routine. On return that area contains what I'd expect. Now, how do I return
this information to my caller (which has passed me a pointer to retval)? I
thought I'd move the structure from the stack to the area addressed by
retval but, apparently, that's not correct. Do the other architectures
simply use retval as the "hidden" parameter so the caller puts the data
directly there?

Neale Ferguson 


 

------_=_NextPart_001_01C26AEF.48FAF710
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2713.1100" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=530100716-03102002><FONT face=Arial size=2>When you're 
trampoline is invoked and the routine to be called returns a structure what do 
you return to the caller of the trampoline? For S/390 when you are returned a 
structure, you pass a hidden parameter to the callee which points to an area on 
the stack it can use to return the data. So I make room on the stack, point (in 
S/390's case) R2 to it and call the routine. On return that area contains what 
I'd expect. Now, how do I return this information to my caller (which has passed 
me a pointer to retval)? I thought I'd move the structure from the stack to the 
area addressed by retval but, apparently, that's not correct. Do the 
other&nbsp;architectures simply use retval as the "hidden" parameter so the 
caller puts the data directly there?</FONT></SPAN></DIV>
<P><FONT face="Monotype Corsiva">Neale Ferguson</FONT> <BR></P>
<DIV>&nbsp;</DIV></BODY></HTML>

------_=_NextPart_001_01C26AEF.48FAF710--