From: Ian Campbell Subject: Re: [PATCH v2] libxl: ocaml: guard x86-specific functions behind an ifdef Date: Tue, 14 Jan 2014 15:30:35 +0000 Message-ID: <1389713435.12434.93.camel@kazak.uk.xensource.com> References: <20140111233325.GA30303@dark.recoil.org> <6FB4516F0E9B0F43B54F88D855ABB790DE7744@AMSPEX01CL03.citrite.net> <1389710629.12434.64.camel@kazak.uk.xensource.com> <20140114152303.GA19990@dark.recoil.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140114152303.GA19990@dark.recoil.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Anil Madhavapeddy Cc: Andrew Cooper , Dave Scott , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, 2014-01-14 at 15:23 +0000, Anil Madhavapeddy wrote: > > Perhaps CAMLlocal2 both defines and references the variables keeping > > this issue at bay? > > That's right. CAMLlocal2 creates a stack variable and registers it with > the garbage collector as a root (to ensure that it's not collected during > the lifetime of the function). This keeps it live and always used from > the perspective of the C compiler. Thanks. > Yeah, I'm not aware of any compiler that doesn't respect the noreturn > attribute and also emits unused variable warnings. I didn't modify the > CAMLreturn in favour of minimising the x86/ARM differences, but you could > modify the #endif to be an #else/#endif to only return on x86. I'd prefer > to keep these bindings as straight-line as possible for the 4.4 release > though, and to refactor oxenstored to not depend on them at all in the > future (it only uses a small part of libxc and these cpuid functions > aren't used at all). Thanks, I'm convinced by that argument, this can go in after rc2 is cut. Release-ack: Ian Campbell Ian.