From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KiFl8-0005fy-AT for qemu-devel@nongnu.org; Tue, 23 Sep 2008 17:49:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KiFl7-0005fT-7i for qemu-devel@nongnu.org; Tue, 23 Sep 2008 17:49:25 -0400 Received: from [199.232.76.173] (port=59826 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KiFl7-0005fO-0w for qemu-devel@nongnu.org; Tue, 23 Sep 2008 17:49:25 -0400 Received: from csl.cornell.edu ([128.84.224.10]:1352 helo=vlsi.csl.cornell.edu) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KiFl7-0004zJ-7P for qemu-devel@nongnu.org; Tue, 23 Sep 2008 17:49:25 -0400 Received: from stanley.csl.cornell.edu (stanley.csl.cornell.edu [128.84.224.15]) by vlsi.csl.cornell.edu (8.13.4/8.13.4) with ESMTP id m8NLnDYb075786 for ; Tue, 23 Sep 2008 17:49:18 -0400 (EDT) Date: Tue, 23 Sep 2008 17:49:13 -0400 (EDT) From: Vince Weaver Subject: re: [Qemu-devel] [5283] Use the new concat_tl_i64 op for std and stda Message-ID: <20080923174506.X10311@stanley.csl.cornell.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hello the aforementioned patch broke the spec2k crafty benchmark on sparc32plus-linux-user (I'm running on x86_64 but I don't think it makes a difference). As always, the problem is when there are high bits (above 32) set when concating. The old code generated: mov_i32 tmp11,tmp0 mov_i32 tmp1,loc4 movi_i64 tmp12,$0xffffffff and_i64 tmp10,tmp1,tmp12 movi_i64 tmp12,$0x20 shl_i64 tmp10,tmp10,tmp12 movi_i64 tmp12,$0xffffffff and_i64 tmp2,tmp11,tmp12 or_i64 tmp2,tmp2,tmp10 qemu_st64 tmp2,loc5,$0x0 The new code generates: movi_i64 tmp12,$0x20 shl_i64 tmp10,loc4,tmp12 or_i64 tmp2,tmp0,tmp10 qemu_st64 tmp2,loc5,$0x0 which generates wrong values because the low value being concatenated isn't masked/truncated to 32-bits first. Vince