On Fri Jul 3, 2026 at 9:35 PM JST, Gary Guo wrote:
> On Fri Jul 3, 2026 at 3:57 AM BST, Alexandre Courbot wrote:
>> On Fri Jun 26, 2026 at 11:45 PM JST, Gary Guo wrote:
>> <...>
>>> @@ -309,7 +312,11 @@ pub trait Io {
>>>      // Always inline to optimize out error path of `build_assert`.
>>>      #[inline(always)]
>>>      fn io_addr_assert<U>(&self, offset: usize) -> usize {
>>> -        build_assert!(offset_valid::<U>(offset, Self::Target::MIN_SIZE));
>>> +        // We cannot check alignment with `offset_valid` using 
>>> `self.addr()`. So set 0 for it and
>>> +        // ensure alignment by checking that the alignment of `U` is 
>>> smaller or equal to the
>>> +        // alignment of `Self::Target`.
>>> +        const_assert!(Alignment::of::<U>().as_usize() <= 
>>> Self::Target::MIN_ALIGN.as_usize());
>>
>> With `Region::MIN_ALIGN` being `4`, my understanding is that this will
>> make `read64` and other infallible 64-bit accessors unusable on untyped
>> I/O regions?
>
> That's correct.

Isn't that a limitation we may want to eventually address? The fallible
accessors are still usable, but it seems arbitrary that the non-fallible
ones stop at 32 bits...

Reply via email to