On 3/13/25 11: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.
That was my question, thanks.
So we need to keep on doing the integral cast instead of calling
cpu_ldw_mmu with MO_BESW.
r~