Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HXwT0-0007bB-6l for qemu-devel@nongnu.org; Sun, 01 Apr 2007 05:35:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HXwSw-0007SM-Ug for qemu-devel@nongnu.org; Sun, 01 Apr 2007 05:35:17 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HXwSw-0007R1-Et for qemu-devel@nongnu.org; Sun, 01 Apr 2007 05:35:14 -0400 Received: from bay0-omc2-s13.bay0.hotmail.com ([65.54.246.149]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HXwQ1-00081A-JR for qemu-devel@nongnu.org; Sun, 01 Apr 2007 05:32:13 -0400 Message-ID: In-Reply-To: <20070325140539.GA11179@amd64.aurel32.net> From: "Blue Swirl" Subject: RE: [Qemu-devel] [PATCH][SPARC] Fix the shift instructions for theSPARC target Date: Sun, 01 Apr 2007 11:32:06 +0200 Mime-Version: 1.0 Content-Type: text/plain; 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: aurelien@aurel32.net Cc: qemu-devel@nongnu.org >The shift instructions on the SPARC target currently take into account >the whole register as the shift count. According to the SPARC v8 and v9 >manuals, only the lower 5 bits should be taken into account for 32-bit >instructions (SLL, SRL, SRA), and only the lower 6 bits for 64-bit >instructions (SLLX, SRLX, SRAX). > >The patch below fixes that. Note that SLL and SLLX are now different, as >they don't take into account the same number of bits. Please apply. Can you check what happens in real hardware, especially in the case when the shift amount is in a register, not immediate, and the value is either >32 or ==32? The 64-bit mask should be 0x3f, not 0x2f. _________________________________________________________________ Don't just search. Find. Check out the new MSN Search! http://search.msn.com/