[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/15] target/arm: Use new FPCR_NZCV_MASK constant
From: |
Peter Maydell |
Subject: |
[PATCH 11/15] target/arm: Use new FPCR_NZCV_MASK constant |
Date: |
Mon, 16 Nov 2020 16:08:27 +0000 |
We defined a constant name for the mask of NZCV bits in the FPCR/FPSCR
in the previous commit; use it in a couple of places in existing code,
where we're masking out everything except NZCV for the "load to Rt=15
sets CPSR.NZCV" special case.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/translate-vfp.c.inc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/arm/translate-vfp.c.inc b/target/arm/translate-vfp.c.inc
index 84e806004e4..1ccaccbc834 100644
--- a/target/arm/translate-vfp.c.inc
+++ b/target/arm/translate-vfp.c.inc
@@ -743,7 +743,7 @@ static bool gen_M_fp_sysreg_read(DisasContext *s, int regno,
* helper call for the "VMRS to CPSR.NZCV" insn.
*/
tmp = load_cpu_field(vfp.xregs[ARM_VFP_FPSCR]);
- tcg_gen_andi_i32(tmp, tmp, 0xf0000000);
+ tcg_gen_andi_i32(tmp, tmp, FPCR_NZCV_MASK);
storefn(s, opaque, tmp);
break;
default:
@@ -884,7 +884,7 @@ static bool trans_VMSR_VMRS(DisasContext *s, arg_VMSR_VMRS
*a)
case ARM_VFP_FPSCR:
if (a->rt == 15) {
tmp = load_cpu_field(vfp.xregs[ARM_VFP_FPSCR]);
- tcg_gen_andi_i32(tmp, tmp, 0xf0000000);
+ tcg_gen_andi_i32(tmp, tmp, FPCR_NZCV_MASK);
} else {
tmp = tcg_temp_new_i32();
gen_helper_vfp_get_fpscr(tmp, cpu_env);
--
2.20.1
- [PATCH 06/15] target/arm: Enforce M-profile VMRS/VMSR register restrictions, (continued)
- [PATCH 06/15] target/arm: Enforce M-profile VMRS/VMSR register restrictions, Peter Maydell, 2020/11/16
- [PATCH 04/15] target/arm: Implement VSCCLRM insn, Peter Maydell, 2020/11/16
- [PATCH 07/15] target/arm: Refactor M-profile VMSR/VMRS handling, Peter Maydell, 2020/11/16
- [PATCH 08/15] target/arm: Move general-use constant expanders up in translate.c, Peter Maydell, 2020/11/16
- [PATCH 09/15] target/arm: Implement VLDR/VSTR system register, Peter Maydell, 2020/11/16
- [PATCH 10/15] target/arm: Implement M-profile FPSCR_nzcvqc, Peter Maydell, 2020/11/16
- [PATCH 11/15] target/arm: Use new FPCR_NZCV_MASK constant,
Peter Maydell <=
- [PATCH 12/15] target/arm: Factor out preserve-fp-state from full_vfp_access_check(), Peter Maydell, 2020/11/16
- [PATCH 13/15] target/arm: Implement FPCXT_S fp system register, Peter Maydell, 2020/11/16
- [PATCH 15/15] hw/intc/armv7m_nvic: Update FPDSCR masking for v8.1M, Peter Maydell, 2020/11/16
- [PATCH 14/15] target/arm: Implement FPCXT_NS fp system register, Peter Maydell, 2020/11/16