[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 06/15] target/arm: Use MAKE_64BIT_MASK to compute indexmask
From: |
Richard Henderson |
Subject: |
[PATCH v2 06/15] target/arm: Use MAKE_64BIT_MASK to compute indexmask |
Date: |
Thu, 10 Feb 2022 15:04:14 +1100 |
The macro is a bit more readable than the inlined computation.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/helper.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index cf38ebd816..94304804cb 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -11516,8 +11516,8 @@ static bool get_phys_addr_lpae(CPUARMState *env,
uint64_t address,
level = startlevel;
}
- indexmask_grainsize = (1ULL << (stride + 3)) - 1;
- indexmask = (1ULL << (inputsize - (stride * (4 - level)))) - 1;
+ indexmask_grainsize = MAKE_64BIT_MASK(0, stride + 3);
+ indexmask = MAKE_64BIT_MASK(0, inputsize - (stride * (4 - level)));
/* Now we can extract the actual base address from the TTBR */
descaddr = extract64(ttbr, 0, 48);
--
2.25.1
- [PATCH v2 02/15] target/arm: Set TCR_EL1.TSZ for user-only, (continued)
- [PATCH v2 02/15] target/arm: Set TCR_EL1.TSZ for user-only, Richard Henderson, 2022/02/09
- [PATCH v2 03/15] target/arm: Fault on invalid TCR_ELx.TxSZ, Richard Henderson, 2022/02/09
- [PATCH v2 01/15] hw/registerfields: Add FIELD_SEX<N> and FIELD_SDP<N>, Richard Henderson, 2022/02/09
- [PATCH v2 05/15] target/arm: Pass outputsize down to check_s2_mmu_setup, Richard Henderson, 2022/02/09
- [PATCH v2 04/15] target/arm: Move arm_pamax out of line, Richard Henderson, 2022/02/09
- [PATCH v2 06/15] target/arm: Use MAKE_64BIT_MASK to compute indexmask,
Richard Henderson <=
- [PATCH v2 07/15] target/arm: Honor TCR_ELx.{I}PS, Richard Henderson, 2022/02/09
- [PATCH v2 08/15] target/arm: Prepare DBGBVR and DBGWVR for FEAT_LVA, Richard Henderson, 2022/02/09
- [PATCH v2 09/15] target/arm: Implement FEAT_LVA, Richard Henderson, 2022/02/09
- [PATCH v2 11/15] target/arm: Extend arm_fi_to_lfsc to level -1, Richard Henderson, 2022/02/09
- [PATCH v2 14/15] target/arm: Validate tlbi TG matches translation granule in use, Richard Henderson, 2022/02/09