summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlue Swirl2013-01-12 13:47:07 +0100
committerBlue Swirl2013-01-12 13:47:07 +0100
commit63fb2590839162afdf14d7c0ee02d460766c0956 (patch)
treead180d9b3043d3b63744d916640808ccbdeed6b0
parentMerge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf (diff)
parenttarget-arm: Fix SWI (SVC) instruction in M profile. (diff)
downloadqemu-63fb2590839162afdf14d7c0ee02d460766c0956.tar.gz
qemu-63fb2590839162afdf14d7c0ee02d460766c0956.tar.xz
qemu-63fb2590839162afdf14d7c0ee02d460766c0956.zip
Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm
* 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm: target-arm: Fix SWI (SVC) instruction in M profile. target-arm: use type_register() instead of type_register_static()
-rw-r--r--target-arm/cpu.c2
-rw-r--r--target-arm/helper.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/target-arm/cpu.c b/target-arm/cpu.c
index 17875ed0f0..94536bb0cc 100644
--- a/target-arm/cpu.c
+++ b/target-arm/cpu.c
@@ -778,7 +778,7 @@ static void cpu_register(const ARMCPUInfo *info)
.class_size = sizeof(ARMCPUClass),
};
- type_register_static(&type_info);
+ type_register(&type_info);
}
static const TypeInfo arm_cpu_type_info = {
diff --git a/target-arm/helper.c b/target-arm/helper.c
index 0525aec87a..66ab78e3f1 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -1736,7 +1736,7 @@ static void do_interrupt_v7m(CPUARMState *env)
armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_USAGE);
return;
case EXCP_SWI:
- env->regs[15] += 2;
+ /* The PC already points to the next instruction. */
armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_SVC);
return;
case EXCP_PREFETCH_ABORT: