* [Qemu-devel] [PATCH] Fix SWI (SVC) instruction in THUMB.
@ 2012-12-25 14:21 Alex Rozenman
2012-12-25 23:00 ` Peter Maydell
0 siblings, 1 reply; 3+ messages in thread
From: Alex Rozenman @ 2012-12-25 14:21 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Anthony Liguori, Vladimir Pilko, Alex Rozenman,
Paul Brook, Alex Rozenman
target-arm/helper.c (do_interrupt_v7m): When do_interrupt_v7m is called,
PC is already points to a correct instruction (after the SVC one). Don't
modify the PC here.
Signed-off-by: Alex Rozenman <Alex_Rozenman@mentor.com>
---
target-arm/helper.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/target-arm/helper.c b/target-arm/helper.c
index e343fac..2da4e9c 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -1741,7 +1741,6 @@ static void do_interrupt_v7m(CPUARMState *env)
armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_USAGE);
return;
case EXCP_SWI:
- env->regs[15] += 2;
armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_SVC);
return;
case EXCP_PREFETCH_ABORT:
--
1.7.9.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix SWI (SVC) instruction in THUMB.
2012-12-25 14:21 [Qemu-devel] [PATCH] Fix SWI (SVC) instruction in THUMB Alex Rozenman
@ 2012-12-25 23:00 ` Peter Maydell
2012-12-25 23:04 ` Peter Maydell
0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2012-12-25 23:00 UTC (permalink / raw)
To: Alex Rozenman
Cc: Anthony Liguori, Paul Brook, Vladimir Pilko, qemu-devel, Alex Rozenman
On 25 December 2012 14:21, Alex Rozenman <Alex_Rozenman@mentor.com> wrote:
> target-arm/helper.c (do_interrupt_v7m): When do_interrupt_v7m is called,
> PC is already points to a correct instruction (after the SVC one). Don't
> modify the PC here.
Looks plausible, but (a) your commit message doesn't make it clear that this bug
only applies to SWI on M profile cores, not AR, and (b) could probably
use the comment that is present in the AR-core equivalent of this code:
/* The PC already points to the next instruction. */
This is one of those "surprised nobody's noticed this one before" bugs, do
the RTOSes we've tested with really not use SWI?
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix SWI (SVC) instruction in THUMB.
2012-12-25 23:00 ` Peter Maydell
@ 2012-12-25 23:04 ` Peter Maydell
0 siblings, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2012-12-25 23:04 UTC (permalink / raw)
To: Alex Rozenman
Cc: Anthony Liguori, Paul Brook, Vladimir Pilko, qemu-devel, Alex Rozenman
On 25 December 2012 23:00, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 25 December 2012 14:21, Alex Rozenman <Alex_Rozenman@mentor.com> wrote:
>> target-arm/helper.c (do_interrupt_v7m): When do_interrupt_v7m is called,
>> PC is already points to a correct instruction (after the SVC one). Don't
>> modify the PC here.
PS: this commit message isn't quite in the usual qemu style:
the initial (subject) line should have 'target-arm:' at the front.
thanks
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-25 23:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-25 14:21 [Qemu-devel] [PATCH] Fix SWI (SVC) instruction in THUMB Alex Rozenman
2012-12-25 23:00 ` Peter Maydell
2012-12-25 23:04 ` Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.