qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] ARM CPSR and conditional instructions - revisited


From: Simon Willcocks
Subject: [Qemu-devel] [PATCH] ARM CPSR and conditional instructions - revisited
Date: Fri, 14 Nov 2008 10:52:39 +0100
User-agent: Messenger-Pro/2.62 (MsgServe/2.05) (RISC-OS/4.02F) POPstar/2.06-ds.5

Hello,

I was having a problem emulating some ARM code that I don't have any right
to modify, and which has its origins back in the early nineties.  I tracked
it down to incorrect flag handling and found Justin Fletcher's post of Thu,
23 Nov 2006 via Google.  Since his fix doesn't completely correct the
problem, I've developed the attached patch and a simple test program.

I haven't tested whether the flags are set correctly other than by the MSR
instruction, but the code I'm emulating gets a lot further than it used to,
which is a reasonable smoke test, and the modifications to the flag setting
routines are reasonably minor.

I doubt the modifications will result in a significant change in speed
since, while the _cc routines are a little more complicated, the op_test_
routines have only got simpler and ARM code only sets the flags when they
will be checked, and they are checked at least as often as they are set.

This is a very useful project, thanks to everyone who has worked on it.

Regards,
Simon Willcocks

-- 
ROLF - The RISC OS Look and Feel on Linux.
http://stoppers.drobe.co.uk
http://ro-lookandfeel.blogspot.com/

Attachment: flags_test1.c
Description: Text document

Attachment: qemu-0.9.1.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]