From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7Evv-0004fH-4D for qemu-devel@nongnu.org; Wed, 07 Aug 2013 21:22:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7Evo-0001UR-1G for qemu-devel@nongnu.org; Wed, 07 Aug 2013 21:22:31 -0400 Received: from mail6.webfaction.com ([74.55.86.74]:35043 helo=smtp.webfaction.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7Evn-0001UD-Pd for qemu-devel@nongnu.org; Wed, 07 Aug 2013 21:22:23 -0400 Message-ID: <5202F2CE.60602@ctshepherd.com> Date: Thu, 08 Aug 2013 02:22:22 +0100 From: Charlie Shepherd MIME-Version: 1.0 References: <1375728247-1306-1-git-send-email-charlie@ctshepherd.com> <20130806093753.GH3117@dhcp-200-207.str.redhat.com> In-Reply-To: <20130806093753.GH3117@dhcp-200-207.str.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] RFC: [PATCH 0/5] Explicitly annotating coroutine_fn functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: pbonzini@redhat.com, gabriel@kerneis.info, qemu-devel@nongnu.org, stefanha@gmail.com On 06/08/2013 10:37, Kevin Wolf wrote: > Am 05.08.2013 um 20:44 hat Charlie Shepherd geschrieben: >> This patch series is a follow up to a previous RFC about converting functions >> that dynamically yield execution depending on whether they are in executing in >> a coroutine context or not to be explicitly statically annotated. This change >> is necessary for the GSoC CPC project, but was also agreed in an IRC >> conversation on #qemu to be benefical overall if it can be upstream before the >> end of the project. This is an update to see if the approach I'm taking to >> implementing this conversion is correct. >> >> In order to statically check the tree to ensure the annotations are correct, >> I've been using CPC to compile the QEMU tree. This does a source to source >> translation to convert coroutine code to continuation-passing style (the >> purpose of the GSoC project), but as a side benefit statically checks >> annotations (any functions annotated with coroutine_fn are transformed into >> CPS, so have a different "calling style" to the standard C convention). >> >> In order to compile the tree with CPC: >> $ git clone git://github.com/kerneis/cpc.git >> $ cd cpc >> $ make >> $ ./configure >> $ make >> $ cd .. >> $ export CPC=$(pwd)/cpc/bin/cpc >> $ cd qemu >> $ mkdir -p bin/cpc >> $ cd bin/cpc >> $ ../../configure --enable-debug --disable-werror --target-list=x86_64-softmmu --cc="$CPC" --extra-cflags="--noMakeStaticGlobal --useLogicalOperators --useCaseRange --save-temps -U__SSE2__ -w -Dcoroutine_fn='__attribute__((__cps__))' --docpsInference --warnall " >> $ make > Against which tree is this? It didn't apply on top of qemu-git master, > nor on my block branch. Sorry, just to clarify, this isn't based on QEMU but is a repository containing the CPC tool, which can then be used to statically check QEMU; you'll need to clone it into its own repo. In this example it should be a sibling directory to whichever QEMU checkout you're testing it on. Charlie