search for: aq_aph

Displaying 3 results from an estimated 3 matches for "aq_aph".

2020 May 27
2
[cfe-dev] [RFC] Loading Bitfields with Smallest Needed Types
...use the declared type of the bitfield to govern the size of the read or write." (There was a similar rule for the meaning of `volatile`. I hope I'm not just getting confused between the two. Actually, since of the compilers on Godbolt, only MSVC follows this rule <https://godbolt.org/z/Aq_APH>, I'm *probably* wrong.) That is, if the bitfield is declared `int16_t`, then use 16-bit loads and stores for it; if it's declared `int32_t`, then use 32-bit loads and stores. This gives the programmer a reason to prefer one declared type over another. For example, in template<class...
2020 May 27
4
[cfe-dev] [RFC] Loading Bitfields with Smallest Needed Types
...ed type of the bitfield to govern the size of the read or write." > (There was a similar rule for the meaning of `volatile`. I hope I'm not > just getting confused between the two. Actually, since of the compilers on > Godbolt, only MSVC follows this rule <https://godbolt.org/z/Aq_APH>, I'm > *probably* wrong.) That is, if the bitfield is declared `int16_t`, then > use 16-bit loads and stores for it; if it's declared `int32_t`, then use > 32-bit loads and stores. > > I’ve always liked MSVC’s bit-field rules as a coherent whole, but they are > quite d...
2020 May 26
6
[RFC] Loading Bitfields with Smallest Needed Types
We're running into an interesting issue with the Linux kernel, and wanted advice on how to proceed. Example of what we're talking about: https://godbolt.org/z/ABGySq The issue is that when working with a bitfield a load may happen quickly after a store. For instance: struct napi_gro_cb { void *frag; unsigned int frag_len; u16 flush; u16 flush_id; u16 count; u16