patch: add support for ffree opcodes
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
translate.c 2004-06-11 16:15:23.192179000 -0700 renamed from translate.c.~1.27.~ 2004-05-29 04:08:52.000000000 -0700 +29 -0
@@ -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
op.c 2004-06-11 15:44:32.016520000 -0700 renamed from op.c.orig 2004-06-11 16:16:15.389773000 -0700 +5 -0
@@ -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);
Quoted 4 lines · EricNorthup
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:
Hi,
and I was always wondering why every java I installed into my Solaris9 guest crashed. Great! So it means that I will be able to install Solaris9 correctly, since the second part of insallation is done in Java-based installer....
Thanks,
Karel
--
Karel Gardas [email protected]
ObjectSecurity Ltd. http://www.objectsecurity.com
Quoted 4 lines · EricNorthup
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:
Thank you for finding the bug ! I added 'ffree' the Right Way :-)
Fabrice.
Quoted 7 lines · Fabrice Bellard
Quoted 4 lines · EricNorthup
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:
Thank you for finding the bug ! I added 'ffree' the Right Way :-)
Great! I can confirm that even huge/bloated Solaris Management Console written in Java seems to run well now.
Thanks,
Karel
--
Karel Gardas [email protected]
ObjectSecurity Ltd. http://www.objectsecurity.com