Hacker News new | ask | show | jobs
by owalt 1091 days ago
I do my current work (embedded) on an architecture with the following properties:

- 8-bit bytes

- 16-bit aligned accesses to 32-bit types

- 32-bit aligned accesses to 64-bit types.

- Struct alignment depends on the size of the struct (32-bit aligned for >= 64-bit structs)

It's a pretty common architecture in the automotive industry, though probably would be considered esoteric for other applications.

This is not the first platform I've encountered with "unnatural" alignment rules in the embedded space, and I'm sure it won't be the last. (The extra packing this allows is actually quite handy.)