Received: from eggs.gnu.org ([2001:4830:134:3::10]:40004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwfcN-0008JD-5c for qemu-devel@nongnu.org; Tue, 18 Oct 2016 21:24:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwfcK-00030d-2p for qemu-devel@nongnu.org; Tue, 18 Oct 2016 21:24:31 -0400 Received: from mail-io0-x244.google.com ([2607:f8b0:4001:c06::244]:34943) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bwfcJ-000305-TN for qemu-devel@nongnu.org; Tue, 18 Oct 2016 21:24:28 -0400 Received: by mail-io0-x244.google.com with SMTP id p26so802867ioo.2 for ; Tue, 18 Oct 2016 18:24:27 -0700 (PDT) Sender: Richard Henderson References: <20160927233049.5429-1-marex@denx.de> <20160927233049.5429-2-marex@denx.de> <20d61df8-b345-b097-8d9b-4a619849d86c@twiddle.net> <82ddeb82-768b-57d1-5962-a6940e5001c7@denx.de> <496742f4-af10-e029-62a2-f2c5054c9303@twiddle.net> <15816d97-1ea9-44df-01d0-10ee10430af2@denx.de> <5dacaa8f-646f-9bce-f362-1d5927893f73@denx.de> From: Richard Henderson Message-ID: <434bbc7d-2a13-0253-0af0-151e43a89e16@twiddle.net> Date: Tue, 18 Oct 2016 18:24:23 -0700 MIME-Version: 1.0 In-Reply-To: <5dacaa8f-646f-9bce-f362-1d5927893f73@denx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/7] nios2: Add architecture emulation support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marek Vasut , qemu-devel@nongnu.org Cc: Jeff Da Silva , Chris Wulff , Sandra Loosemore , Yves Vandervennet , Ley Foon Tan On 10/18/2016 03:05 PM, Marek Vasut wrote: >>> Thanks, I hope this is fixed now, although I mostly special-case the >>> R_ZERO handling throughout the code. Any writes to R_ZERO are now >>> ignored and any usage is converted to mov/movi instructions where >>> applicable. >> >> We've done that in the past, but in the end it is much cleaner to >> minimize the number of places in which you have to check for R_ZERO. > > Isn't it a bit more performant if you generate as little TCG > instructions as possible ? Well, yes and no. We're always going to run the tcg optimizers, so the resulting code should be the same either way. Processing a little more data can be preferable to fewer branch prediction failures. And the best way to avoid those is to not have the branch at all. Especially when it's unlikely that the data will be created in the first place. r~