From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6Ffz-0003LN-Pj for qemu-devel@nongnu.org; Tue, 08 Dec 2015 05:39:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6Ffy-0003ch-Oz for qemu-devel@nongnu.org; Tue, 08 Dec 2015 05:39:19 -0500 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:49874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6Ffy-0003cb-KM for qemu-devel@nongnu.org; Tue, 08 Dec 2015 05:39:18 -0500 Date: Tue, 8 Dec 2015 11:39:07 +0100 From: Aurelien Jarno Message-ID: <20151208103907.GC6136@aurel32.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] tcg: improve MAX_CODE_GEN_BUFFER_SIZE for arm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: TeLeMan Cc: qemu-devel , Richard Henderson On 2015-12-08 10:43, TeLeMan wrote: > I know MAX_CODE_GEN_BUFFER_SIZE is limited by the host direct branch > instructions.But the arm's MAX_CODE_GEN_BUFFER_SIZE is so small.I > tried improving MAX_CODE_GEN_BUFFER_SIZE.I wrote some check codes for > the overflow offset in tcg_out_b(), tcg_out_bl(), > tcg_out_blx_imm(),reloc_pc24(). But I didn't catch any overflow case > when tb_size and MAX_CODE_GEN_BUFFER_SIZE were larger than 32MB. After > the generated code size was larger than 32MB, qemu crashed. Instrumenting all the tcg_out_* branch related functions do not work here as the address is actually not known at code generation: case INDEX_op_goto_tb: if (s->tb_jmp_offset) { /* Direct jump method */ s->tb_jmp_offset[args[0]] = tcg_current_code_size(s); tcg_out_b_noaddr(s, COND_AL); It is patched later during TB linking. > Any suggest for this issue? I already posted a patch a long time ago to remove the 16MB limit on ARM hosts: http://lists.gnu.org/archive/html/qemu-devel/2012-10/msg01684.html However as you can see in the thread, it has been rejected as it doesn't not bring improvement in all cases. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net