Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HZWHa-0000J3-B8 for qemu-devel@nongnu.org; Thu, 05 Apr 2007 14:02:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HZWHZ-0000Hb-FJ for qemu-devel@nongnu.org; Thu, 05 Apr 2007 14:02:01 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HZWHZ-0000HU-4s for qemu-devel@nongnu.org; Thu, 05 Apr 2007 14:02:01 -0400 Received: from farad.aurel32.net ([82.232.2.251] helo=mail.aurel32.net) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HZWE9-0004oO-W9 for qemu-devel@nongnu.org; Thu, 05 Apr 2007 13:58:30 -0400 Received: from amd64.aurel32.net ([2001:618:400:fc13:216:3eff:fe00:1009]) by mail.aurel32.net with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1HZWE8-0002Er-EV for qemu-devel@nongnu.org; Thu, 05 Apr 2007 19:58:28 +0200 Received: from aurel32 by amd64.aurel32.net with local (Exim 4.63) (envelope-from ) id 1HZWE8-0003Z8-7j for qemu-devel@nongnu.org; Thu, 05 Apr 2007 19:58:28 +0200 Date: Thu, 5 Apr 2007 19:58:28 +0200 From: Aurelien Jarno Message-ID: <20070405175828.GA13687@amd64.aurel32.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline Subject: [Qemu-devel] [PATCH][SPARC] Doubleword alignment for floating point instructions 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 --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Hi all, According to the SPARC v8 manual, floating point instructions that operate on doublewords should be aligned. The processor should ignore the least significant bit of the register number, and may generate a trap. Very few real CPU are actually generating a trap, so the attached patch simply make the emulated CPU to ignore the smaller bit. Note that on SPARC v9, this bit is actually used as the most significant bit. Bye, Aurelien -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net --45Z9DzgjV8m4Oswq Content-Type: text/x-diff; charset=iso-8859-15 Content-Disposition: attachment; filename="sparc-qemu-double_ops.diff" diff -u -d -p -r1.44 translate.c --- qemu.orig/target-sparc/translate.c 1 Apr 2007 16:23:36 -0000 1.44 +++ qemu/target-sparc/translate.c 5 Apr 2007 17:41:37 -0000 @@ -90,7 +89,7 @@ enum { #ifdef TARGET_SPARC64 #define DFPREG(r) (((r & 1) << 6) | (r & 0x1e)) #else -#define DFPREG(r) (r) +#define DFPREG(r) (r & 0x1e) #endif #ifdef USE_DIRECT_JUMP --45Z9DzgjV8m4Oswq--