On 10/13/2026 5:10 PM, Pierrick Bouvier wrote:
On 10/8/2026 5:35 PM, Brian Cain wrote:
Mark scalar and pair reads of *PCYCLE* regs as I/O so icount synchronizes
before reading.

Cover the read paths of {U,G}{PCYCLE,TIMER}{LO,HI,} registers.

Signed-off-by: Brian Cain <[email protected]>
---
  target/hexagon/gen_tcg_sys.h | 12 ++++++++++--
  target/hexagon/genptr.c      | 30 ++++++++++++++++++++++++++----
  target/hexagon/hex_common.py |  8 ++++----
  3 files changed, 40 insertions(+), 10 deletions(-)

The comment on translator_io_start seems to be out of date.
cpu->can_do_io will always be set transitively, and not only for icount.
If I understand correctly, calling translator_io_start will simply for
effect to end current TB, and start a new one.

All that to say that I'm not sure it's needed.
Did you find an issue without this?

IIRC without this change we get a "Bad icount read" when performing the I/O side effects of instructions like reading from the cycle/timer registers.



Regards,
Pierrick

Reply via email to