aboutsummaryrefslogtreecommitdiff
path: root/target-sparc
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-11-27 08:50:11 +0100
committerEdgar E. Iglesias <edgar.iglesias@xilinx.com>2014-01-15 15:37:33 +1000
commit1cf892ca2689c84960b4ce4d2723b6bee453711c (patch)
tree0fcf837d0bbda53d4e17ef63371985799a3a5b4d /target-sparc
parentd32934c84c72f57e78d430c22974677b7bcabe5d (diff)
SPARC: Fix LEON3 power down instruction
Synchronize the program counter before the power down helper call otherwise interrupts will return to the wrong context. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de> Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Diffstat (limited to 'target-sparc')
-rw-r--r--target-sparc/translate.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index dce64c3c4a..6150b22f8f 100644
--- a/target-sparc/translate.c
+++ b/target-sparc/translate.c
@@ -3626,6 +3626,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
if ((rd == 0x13) && (dc->def->features &
CPU_FEATURE_POWERDOWN)) {
/* LEON3 power-down */
+ save_state(dc);
gen_helper_power_down(cpu_env);
}
break;