Message ID | 20241004163042.85922-7-philmd@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | misc: Use explicit endian LD/ST API | expand |
On 10/4/24 09:30, Philippe Mathieu-Daudé wrote: > The Alpha architecture uses little endianness. Directly use > the little-endian LD/ST API. > > Mechanical change using: > > $ end=le; \ > for acc in uw w l q tul; do \ > sed -i -e "s/ld${acc}_p(/ld${acc}_${end}_p(/" \ > -e "s/st${acc}_p(/st${acc}_${end}_p(/" \ > $(git grep -wlE '(ld|st)t?u?[wlq]_p' target/alpha/); \ > done > > Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org> > --- > target/alpha/gdbstub.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
diff --git a/target/alpha/gdbstub.c b/target/alpha/gdbstub.c index bf5091c2a6e..1a7e2dd9202 100644 --- a/target/alpha/gdbstub.c +++ b/target/alpha/gdbstub.c @@ -59,7 +59,7 @@ int alpha_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) int alpha_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) { CPUAlphaState *env = cpu_env(cs); - target_ulong tmp = ldq_p(mem_buf); + target_ulong tmp = ldq_le_p(mem_buf); CPU_DoubleU d; switch (n) {
The Alpha architecture uses little endianness. Directly use the little-endian LD/ST API. Mechanical change using: $ end=le; \ for acc in uw w l q tul; do \ sed -i -e "s/ld${acc}_p(/ld${acc}_${end}_p(/" \ -e "s/st${acc}_p(/st${acc}_${end}_p(/" \ $(git grep -wlE '(ld|st)t?u?[wlq]_p' target/alpha/); \ done Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- target/alpha/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)