diff mbox series

[4/4] target/arm: Use CPTR_TFP with CPTR_EL3 in fp_exception_el

Message ID 20220127063428.30212-5-richard.henderson@linaro.org
State New
Headers show
Series target/arm: SVE fixes versus VHE | expand

Commit Message

Richard Henderson Jan. 27, 2022, 6:34 a.m. UTC
Use the named bit rather than a bare extract32.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Maydell Jan. 28, 2022, 6:13 p.m. UTC | #1
On Thu, 27 Jan 2022 at 06:34, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Use the named bit rather than a bare extract32.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/arm/helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index ca916139e8..5610879680 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -13034,7 +13034,7 @@ int fp_exception_el(CPUARMState *env, int cur_el)
>      }
>
>      /* CPTR_EL3 : present in v8 */
> -    if (extract32(env->cp15.cptr_el[3], 10, 1)) {
> +    if (env->cp15.cptr_el[3] & CPTR_TFP) {
>          /* Trap all FP ops to EL3 */
>          return 3;
>      }
> --
> 2.25.1

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM
diff mbox series

Patch

diff --git a/target/arm/helper.c b/target/arm/helper.c
index ca916139e8..5610879680 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -13034,7 +13034,7 @@  int fp_exception_el(CPUARMState *env, int cur_el)
     }
 
     /* CPTR_EL3 : present in v8 */
-    if (extract32(env->cp15.cptr_el[3], 10, 1)) {
+    if (env->cp15.cptr_el[3] & CPTR_TFP) {
         /* Trap all FP ops to EL3 */
         return 3;
     }