On 13/3/25 19:05, Richard Henderson wrote:
On 3/13/25 09:59, Pierrick Bouvier wrote:
+static inline int
+cpu_ldsw_be_mmuidx_ra(CPUArchState *env, abi_ptr addr,
+ int mmu_idx, uintptr_t ra)
+{
+ return (int16_t)cpu_lduw_be_mmuidx_ra(env, addr, mmu_idx, ra);
For my personal culture, is that strictly equivalent to doing the load
with MO_BESW?
If you're asking if it's the same as passing MO_BESW to
tcg_gen_qemu_ld_i32(), yes. The tcg code generator takes care of making
the value sign-extended.
If you're asking if it's the same as passing MO_BESW to cpu_ldw_mmu(),
no. The core functions only handle unsigned values. This older api
contained functions with a signed return value, so we preserve that.
Are these 2 APIs doing the same thing? What are the uses? Can we rename
the legacy one?