From: Robert Reif <reif@earthlink.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] sparc32 use stq_* for 64bit stores
Date: Sun, 14 Oct 2007 14:34:51 -0400 [thread overview]
Message-ID: <4712614B.9050908@earthlink.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 217 bytes --]
Use stq_* for 64 bit stores.
This fixes one bug where T1 was used twice rather than T1 and T2.
Should the address be 64 bit alligned? i.e. T0 & ~7 rather than T0 & ~3?
Should these unaligned address cause traps?
[-- Attachment #2: stq.diff.txt --]
[-- Type: text/plain, Size: 1963 bytes --]
Index: target-sparc/op_helper.c
===================================================================
RCS file: /sources/qemu/qemu/target-sparc/op_helper.c,v
retrieving revision 1.44
diff -p -u -r1.44 op_helper.c
--- target-sparc/op_helper.c 14 Oct 2007 17:07:21 -0000 1.44
+++ target-sparc/op_helper.c 14 Oct 2007 18:28:37 -0000
@@ -515,8 +515,7 @@ void helper_st_asi(int asi, int size)
stl_user(T0 & ~3, T1);
break;
case 8:
- stl_user(T0 & ~3, T1);
- stl_user((T0 + 4) & ~3, T2);
+ stq_user(T0 & ~3, ((uint64_t)T1 << 32) | T2);
break;
}
break;
@@ -533,8 +532,7 @@ void helper_st_asi(int asi, int size)
stl_kernel(T0 & ~3, T1);
break;
case 8:
- stl_kernel(T0 & ~3, T1);
- stl_kernel((T0 + 4) & ~3, T2);
+ stq_kernel(T0 & ~3, ((uint64_t)T1 << 32) | T2);
break;
}
break;
@@ -591,8 +589,7 @@ void helper_st_asi(int asi, int size)
stl_phys(T0 & ~3, T1);
break;
case 8:
- stl_phys(T0 & ~3, T1);
- stl_phys((T0 + 4) & ~3, T2);
+ stq_phys(T0 & ~3, ((uint64_t)T1 << 32) | T2);
break;
}
}
@@ -615,10 +612,8 @@ void helper_st_asi(int asi, int size)
| ((target_phys_addr_t)(asi & 0xf) << 32), T1);
break;
case 8:
- stl_phys((target_phys_addr_t)(T0 & ~3)
- | ((target_phys_addr_t)(asi & 0xf) << 32), T1);
- stl_phys((target_phys_addr_t)((T0 + 4) & ~3)
- | ((target_phys_addr_t)(asi & 0xf) << 32), T1);
+ stq_phys((target_phys_addr_t)(T0 & ~3)
+ | ((target_phys_addr_t)(asi & 0xf) << 32), ((uint64_t)T1 << 32) | T2);
break;
}
}
next reply other threads:[~2007-10-14 18:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-14 18:34 Robert Reif [this message]
2007-10-14 19:25 ` [Qemu-devel] [PATCH] sparc32 use stq_* for 64bit stores Blue Swirl
2007-10-14 19:32 ` Robert Reif
2007-10-14 19:52 ` Blue Swirl
2007-10-14 20:14 ` Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4712614B.9050908@earthlink.net \
--to=reif@earthlink.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.