qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH][SPARC] Switch the sun4m FPU to Meiko


From: Aurelien Jarno
Subject: [Qemu-devel] [PATCH][SPARC] Switch the sun4m FPU to Meiko
Date: Fri, 23 Mar 2007 21:30:22 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

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
 `. `'   address@hidden         | address@hidden
   `-    people.debian.org/~aurel32 | www.aurel32.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]