Revision 17d996e1 target-sparc/cpu.h

b/target-sparc/cpu.h
288 288
    } while (0)
289 289

  
290 290
#ifdef TARGET_SPARC64
291
#define GET_CCR(env) ((env->xcc << 4) | (env->psr & PSR_ICC))
291
#define GET_CCR(env) (((env->xcc >> 20) << 4) | ((env->psr & PSR_ICC) >> 20))
292 292
#define PUT_CCR(env, val) do { int _tmp = val;				\
293
	env->xcc = _tmp >> 4;						\
293
	env->xcc = (_tmp >> 4) << 20;						\
294 294
	env->psr = (_tmp & 0xf) << 20;					\
295 295
    } while (0)
296
#define GET_CWP64(env) (NWINDOWS - 1 - (env)->cwp)
297
#define PUT_CWP64(env, val)  do {                                       \
298
        env->cwp = NWINDOWS - 1 - ((val) & 0xff);                       \
299
        cpu_set_cwp(env, env->cwp);                                     \
300
    } while(0)
301

  
296 302
#endif
297 303

  
298 304
int cpu_sparc_signal_handler(int host_signum, void *pinfo, void *puc);

Also available in: Unified diff