qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mti


From: Dong, Eddie
Subject: RE: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime
Date: Thu, 29 Sep 2022 18:11:16 +0000

Using a union can better reflect this. Also, it can avoid the convert from 2 
32-bits register to 64 bits, like the above code does.
ibex_timer_update_irqs() also does this conversion.

It took me a bit of time, but now I think I understand what you mean: a union 
of 2 uint32_t's (perhaps packed into a struct or an array) and a uint64_t would 
make it easier to access the components, is that what you mean? That is pretty 
handy, thanks.


YES.  You decidešŸ˜Š

Thanks Eddie

reply via email to

[Prev in Thread] Current Thread [Next in Thread]