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>
This commit is contained in:
@@ -29,11 +29,11 @@ int hexagon_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
|
||||
for (int i = 0; i < NUM_PREGS; i++) {
|
||||
p3_0 = deposit32(p3_0, i * 8, 8, env->pred[i]);
|
||||
}
|
||||
return gdb_get_regl(mem_buf, p3_0);
|
||||
return gdb_get_reg32(mem_buf, p3_0);
|
||||
}
|
||||
|
||||
if (n < TOTAL_PER_THREAD_REGS) {
|
||||
return gdb_get_regl(mem_buf, env->gpr[n]);
|
||||
return gdb_get_reg32(mem_buf, env->gpr[n]);
|
||||
}
|
||||
|
||||
n -= TOTAL_PER_THREAD_REGS;
|
||||
@@ -56,12 +56,12 @@ int hexagon_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
|
||||
for (int i = 0; i < NUM_PREGS; i++) {
|
||||
env->pred[i] = extract32(p3_0, i * 8, 8);
|
||||
}
|
||||
return sizeof(target_ulong);
|
||||
return 4;
|
||||
}
|
||||
|
||||
if (n < TOTAL_PER_THREAD_REGS) {
|
||||
env->gpr[n] = ldl_le_p(mem_buf);
|
||||
return sizeof(target_ulong);
|
||||
return 4;
|
||||
}
|
||||
|
||||
n -= TOTAL_PER_THREAD_REGS;
|
||||
@@ -81,7 +81,7 @@ static int gdb_get_vreg(CPUHexagonState *env, GByteArray *mem_buf, int n)
|
||||
int total = 0;
|
||||
int i;
|
||||
for (i = 0; i < ARRAY_SIZE(env->VRegs[n].uw); i++) {
|
||||
total += gdb_get_regl(mem_buf, env->VRegs[n].uw[i]);
|
||||
total += gdb_get_reg32(mem_buf, env->VRegs[n].uw[i]);
|
||||
}
|
||||
return total;
|
||||
}
|
||||
@@ -91,7 +91,7 @@ static int gdb_get_qreg(CPUHexagonState *env, GByteArray *mem_buf, int n)
|
||||
int total = 0;
|
||||
int i;
|
||||
for (i = 0; i < ARRAY_SIZE(env->QRegs[n].uw); i++) {
|
||||
total += gdb_get_regl(mem_buf, env->QRegs[n].uw[i]);
|
||||
total += gdb_get_reg32(mem_buf, env->QRegs[n].uw[i]);
|
||||
}
|
||||
return total;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user