Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HUqR2-0000lf-6z for qemu-devel@nongnu.org; Fri, 23 Mar 2007 16:32:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HUqR0-0000fT-9C for qemu-devel@nongnu.org; Fri, 23 Mar 2007 16:32:27 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HUqR0-0000ew-0k for qemu-devel@nongnu.org; Fri, 23 Mar 2007 15:32:26 -0500 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 1HUqP2-0006D4-Be for qemu-devel@nongnu.org; Fri, 23 Mar 2007 16:30:24 -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 1HUqP0-0005Zj-Ns for qemu-devel@nongnu.org; Fri, 23 Mar 2007 21:30:22 +0100 Received: from aurel32 by amd64.aurel32.net with local (Exim 4.63) (envelope-from ) id 1HUqP0-0006Sc-H4 for qemu-devel@nongnu.org; Fri, 23 Mar 2007 21:30:22 +0100 Date: Fri, 23 Mar 2007 21:30:22 +0100 From: Aurelien Jarno Message-ID: <20070323203022.GF24731@amd64.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Subject: [Qemu-devel] [PATCH][SPARC] Switch the sun4m FPU to Meiko 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 Hi all, The current FPU model on the sun4m SPARC is the Fujitsu MB86910. It supports very few instructions. The patch below changes the FPU to the Meiko L64804. It is the one that can be found on the microSPARC-II CPU, ie the one that is present in the SparcStation 5. All the instructions supported by this FPU (ie all SPARC v8 ones except quad precision ones) are already implemented in QEMU. Bye, Aurelien Index: target-sparc/cpu.h =================================================================== RCS file: /sources/qemu/qemu/target-sparc/cpu.h,v retrieving revision 1.27 diff -u -d -p -r1.27 cpu.h --- target-sparc/cpu.h 31 Jan 2007 12:16:51 -0000 1.27 +++ target-sparc/cpu.h 23 Mar 2007 20:11:29 -0000 @@ -235,7 +237,8 @@ typedef struct CPUSPARCState { #define GET_VER(env) ((0x17ULL << 48) | (0x11ULL << 32) | \ (0 << 24) | (MAXTL << 8) | (NWINDOWS - 1)) #else -#define GET_FSR32(env) (env->fsr) +/* Implementation 0, version 4 (Meiko FPU) */ +#define GET_FSR32(env) (env->fsr | 0x00080000) #define PUT_FSR32(env, val) do { uint32_t _tmp = val; \ env->fsr = _tmp & 0xcfc1ffff; \ } while (0) -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net