[llvm-dev] RFC: On removing magic numbers assuming 8-bit bytes

Boris Boesler via llvm-dev llvm-dev at lists.llvm.org
Wed May 8 01:05:15 PDT 2019


Hi

> Am 08.05.2019 um 09:52 schrieb Jesper Antonsson via llvm-dev <llvm-dev at lists.llvm.org>:
> 
>> What are you using for the executable file format for machines whose
>> byte size is not 8? Looks like the ELF spec assumes that a byte is 8
>> bits long.
> 
> We use ELF. Architectures can have a different byte-size to the on-disk 
> representation in ELF/DWARF, and the ELF/DWARF specs are not good at
> differentiating between octets and bytes. Thus it's probably easier to
> keep ELF/DWARF in the 8-bit byte world and we have to convert from
> machine byte width to 8-bit bytes/octets at some point. This might be
> one additional reason to use the "addressable unit" terminology
> instead.

We don't even have an explicit executable file format. Basically the executable is the OS on the core. And we use the term "bits per addressable unit" (BPAU), because to us a byte is still 8 bits wide.

Thanks,
Boris



More information about the llvm-dev mailing list