From: "EricNorthup" <digitale@digitaleric.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] patch: add support for ffree opcodes
Date: Fri, 11 Jun 2004 19:29:10 -0400 [thread overview]
Message-ID: <E1BYvSQ-00043f-Va@cell03.cell03.com> (raw)
Hi,
Sun's Java VM emits the ffree st(n) opcodes, which are not currently
supported in qemu. This is not the Right Way to add them, but it works:
--Eric
bash-2.05b$ diff -u target-i386/translate.c.~1.27.~ target-i386/translate.c
--- target-i386/translate.c.~1.27.~ 2004-05-29 04:08:52.000000000 -0700
+++ target-i386/translate.c 2004-06-11 16:15:23.192179000 -0700
@@ -2826,6 +2826,35 @@
mod = (modrm >> 6) & 3;
rm = modrm & 7;
op = ((b & 7) << 3) | ((modrm >> 3) & 7);
+ if (b == 0xdd && (modrm >= 0xC0) && (modrm <=0xC7)) {
+ switch (modrm) {
+ case 0xC0:
+ gen_op_ffree_STN(0);
+ break;
+ case 0xC1:
+ gen_op_ffree_STN(1);
+ break;
+ case 0xC2:
+ gen_op_ffree_STN(2);
+ break;
+ case 0xC3:
+ gen_op_ffree_STN(3);
+ break;
+ case 0xC4:
+ gen_op_ffree_STN(4);
+ break;
+ case 0xC5:
+ gen_op_ffree_STN(5);
+ break;
+ case 0xC6:
+ gen_op_ffree_STN(6);
+ break;
+ case 0xC7:
+ gen_op_ffree_STN(7);
+ break;
+ }
+ break;
+ }
if (mod != 3) {
/* memory op */
gen_lea_modrm(s, modrm, ®_addr, &offset_addr);
bash-2.05b$ diff -u target-i386/op.c.orig target-i386/op.c
--- target-i386/op.c.orig 2004-06-11 16:16:15.389773000 -0700
+++ target-i386/op.c 2004-06-11 15:44:32.016520000 -0700
@@ -2013,6 +2013,11 @@
env->fptags[7] = 1;
}
+void OPPROTO op_ffree_STN(void)
+{
+ env->fptags[(env->fpstt + (PARAM1)) & 7] = 1;
+}
+
void OPPROTO op_fnstenv_A0(void)
{
helper_fstenv((uint8_t *)A0, PARAM1);
next reply other threads:[~2004-06-11 23:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-11 23:29 EricNorthup [this message]
2004-06-11 23:53 ` [Qemu-devel] patch: add support for ffree opcodes Karel Gardas
2004-06-12 11:41 ` Fabrice Bellard
2004-06-12 11:41 ` Karel Gardas
-- strict thread matches above, loose matches on Subject: below --
2004-06-12 0:14 EricNorthup
2004-06-12 9:35 ` Karel Gardas
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=E1BYvSQ-00043f-Va@cell03.cell03.com \
--to=digitale@digitaleric.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.