Received: from eggs.gnu.org ([2001:4830:134:3::10]:39363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adfGD-00058a-3a for qemu-devel@nongnu.org; Wed, 09 Mar 2016 09:38:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adfG7-0004WH-7q for qemu-devel@nongnu.org; Wed, 09 Mar 2016 09:38:49 -0500 Received: from roura.ac.upc.edu ([147.83.33.10]:55803 helo=roura.ac.upc.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adfG6-0004Vr-Sk for qemu-devel@nongnu.org; Wed, 09 Mar 2016 09:38:43 -0500 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= Date: Wed, 09 Mar 2016 15:38:38 +0100 Message-ID: <87r3fjpvgx.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Richard Henderson , Peter Crosthwaite Hi, NOTE: I won't be throwing patches anytime soon, I just want to know if there's interest in this for the future. While adding events for tracing guest instructions, I've found that the per-target "gen_intermediate_code()" function is very similar but not exactly the same for each of the targets. This makes architecture-agnostic features harder to maintain across targets, specially when it comes to their relative order. So, would it be worth it if I generalized part of that code into an architecture-agnostic function that calls into target-specific hooks wherever it needs extending? There are many ways to do it that we can discuss later. Cheers, Lluis