Skip to contentSkip to conversation

Switch the sun4m FPU to Meiko

PATCH New Aurelien Jarno 1 participant 1 message Mar 23, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Switch the sun4m FPU to Meiko

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

cpu.h +2 -1
diff -u -d -p -r1.27 cpu.h
@@ -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)
Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net