cpu_ldst_template.h: Use ld*_p directly rather than via ld*_raw macros

The ld*_raw and st*_raw macros are now only used within the code
produced by cpu_ldst_template.h, and only in three places.
Expand these out to just call the ld_p and st_p functions directly.

Note that in all the callsites the address argument is a uintptr_t,
so we can drop that part of the double-cast used in the saddr() and
laddr() macros.

Backports commit 355392329e4a843580e53cb027ed85e0cbebb640 from qemu
This commit is contained in:
Peter Maydell 2019-04-22 07:09:55 -04:00 committed by Lioncash
parent 1a880ef99b
commit f1a1f3c642
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -92,7 +92,7 @@ glue(glue(glue(cpu_ld, USUFFIX), MEMSUFFIX), _ra)(CPUArchState *env,
oi, retaddr);
} else {
uintptr_t hostaddr = (uintptr_t)(addr + entry->addend);
res = glue(glue(ld, USUFFIX), _raw)(hostaddr);
res = glue(glue(ld, USUFFIX), _p)((uint8_t *)hostaddr);
}
return res;
}
@ -125,7 +125,7 @@ glue(glue(glue(cpu_lds, SUFFIX), MEMSUFFIX), _ra)(CPUArchState *env,
MMUSUFFIX)(env, addr, oi, retaddr);
} else {
uintptr_t hostaddr = (uintptr_t)(addr + entry->addend);
res = glue(glue(lds, SUFFIX), _raw)(hostaddr);
res = glue(glue(lds, SUFFIX), _p)((uint8_t *)hostaddr);
}
return res;
}
@ -160,7 +160,7 @@ glue(glue(glue(cpu_st, SUFFIX), MEMSUFFIX), _ra)(CPUArchState *env,
retaddr);
} else {
uintptr_t hostaddr = (uintptr_t)(addr + entry->addend);
glue(glue(st, SUFFIX), _raw)(hostaddr, v);
glue(glue(st, SUFFIX), _p)((uint8_t *)hostaddr, v);
}
}