* [Qemu-devel] [PATCH] target/arm/vfp_helper: Call set_fpscr_to_host before updating to FPSCR
@ 2019-07-05 12:43 Philippe Mathieu-Daudé
2019-07-05 12:45 ` Philippe Mathieu-Daudé
2019-07-05 14:10 ` Laurent Desnogues
0 siblings, 2 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-05 12:43 UTC (permalink / raw)
To: qemu-devel
Cc: Laurent Desnogues, Peter Maydell, qemu-arm, Alex Bennée,
Philippe Mathieu-Daudé
In commit e9d652824b0 we extracted the vfp_set_fpscr_to_host()
function but failed at calling it in the correct place, we call
it after xregs[ARM_VFP_FPSCR] is modified.
Fix by calling this function before we update FPSCR.
Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
target/arm/vfp_helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c
index 46041e3294..9710ef1c3e 100644
--- a/target/arm/vfp_helper.c
+++ b/target/arm/vfp_helper.c
@@ -197,6 +197,8 @@ void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t val)
val &= 0xf7c0009f;
}
+ vfp_set_fpscr_to_host(env, val);
+
/*
* We don't implement trapped exception handling, so the
* trap enable bits, IDE|IXE|UFE|OFE|DZE|IOE are all RAZ/WI (not RES0!)
@@ -217,8 +219,6 @@ void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t val)
env->vfp.qc[1] = 0;
env->vfp.qc[2] = 0;
env->vfp.qc[3] = 0;
-
- vfp_set_fpscr_to_host(env, val);
}
void vfp_set_fpscr(CPUARMState *env, uint32_t val)
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] target/arm/vfp_helper: Call set_fpscr_to_host before updating to FPSCR
2019-07-05 12:43 [Qemu-devel] [PATCH] target/arm/vfp_helper: Call set_fpscr_to_host before updating to FPSCR Philippe Mathieu-Daudé
@ 2019-07-05 12:45 ` Philippe Mathieu-Daudé
2019-07-05 13:39 ` Alex Bennée
2019-07-05 14:10 ` Laurent Desnogues
1 sibling, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-07-05 12:45 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Desnogues, Peter Maydell, qemu-arm, Alex Bennée
Correct subject: "Call set_fpscr_to_host before updating FPSCR reg"
(or without "reg").
On 7/5/19 2:43 PM, Philippe Mathieu-Daudé wrote:
> In commit e9d652824b0 we extracted the vfp_set_fpscr_to_host()
> function but failed at calling it in the correct place, we call
> it after xregs[ARM_VFP_FPSCR] is modified.
>
> Fix by calling this function before we update FPSCR.
>
> Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> target/arm/vfp_helper.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c
> index 46041e3294..9710ef1c3e 100644
> --- a/target/arm/vfp_helper.c
> +++ b/target/arm/vfp_helper.c
> @@ -197,6 +197,8 @@ void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t val)
> val &= 0xf7c0009f;
> }
>
> + vfp_set_fpscr_to_host(env, val);
> +
> /*
> * We don't implement trapped exception handling, so the
> * trap enable bits, IDE|IXE|UFE|OFE|DZE|IOE are all RAZ/WI (not RES0!)
> @@ -217,8 +219,6 @@ void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t val)
> env->vfp.qc[1] = 0;
> env->vfp.qc[2] = 0;
> env->vfp.qc[3] = 0;
> -
> - vfp_set_fpscr_to_host(env, val);
> }
>
> void vfp_set_fpscr(CPUARMState *env, uint32_t val)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] target/arm/vfp_helper: Call set_fpscr_to_host before updating to FPSCR
2019-07-05 12:45 ` Philippe Mathieu-Daudé
@ 2019-07-05 13:39 ` Alex Bennée
0 siblings, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2019-07-05 13:39 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Laurent Desnogues, Peter Maydell, qemu-arm, qemu-devel
Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> Correct subject: "Call set_fpscr_to_host before updating FPSCR reg"
> (or without "reg").
Queued to testing/next, thanks.
>
> On 7/5/19 2:43 PM, Philippe Mathieu-Daudé wrote:
>> In commit e9d652824b0 we extracted the vfp_set_fpscr_to_host()
>> function but failed at calling it in the correct place, we call
>> it after xregs[ARM_VFP_FPSCR] is modified.
>>
>> Fix by calling this function before we update FPSCR.
>>
>> Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> target/arm/vfp_helper.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c
>> index 46041e3294..9710ef1c3e 100644
>> --- a/target/arm/vfp_helper.c
>> +++ b/target/arm/vfp_helper.c
>> @@ -197,6 +197,8 @@ void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t val)
>> val &= 0xf7c0009f;
>> }
>>
>> + vfp_set_fpscr_to_host(env, val);
>> +
>> /*
>> * We don't implement trapped exception handling, so the
>> * trap enable bits, IDE|IXE|UFE|OFE|DZE|IOE are all RAZ/WI (not RES0!)
>> @@ -217,8 +219,6 @@ void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t val)
>> env->vfp.qc[1] = 0;
>> env->vfp.qc[2] = 0;
>> env->vfp.qc[3] = 0;
>> -
>> - vfp_set_fpscr_to_host(env, val);
>> }
>>
>> void vfp_set_fpscr(CPUARMState *env, uint32_t val)
>>
--
Alex Bennée
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] target/arm/vfp_helper: Call set_fpscr_to_host before updating to FPSCR
2019-07-05 12:43 [Qemu-devel] [PATCH] target/arm/vfp_helper: Call set_fpscr_to_host before updating to FPSCR Philippe Mathieu-Daudé
2019-07-05 12:45 ` Philippe Mathieu-Daudé
@ 2019-07-05 14:10 ` Laurent Desnogues
1 sibling, 0 replies; 4+ messages in thread
From: Laurent Desnogues @ 2019-07-05 14:10 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, qemu-arm, Alex Bennée, qemu-devel@nongnu.org
On Fri, Jul 5, 2019 at 2:43 PM Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>
> In commit e9d652824b0 we extracted the vfp_set_fpscr_to_host()
> function but failed at calling it in the correct place, we call
> it after xregs[ARM_VFP_FPSCR] is modified.
>
> Fix by calling this function before we update FPSCR.
>
> Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Thanks,
Laurent
> ---
> target/arm/vfp_helper.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c
> index 46041e3294..9710ef1c3e 100644
> --- a/target/arm/vfp_helper.c
> +++ b/target/arm/vfp_helper.c
> @@ -197,6 +197,8 @@ void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t val)
> val &= 0xf7c0009f;
> }
>
> + vfp_set_fpscr_to_host(env, val);
> +
> /*
> * We don't implement trapped exception handling, so the
> * trap enable bits, IDE|IXE|UFE|OFE|DZE|IOE are all RAZ/WI (not RES0!)
> @@ -217,8 +219,6 @@ void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t val)
> env->vfp.qc[1] = 0;
> env->vfp.qc[2] = 0;
> env->vfp.qc[3] = 0;
> -
> - vfp_set_fpscr_to_host(env, val);
> }
>
> void vfp_set_fpscr(CPUARMState *env, uint32_t val)
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-05 14:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-05 12:43 [Qemu-devel] [PATCH] target/arm/vfp_helper: Call set_fpscr_to_host before updating to FPSCR Philippe Mathieu-Daudé
2019-07-05 12:45 ` Philippe Mathieu-Daudé
2019-07-05 13:39 ` Alex Bennée
2019-07-05 14:10 ` Laurent Desnogues
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).