From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19Wzo4-0001km-Je for qemu-devel@nongnu.org; Mon, 30 Jun 2003 10:39:00 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19WznM-0001Us-9d for qemu-devel@nongnu.org; Mon, 30 Jun 2003 10:38:18 -0400 Received: from falcon.skarpodata.com ([193.45.208.6] helo=griffin.skarpodata.com) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Wzkp-0000sa-4w for qemu-devel@nongnu.org; Mon, 30 Jun 2003 10:35:39 -0400 Received: from falcon.skarpodata.com (root@[164.9.187.2]) h5UEVvjB012596 for ; Mon, 30 Jun 2003 16:31:57 +0200 Received: (from mailgw@localhost) by falcon.skarpodata.com (8.9.3/8.9.3) id QAA29729 for ; Mon, 30 Jun 2003 16:35:35 +0200 Date: Mon, 30 Jun 2003 16:35:43 +0200 From: Johan Rydberg Subject: Re: [Qemu-devel] 64-bit target Message-Id: <20030630163543.3e08a766.jrydberg@night.trouble.net> In-Reply-To: <20030629232802.6a8b2d33.jrydberg@night.trouble.net> References: <20030629144228.7e0ddebc.jrydberg@night.trouble.net> <3EFEE812.3020308@free.fr> <20030629203254.65b26caa.jrydberg@night.trouble.net> <3EFF570D.2030502@free.fr> <20030629232802.6a8b2d33.jrydberg@night.trouble.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , To: qemu-devel@nongnu.org Johan Rydberg wrote: : Fabrice Bellard wrote: : : : You can just use two parameters and load two 32 bit values. : : Declaring T0 as a long long, and trying to set it to an immediate : value results in the following code: Which is a bit of an overhead : I think :) Using an union like this; union fast_move { struct { USI hi; USI lo; } s; UDI d; } x; And a macro like this; #define GET_UDI_FROM_PARAMS(p1, p2) (((union fast_move) { { (USI) p1, (USI) p2 } }).d) Reduces the code: void OPPROTO op_movdi_t0_uimm (void) { T0 = GET_UDI_FROM_PARAMS (PARAM1, PARAM2); } To: 00000034 : 34: b8 00 00 00 00 mov $0x0,%eax 35: R_386_32 __op_param1 39: ba 00 00 00 00 mov $0x0,%edx 3a: R_386_32 __op_param2 3e: 89 c6 mov %eax,%esi 40: 89 d7 mov %edx,%edi Can you figure out how to make it move to %esi and %edi directly? I can, for one, not. -- Johan Rydberg, Free Software Developer, Sweden http://rtmk.sf.net | http://www.nongnu.org/guss/ Playing Various Artists - Deftones / My Own Summer (Shove It)