qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH][SPARC] Switch the sun4m FPU to Meiko
@ 2007-03-23 20:30 Aurelien Jarno
  0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2007-03-23 20:30 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-03-23 20:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-23 20:30 [Qemu-devel] [PATCH][SPARC] Switch the sun4m FPU to Meiko Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).