diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-07-07 20:53:22 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-07-07 20:53:22 +0000 |
commit | 17d996e1f1de8057b3bb88b753e65735a6d8f191 (patch) | |
tree | b7be26128bdefe59daf660ae4bf976b1a0bafc8d /target-sparc/cpu.h | |
parent | dc011987f266878ad29009e4fdbc27f666ab31d2 (diff) | |
download | qemu-17d996e1f1de8057b3bb88b753e65735a6d8f191.tar.gz qemu-17d996e1f1de8057b3bb88b753e65735a6d8f191.tar.bz2 qemu-17d996e1f1de8057b3bb88b753e65735a6d8f191.zip |
Report normalised CWP values to userland and GDB, not internal representation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3052 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/cpu.h')
-rw-r--r-- | target-sparc/cpu.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index a3d762f7f9..06b5865e22 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @@ -288,11 +288,17 @@ void cpu_set_cwp(CPUSPARCState *env1, int new_cwp); } while (0) #ifdef TARGET_SPARC64 -#define GET_CCR(env) ((env->xcc << 4) | (env->psr & PSR_ICC)) +#define GET_CCR(env) (((env->xcc >> 20) << 4) | ((env->psr & PSR_ICC) >> 20)) #define PUT_CCR(env, val) do { int _tmp = val; \ - env->xcc = _tmp >> 4; \ + env->xcc = (_tmp >> 4) << 20; \ env->psr = (_tmp & 0xf) << 20; \ } while (0) +#define GET_CWP64(env) (NWINDOWS - 1 - (env)->cwp) +#define PUT_CWP64(env, val) do { \ + env->cwp = NWINDOWS - 1 - ((val) & 0xff); \ + cpu_set_cwp(env, env->cwp); \ + } while(0) + #endif int cpu_sparc_signal_handler(int host_signum, void *pinfo, void *puc); |