From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9IOx-0006JA-Mu for qemu-devel@nongnu.org; Thu, 29 Sep 2011 11:20:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9IOw-00005z-7K for qemu-devel@nongnu.org; Thu, 29 Sep 2011 11:19:55 -0400 Received: from goliath.siemens.de ([192.35.17.28]:15977) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9IOv-00005i-Tf for qemu-devel@nongnu.org; Thu, 29 Sep 2011 11:19:54 -0400 Message-ID: <4E848C8D.7030209@siemens.com> Date: Thu, 29 Sep 2011 17:19:41 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <4E8312D7.4080403@siemens.com> <4E832E88.6080909@twiddle.net> <4E83304F.4010008@siemens.com> <4E833AEA.8080508@twiddle.net> <4E839A88.4060003@web.de> <4E83A3F7.3000508@twiddle.net> <4E84570F.3040103@siemens.com> <4E848785.6090604@twiddle.net> In-Reply-To: <4E848785.6090604@twiddle.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] tcg-i386: Introduce limited deposit support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Blue Swirl , qemu-devel , Aurelien Jarno On 2011-09-29 16:58, Richard Henderson wrote: > On 09/29/2011 04:31 AM, Jan Kiszka wrote: >> x86 cannot provide an optimized generic deposit implementation. But at >> least for a few special cases, namely for writing bits 0..7, 8..15, and >> 0..15, versions using only a single instruction are feasible. >> Introducing such limited support improves emulating 16-bit x86 code on >> x86, but also rarer cases where 32-bit or 64-bit code accesses bytes or >> words. >> >> Signed-off-by: Jan Kiszka >> --- >> >> Changes in v2: >> - introduce restricting predicates TCG_TARGET_deposit_i32/64_valid >> to decide if deposit support can be used >> - express register constraints via new 'Q' symbol > > That's what I had in mind, yes. > > The only thing that's missing now is a default version of > >> +#define TCG_TARGET_deposit_i32_valid(ofs, len) \ >> + (((ofs) == 0 && (len) == 8) || ((ofs) == 8 && (len) == 8) || \ >> + ((ofs) == 0 && (len) == 16)) >> +#define TCG_TARGET_deposit_i64_valid TCG_TARGET_deposit_i32_valid > > These. Interestingly, that didn't break the build here. Seems like gcc became too smart to report this. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux