Received: from eggs.gnu.org ([140.186.70.92]:32787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSbHD-00076c-4M for qemu-devel@nongnu.org; Fri, 03 Jun 2011 16:47:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QSbHB-0003YB-7F for qemu-devel@nongnu.org; Fri, 03 Jun 2011 16:47:26 -0400 Received: from hall.aurel32.net ([88.191.126.93]:60416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSbHA-0003Xz-Ps for qemu-devel@nongnu.org; Fri, 03 Jun 2011 16:47:25 -0400 Date: Fri, 3 Jun 2011 22:47:22 +0200 From: Aurelien Jarno Message-ID: <20110603204722.GE14583@volta.aurel32.net> References: <1303311120-3424-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] target-arm: Move VLD/VST multiple into helper functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, patches@linaro.org On Mon, May 02, 2011 at 05:01:24PM +0100, Peter Maydell wrote: > On 20 April 2011 15:52, Peter Maydell wrote: > > Move VLD/VST multiple into helper functions, as some cases can > > generate more TCG ops than the maximum per-instruction limit > > and certainly more than the recommended 20. > > I've had a review comment in private email that this patch > slows down ffmpeg by a little over 4% (in a linux-user execution > run where about 5% of instructions were an affected vld/vst). So > perhaps the right approach is to increase the max-ops-per-insn limit > and update the guidance in tcg/README instead? > Does this patch fixes a real issue (ie most probably a crash), or it is just to make the arm target compliant with the README? Two remarks there: - The guidance in tcg/README is probably true for complex helpers in the sense of doing a lot of logic/arithmetic operations for which the TCG instruction set if not really rich and for which the compiler can do a lot better. When the instruction is emulated mostly by load/store ops, there isn't much possible optimizations left. - Your patch calls the slow version of the _mmu functions, which doesn't use the QEMU TLB. It is therefore normal to expect a slow down. Unfortunately the fast version of _mmu functions are not really usable from an helper, or at least they need a lot of code to convert an mmu index to the right function. It is something I have on my TODO list for some months, haven't found time to look at it. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net