mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
target/m68k: Use explicit big-endian LD/ST API
The M68K architecture uses big endianness. Directly use the big-endian LD/ST API. Mechanical change using: $ end=be; \ 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/m68k/); \ done Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <huth@tuxfamily.org> Message-ID: <20241004163042.85922-19-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
77b535cfdd
commit
3a76d30204
2 changed files with 6 additions and 6 deletions
|
@ -52,7 +52,7 @@ int m68k_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
|
||||||
CPUM68KState *env = cpu_env(cs);
|
CPUM68KState *env = cpu_env(cs);
|
||||||
uint32_t tmp;
|
uint32_t tmp;
|
||||||
|
|
||||||
tmp = ldl_p(mem_buf);
|
tmp = ldl_be_p(mem_buf);
|
||||||
|
|
||||||
if (n < 8) {
|
if (n < 8) {
|
||||||
/* D0-D7 */
|
/* D0-D7 */
|
||||||
|
|
|
@ -57,15 +57,15 @@ static int cf_fpu_gdb_set_reg(CPUState *cs, uint8_t *mem_buf, int n)
|
||||||
|
|
||||||
if (n < 8) {
|
if (n < 8) {
|
||||||
float_status s;
|
float_status s;
|
||||||
env->fregs[n].d = float64_to_floatx80(ldq_p(mem_buf), &s);
|
env->fregs[n].d = float64_to_floatx80(ldq_be_p(mem_buf), &s);
|
||||||
return 8;
|
return 8;
|
||||||
}
|
}
|
||||||
switch (n) {
|
switch (n) {
|
||||||
case 8: /* fpcontrol */
|
case 8: /* fpcontrol */
|
||||||
cpu_m68k_set_fpcr(env, ldl_p(mem_buf));
|
cpu_m68k_set_fpcr(env, ldl_be_p(mem_buf));
|
||||||
return 4;
|
return 4;
|
||||||
case 9: /* fpstatus */
|
case 9: /* fpstatus */
|
||||||
env->fpsr = ldl_p(mem_buf);
|
env->fpsr = ldl_be_p(mem_buf);
|
||||||
return 4;
|
return 4;
|
||||||
case 10: /* fpiar, not implemented */
|
case 10: /* fpiar, not implemented */
|
||||||
return 4;
|
return 4;
|
||||||
|
@ -107,10 +107,10 @@ static int m68k_fpu_gdb_set_reg(CPUState *cs, uint8_t *mem_buf, int n)
|
||||||
}
|
}
|
||||||
switch (n) {
|
switch (n) {
|
||||||
case 8: /* fpcontrol */
|
case 8: /* fpcontrol */
|
||||||
cpu_m68k_set_fpcr(env, ldl_p(mem_buf));
|
cpu_m68k_set_fpcr(env, ldl_be_p(mem_buf));
|
||||||
return 4;
|
return 4;
|
||||||
case 9: /* fpstatus */
|
case 9: /* fpstatus */
|
||||||
cpu_m68k_set_fpsr(env, ldl_p(mem_buf));
|
cpu_m68k_set_fpsr(env, ldl_be_p(mem_buf));
|
||||||
return 4;
|
return 4;
|
||||||
case 10: /* fpiar, not implemented */
|
case 10: /* fpiar, not implemented */
|
||||||
return 4;
|
return 4;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue