@samitouri / QOSamiQemu / commits / 7831e5f48d

target/hexagon: Expand gdb_get_regl() -> gdb_get_reg32()

The Hexagon target is only built as 32-bit: $ git grep TARGET_LONG_BITS configs/targets/hexagon* configs/targets/hexagon-linux-user.mak:5:TARGET_LONG_BITS=32 Mechanically replace: gdb_get_regl() -> gdb_get_reg32() Reviewed-by: Brian Cain <Brian.Cain@oss.qualcomm.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20260219191955.83815-34-philmd@linaro.org>

Philippe Mathieu-Daudé committed Feb 17, 2026 at 17:03 UTC 7831e5f48d2dc011df8aa41e017543fa53aa0a60
1 file changed +6 -6
target/hexagon/gdbstub.c
+6 -6
@@ -29,11 +29,11 @@ int hexagon_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
29 for (int i = 0; i < NUM_PREGS; i++) {
30 p3_0 = deposit32(p3_0, i * 8, 8, env->pred[i]);
31 }
32 - return gdb_get_regl(mem_buf, p3_0);
32 + return gdb_get_reg32(mem_buf, p3_0);
33 }
34
35 if (n < TOTAL_PER_THREAD_REGS) {
36 - return gdb_get_regl(mem_buf, env->gpr[n]);
36 + return gdb_get_reg32(mem_buf, env->gpr[n]);
37 }
38
39 n -= TOTAL_PER_THREAD_REGS;
@@ -56,12 +56,12 @@ int hexagon_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
56 for (int i = 0; i < NUM_PREGS; i++) {
57 env->pred[i] = extract32(p3_0, i * 8, 8);
58 }
59 - return sizeof(target_ulong);
59 + return 4;
60 }
61
62 if (n < TOTAL_PER_THREAD_REGS) {
63 env->gpr[n] = ldl_le_p(mem_buf);
64 - return sizeof(target_ulong);
64 + return 4;
65 }
66
67 n -= TOTAL_PER_THREAD_REGS;
@@ -81,7 +81,7 @@ static int gdb_get_vreg(CPUHexagonState *env, GByteArray *mem_buf, int n)
81 int total = 0;
82 int i;
83 for (i = 0; i < ARRAY_SIZE(env->VRegs[n].uw); i++) {
84 - total += gdb_get_regl(mem_buf, env->VRegs[n].uw[i]);
84 + total += gdb_get_reg32(mem_buf, env->VRegs[n].uw[i]);
85 }
86 return total;
87 }
@@ -91,7 +91,7 @@ static int gdb_get_qreg(CPUHexagonState *env, GByteArray *mem_buf, int n)
91 int total = 0;
92 int i;
93 for (i = 0; i < ARRAY_SIZE(env->QRegs[n].uw); i++) {
94 - total += gdb_get_regl(mem_buf, env->QRegs[n].uw[i]);
94 + total += gdb_get_reg32(mem_buf, env->QRegs[n].uw[i]);
95 }
96 return total;
97 }