# Linux Kernel Module Cheat

#### 28.9.3. GNU GAS assembler data sizes

Let’s see how many bytes go into each data type:

- userland/arch/x86_64/gas_data_sizes.S

- userland/arch/arm/gas_data_sizes.S

- userland/arch/aarch64/gas_data_sizes.S

The results are shown at: Table 4, “Summary of GNU GAS assembler data sizes”.

Table 4. Summary of GNU GAS assembler data sizes
.byte | .word | .long | .quad | .octa
--- | --- | --- | --- | ---
x86 | 1 | 2 | 4 | 8
16 | arm | 1 | 4 | 4
8 | 16 | aarch64 | 1 | 4

and also keep in mind that according to the manual:

- `.int` is the same as `.long`

- `.hword` is the same as `.short` which is usually the same as `.word`

Bibliography:

- https://sourceware.org/binutils/docs-2.32/as/Pseudo-Ops.html#Pseudo-Ops

- https://stackoverflow.com/questions/43005411/how-does-the-quad-directive-work-in-assembly/43006616

- https://gist.github.com/steakknife/d47d0b19a24817f48027

- GNU GAS assembler ARM specifics

- GNU GAS assembler ARM .n and .w suffixes