On 4/4/25 01:49, Philippe Mathieu-Daudé wrote:
@@ -101,7 +102,7 @@ static void hppa_flush_tlb_ent(CPUHPPAState *env,
HPPATLBEntry *ent,
tlb_flush_range_by_mmuidx(cs, ent->itree.start,
ent->itree.last - ent->itree.start + 1,
- HPPA_MMU_FLUSH_MASK, TARGET_LONG_BITS);
+ HPPA_MMU_FLUSH_MASK, target_long_bits());
This ignores the fact that TCG is still using the target_long type, so
there's no real hope at this point of differentiating TARGET_LONG_BITS
this way.
I think that you really need to make sure that target_long/target_ulong
are little more than a shortcut used by TCG backends to invoke *_tl
functions. Basically remove all uses outside target/ and tcg/ (a lot of
uses in hw/ are for sPAPR devices and they can be replaced easily with
uint64_t; there are actually not many).
Then let cpu.h define target_long/target_ulong so that you can remove
the uses in tcg/ as well, and poison TARGET_LONG_BITS outside target/.
This way TARGET_LONG_BITS does not need to be part of the TargetInfo.
On the other hand, if I'm missing something in your plan just tell me.
Paolo