WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [patch] pagetable cleanups

On Thu, 2005-04-14 at 14:07 -0500, Anthony Liguori wrote:
> On Thu, 2005-04-14 at 13:27, Hollis Blanchard wrote:
> > So no memcpys at all; the caller fills in the values directly into the
> > callee's struct.
> 
> Unless you're dealing with struct assignments.  You basically get a
> memcpy() when you assign structs.

I have attached my testcase. Compile with -c and disassemble the object
file.

It is certainly possible that the callee could create a temporary struct
on its stack and memcpy into the address provided by the ABI. However,
even at -O0 the address of the struct is popped off the stack and used
directly when assigning to structure fields. I'm using gcc 3.3.5.

-- 
Hollis Blanchard
IBM Linux Technology Center

Attachment: ctest.c
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel