Am 12.12.2011 16:58, schrieb Paul Brook: >> For me the most annoying issue was that tcg_gen_qemu_{ld,st}* needs TCGv. > > You mean the value transferred is always TCGv sized, so ld32u requires an > additional truncation before doing 32-bit arithmetic? Fixing that is > completely independent of making TCGv a separate type.
tcg_gen_qemu_{ld,st} (guest) differs from tcg_gen_{ld,st} (host) in that they require a TCGv ret/arg (all use TCGv addr). I.e., to read an 8-bit memory-mapped register on a 64-bit target with tcg_gen_qemu_ld8u we need a TCGv temporary and trunc to i32 afterwards (smallest currently available variable size) or unnecessarily blow up storage size to target_long/TCGv everywhere. So, yes, adding an _i32 version may make sense, to at least encapsulate it at TCG level. And without my patches I might have not noticed this design flaw. :) Andreas