diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-24 13:24:09 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-03-24 13:24:09 +0000 |
commit | 3e736bf4b42fdb19920d348dcd8a1e7c0a0233ca (patch) | |
tree | 5642c9ec6cf7c3c5bda01866c8be149337b59b00 /target-sparc | |
parent | e32f879d1b5cbde3c996d6db5e15e487ae3064a5 (diff) | |
download | hqemu-3e736bf4b42fdb19920d348dcd8a1e7c0a0233ca.zip hqemu-3e736bf4b42fdb19920d348dcd8a1e7c0a0233ca.tar.gz |
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
Diffstat (limited to 'target-sparc')
-rw-r--r-- | target-sparc/cpu.h | 4 | ||||
-rw-r--r-- | target-sparc/translate.c | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 60189a6..3e8d71c 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @@ -238,8 +238,8 @@ typedef struct CPUSPARCState { (0 << 24) | (MAXTL << 8) | (NWINDOWS - 1)) #else #define GET_FSR32(env) (env->fsr) -#define PUT_FSR32(env, val) do { uint32_t _tmp = val; \ - env->fsr = _tmp & 0xcfc1ffff; \ +#define PUT_FSR32(env, val) do { uint32_t _tmp = val; \ + env->fsr = (_tmp & 0xcfc1ffff) | (env->fsr & 0x000e0000); \ } while (0) #endif diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 7486c27..d1de266 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -2754,6 +2754,7 @@ void cpu_reset(CPUSPARCState *env) env->version = GET_VER(env); env->pc = 0x1fff0000000ULL; #else + env->fsr = 4 << 17; /* FPU version 4 (Meiko) */ env->mmuregs[0] = (0x04 << 24); /* Impl 0, ver 4, MMU disabled */ env->pc = 0xffd00000; #endif |