]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/alpha: Do not use target_ulong for page table entries / indexes
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 2 Feb 2026 23:06:57 +0000 (00:06 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 3 Feb 2026 13:57:34 +0000 (14:57 +0100)
%L[123]pte are loaded calling ldq_le_phys() which returns
a uint64_t. %pt is loaded with @ptbr, declared as uint64_t
in target/alpha/cpu.h:

  236    uint64_t ptbr;

%index is at most 1024 so can fit in uint16_t.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20260202234550.34156-6-philmd@linaro.org>

target/alpha/helper.c

index 2dc52cc44651b5bca8904f3b56eea6ee15b06a6e..d6200d101cc5ffc81404e6df74f2e23c13d074a5 100644 (file)
@@ -173,8 +173,9 @@ static int get_physical_address(CPUAlphaState *env, target_ulong addr,
     CPUState *cs = env_cpu(env);
     target_long saddr = addr;
     target_ulong phys = 0;
-    target_ulong L1pte, L2pte, L3pte;
-    target_ulong pt, index;
+    uint64_t L1pte, L2pte, L3pte;
+    uint64_t pt;
+    uint16_t index;
     int prot = 0;
     int ret = MM_K_ACV;
     MemTxResult txres;