From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7781-0003wc-U0 for qemu-devel@nongnu.org; Thu, 10 Dec 2015 14:43:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7780-0003ah-U8 for qemu-devel@nongnu.org; Thu, 10 Dec 2015 14:43:49 -0500 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:49045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7780-0003aW-Og for qemu-devel@nongnu.org; Thu, 10 Dec 2015 14:43:48 -0500 Date: Thu, 10 Dec 2015 19:21:19 +0100 From: Aurelien Jarno Message-ID: <20151210182119.GA25118@aurel32.net> References: <1449734536-9885-1-git-send-email-aurelien@aurel32.net> <56699ACD.9080009@twiddle.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56699ACD.9080009@twiddle.net> Subject: Re: [Qemu-devel] [PATCH] tcg/arm: improve direct jump List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: TeLeMan , qemu-devel@nongnu.org On 2015-12-10 07:31, Richard Henderson wrote: > On 12/10/2015 12:02 AM, Aurelien Jarno wrote: > >Note: I don't really get the reason for the current 16MB limit. With the > >standard branch instructions the offset is coded on 24 bits, but shifted > >right by 2, which should give us a +/-32MB jumps, and therefore a 32MB > >limit. > > That might be me with the off-by-one error on the bit counting... While the way to store the value has been changed a few times recently, the original value dates from this commit: commit 1cb0661e009267a5d060c4686f0857784a8da228 Author: balrog Date: Mon Dec 1 02:10:17 2008 +0000 arm: Reserve code buffer in memory range reachable for pc-relative branch. Unfortunately this range is so narrow that I'm not sure if it makes more sense to always use memory load to pc kind of branch instead. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5844 c046a42c-6fe2-441c-8c8c-71466251a162 This doesn't fully explain the reason why 16MB and not 32MB. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net