[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 07/23] target/loongarch: Cast address to 64bit before DMW_64_V
From: |
Jiaxun Yang |
Subject: |
[PATCH v2 07/23] target/loongarch: Cast address to 64bit before DMW_64_VSEG shift |
Date: |
Thu, 26 Dec 2024 21:19:38 +0000 |
Avoid compiler warning on 32bit. This code path won't be taken anyway.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
target/loongarch/cpu_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/loongarch/cpu_helper.c b/target/loongarch/cpu_helper.c
index
580362ac3e9ffbe6c8523cf57902dcda018ceed5..b8da136eb0554ba661a15e3069ee0d6bae61af86
100644
--- a/target/loongarch/cpu_helper.c
+++ b/target/loongarch/cpu_helper.c
@@ -196,7 +196,7 @@ int get_physical_address(CPULoongArchState *env, hwaddr
*physical,
plv = kernel_mode | (user_mode << R_CSR_DMW_PLV3_SHIFT);
if (is_la64(env)) {
- base_v = address >> R_CSR_DMW_64_VSEG_SHIFT;
+ base_v = (uint64_t)address >> R_CSR_DMW_64_VSEG_SHIFT;
} else {
base_v = address >> R_CSR_DMW_32_VSEG_SHIFT;
}
--
2.43.0
- Re: [PATCH v2 02/23] target/loongarch: Fix address generation for gen_sc, (continued)
- [PATCH v2 07/23] target/loongarch: Cast address to 64bit before DMW_64_VSEG shift,
Jiaxun Yang <=
- [PATCH v2 08/23] target/loongarch: Fix some modifiers for log formatting, Jiaxun Yang, 2024/12/26
- [PATCH v2 09/23] target/loongarch: Use target_ulong for CSR helpers, Jiaxun Yang, 2024/12/26
- [PATCH v2 10/23] target/loongarch: Scrutinise TCG float translation for 32 bit build, Jiaxun Yang, 2024/12/26
- [PATCH v2 11/23] target/loongarch: Scrutinise TCG vector translation for 32 bit build, Jiaxun Yang, 2024/12/26