Data Size in Assembly and C
Since I can never remember the width for each suffix, I am just reprinting them here from https://en.wikibooks.org/wiki/X86_Assembly/GAS_Syntax
GAS assembly instructions are generally suffixed with the letters “b”, “s”, “w”, “l”, “q” or “t” to determine what size operand is being manipulated.
b = byte (8 bit) s = short (16 bit integer) or single (32-bit floating point) w = word (16 bit) l = long (32 bit integer or 64-bit floating point) q = quad (64 bit) t = ten bytes (80-bit floating point)
If the suffix is not specified, and there are no memory operands for the instruction, GAS infers the operand size from the size of the destination register operand (the final operand).
Being one level higher than assembly, C has different data size (on x86-64):
1 |
|
1 | char is 1 |