Commit 3e736bf4b42fdb19920d348dcd8a1e7c0a0233ca

Authored by blueswir1
1 parent e32f879d

Upgrade Sparc FPU version (based on patch by Aurelien Jarno)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2532 c046a42c-6fe2-441c-8c8c-71466251a162
target-sparc/cpu.h
... ... @@ -238,8 +238,8 @@ typedef struct CPUSPARCState {
238 238 (0 << 24) | (MAXTL << 8) | (NWINDOWS - 1))
239 239 #else
240 240 #define GET_FSR32(env) (env->fsr)
241   -#define PUT_FSR32(env, val) do { uint32_t _tmp = val; \
242   - env->fsr = _tmp & 0xcfc1ffff; \
  241 +#define PUT_FSR32(env, val) do { uint32_t _tmp = val; \
  242 + env->fsr = (_tmp & 0xcfc1ffff) | (env->fsr & 0x000e0000); \
243 243 } while (0)
244 244 #endif
245 245  
... ...
target-sparc/translate.c
... ... @@ -2754,6 +2754,7 @@ void cpu_reset(CPUSPARCState *env)
2754 2754 env->version = GET_VER(env);
2755 2755 env->pc = 0x1fff0000000ULL;
2756 2756 #else
  2757 + env->fsr = 4 << 17; /* FPU version 4 (Meiko) */
2757 2758 env->mmuregs[0] = (0x04 << 24); /* Impl 0, ver 4, MMU disabled */
2758 2759 env->pc = 0xffd00000;
2759 2760 #endif
... ...