Re: [Qemu-devel] [PATCH] target-i386: update fp status fix

2014-09-16 Thread Paolo Bonzini
Il 15/09/2014 22:01, Richard Henderson ha scritto: @@ -1006,6 +1006,7 @@ void helper_fstenv(CPUX86State *env, target_ulong ptr, int data32) cpu_stw_data(env, ptr + 10, 0); cpu_stw_data(env, ptr + 12, 0); } +update_fp_status(env); } Why does this need to

[Qemu-devel] [PATCH] target-i386: update fp status fix

2014-09-15 Thread Pavel Dovgalyuk
This patch adds calls to update_fp_status() function from several places where FPU state is changed. These calls update status of softfloat library and prevent bugs caused by non-coherent rounding settings of the FPU and softfloat. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru ---

Re: [Qemu-devel] [PATCH] target-i386: update fp status fix

2014-09-15 Thread Paolo Bonzini
Il 15/09/2014 13:17, Pavel Dovgalyuk ha scritto: This patch adds calls to update_fp_status() function from several places where FPU state is changed. These calls update status of softfloat library and prevent bugs caused by non-coherent rounding settings of the FPU and softfloat.

Re: [Qemu-devel] [PATCH] target-i386: update fp status fix

2014-09-15 Thread Richard Henderson
On 09/15/2014 04:17 AM, Pavel Dovgalyuk wrote: @@ -1006,6 +1006,7 @@ void helper_fstenv(CPUX86State *env, target_ulong ptr, int data32) cpu_stw_data(env, ptr + 10, 0); cpu_stw_data(env, ptr + 12, 0); } +update_fp_status(env); } Why does this need to update

Re: [Qemu-devel] [PATCH] target-i386: update fp status fix

2014-09-15 Thread TeLeMan
update_fp_status() should be used after all of env-fpuc changes : helper_fldcw(), helper_fninit(), helper_fldenv() ,helper_fxrstor(), helper_fsave(), x86_cpu_reset(), cpu_post_load(). On Mon, Sep 15, 2014 at 7:17 PM, Pavel Dovgalyuk pavel.dovga...@ispras.ru wrote: This patch adds calls to

Re: [Qemu-devel] [PATCH] target-i386: update fp status fix

2014-09-15 Thread TeLeMan
On Tue, Sep 16, 2014 at 1:42 PM, TeLeMan gele...@gmail.com wrote: update_fp_status() should be used after all of env-fpuc changes : helper_fldcw(), helper_fninit(), helper_fldenv() ,helper_fxrstor(), helper_fsave(), x86_cpu_reset(), cpu_post_load(). missing one: x86_cpu_gdb_write_register().

Re: [Qemu-devel] [PATCH] target-i386: update fp status fix

2014-09-15 Thread TeLeMan
I suggest using cpu_set_fpuc() like cpu_set_mxcsr(). On Tue, Sep 16, 2014 at 1:51 PM, TeLeMan gele...@gmail.com wrote: On Tue, Sep 16, 2014 at 1:42 PM, TeLeMan gele...@gmail.com wrote: update_fp_status() should be used after all of env-fpuc changes : helper_fldcw(), helper_fninit(),