You are presented with C-like struct below.
Struct fields are being aligned so CPUs have easier time
fetching them from memory to registers.
For the following struct you are expected to write answer:
8B 2B 6P 8B where the
6P represent padding needed.
struct {
a0: double // 8B
a2: short // 2B
a1: double // 8B
}
Each struct field needs to be aligned so the memory address it
starts is divisible by it size.
padding = (type_size - (currentAddr mod type_size)) mod
type_size
Also entire struct needs to be aligned by the size of largest
type.