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

To: "Anthony Liguori" <aliguori@xxxxxxxxxx>, "Hollis Blanchard" <hollisb@xxxxxxxxxx>
Subject: RE: [Xen-devel] [patch] pagetable cleanups
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Thu, 14 Apr 2005 20:33:00 +0100
Cc: Michael A Fetterman <Michael.Fetterman@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Mark Williamson <Mark.Williamson@xxxxxxxxxxxx>, Gerd Knorr <kraxel@xxxxxxxxxxx>
Delivery-date: Thu, 14 Apr 2005 19:32:49 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcVBIvPiKFSCb51qSPy5gYLQexoBBwABO07g
Thread-topic: [Xen-devel] [patch] pagetable cleanups
 
> Because you cannot rely on the optimization, structs are not 
> typically returned by value.  Since this is so rarely done, 
> I'd argue it's more readable to pass a struct as an argument 
> (the fact that some people don't even realize it's possible 
> should support that). 

Gcc optimises the case where an 8 byte struct is returned from an inline
function just fine. It's far more likely to generate poor code when you
start passing values by reference. I don't buy your readability
argument: Being able to use the return value in expressions can make
code rather easier to grock. 

Ian

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

<Prev in Thread] Current Thread [Next in Thread>