Re: [Qemu-devel] Patch: fix FSTENV (and FSAVE) instructions in target-i386 (resend, cleaned up).

2010-11-27 Thread Blue Swirl
On Fri, Nov 26, 2010 at 10:53 PM, ChALkeR wrote: >> Please also consider fixing FSAVE and FXSAVE. > > FSAVE also works, i checked twice (code and test). > FSAVE in QEMU calls FSTENV. > > op_helper.c: >> void helper_fsave(target_ulong ptr, int data32) >> { >>    CPU86_LDouble tmp; >>    int i; >> >

Re: [Qemu-devel] Patch: fix FSTENV (and FSAVE) instructions in target-i386 (resend, cleaned up).

2010-11-26 Thread ChALkeR
> Please also consider fixing FSAVE and FXSAVE. FSAVE also works, i checked twice (code and test). FSAVE in QEMU calls FSTENV. op_helper.c: > void helper_fsave(target_ulong ptr, int data32) > { >CPU86_LDouble tmp; >int i; > >helper_fstenv(ptr, data32); Not sure how FXSAVE operates, t

Re: [Qemu-devel] Patch: fix FSTENV (and FSAVE) instructions in target-i386 (resend, cleaned up).

2010-11-26 Thread Blue Swirl
On Fri, Nov 26, 2010 at 1:14 PM, ChALkeR wrote: > Patch for the bug https://bugs.launchpad.net/qemu/+bug/661696 > > The testcase: > > $ cat test.c > #include > > extern void *x; > > int main() { >        int a; >        asm volatile ("x: fldz\n\ >        push %%edx\n\ >        fnstenv -0xc(%%esp)

[Qemu-devel] Patch: fix FSTENV (and FSAVE) instructions in target-i386 (resend, cleaned up).

2010-11-26 Thread ChALkeR
Patch for the bug https://bugs.launchpad.net/qemu/+bug/661696 The testcase: $ cat test.c #include extern void *x; int main() { int a; asm volatile ("x: fldz\n\ push %%edx\n\ fnstenv -0xc(%%esp)\n\ pop %%edx\n" : "=d" (a) : : "memory"); printf ("%