* [Qemu-devel] [PATCH][SPARC] Doubleword alignment for floating point instructions
@ 2007-04-05 17:58 Aurelien Jarno
0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2007-04-05 17:58 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 679 bytes --]
Hi all,
According to the SPARC v8 manual, floating point instructions that
operate on doublewords should be aligned. The processor should
ignore the least significant bit of the register number, and may
generate a trap.
Very few real CPU are actually generating a trap, so the attached patch
simply make the emulated CPU to ignore the smaller bit.
Note that on SPARC v9, this bit is actually used as the most significant
bit.
Bye,
Aurelien
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
[-- Attachment #2: sparc-qemu-double_ops.diff --]
[-- Type: text/x-diff, Size: 354 bytes --]
diff -u -d -p -r1.44 translate.c
--- qemu.orig/target-sparc/translate.c 1 Apr 2007 16:23:36 -0000 1.44
+++ qemu/target-sparc/translate.c 5 Apr 2007 17:41:37 -0000
@@ -90,7 +89,7 @@ enum {
#ifdef TARGET_SPARC64
#define DFPREG(r) (((r & 1) << 6) | (r & 0x1e))
#else
-#define DFPREG(r) (r)
+#define DFPREG(r) (r & 0x1e)
#endif
#ifdef USE_DIRECT_JUMP
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-04-05 18:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-05 17:58 [Qemu-devel] [PATCH][SPARC] Doubleword alignment for floating point instructions Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).