From d29811806067de1516c2f94c0a81885fe2076fc8 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 28 Aug 2014 19:14:59 +0200 Subject: ppc: fix monitor access to CR This was off-by-one. Signed-off-by: Paolo Bonzini Reviewed-by: Tom Musta Signed-off-by: Alexander Graf --- monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'monitor.c') diff --git a/monitor.c b/monitor.c index 1fc201ae82..905d8cf4d4 100644 --- a/monitor.c +++ b/monitor.c @@ -2968,7 +2968,7 @@ static target_long monitor_get_ccr (const struct MonitorDef *md, int val) u = 0; for (i = 0; i < 8; i++) - u |= env->crf[i] << (32 - (4 * i)); + u |= env->crf[i] << (32 - (4 * (i + 1))); return u; } -- cgit v1.2.3