Hi Arnd,

On Sun, 2024-10-27 at 13:15 +0000, Arnd Bergmann wrote:
> On Sun, Oct 27, 2024, at 06:16, Finn Thain wrote:
> > On Sun, 27 Oct 2024, Thorsten Glaser wrote:
> > 
> > > Finn Thain dixit:
> > > 
> > > > That would mean __alignof__(foo.b) == sizeof(foo.b) but that's not the
> > > > case on my Linux/i686 system. 4 != 8:
> > > > 
> > > > struct baa {
> > > >        int a;
> > > >        long long b;
> > > > } foo;
> > > 
> > > That struct is just 12 bytes for you then?
> > > 
> > 
> > Right. i686 and m68k agree on that.
> 
> The other ones that have misaligned 'long long' variables are
> 
> arc
> arm (OABI only)
> csky
> microblaze
> nios2
> openrisc
> superh
> i386
> 
> The 32-bit architectures that use a natural 8-byte
> alignment are
> 
> arm (EABI)
> parisc
> mips
> powerpc
> riscv
> s390
> sparc
> xtensa
> 
> m68k is the only architecture supported by linux-6.x that
> does 2-byte alignment, otherwise the two seem to be equally
> common.

Another useful data point. This is the kind of discussion I had hoped for!

Thanks a lot!

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply via email to