[Easy] Enforce alignment of buffer allocation
- [x] align the stack pointer
- [ ] align the start of data sections
- [ ] align strings within data sections
- [x] align buffer allocation at run-time
We should generate for all arrays/buffers etc: attribute ((aligned (16))) b
For all records/structs, we should generate "force_inline" functions by default, e.g.: static force_inline inline uint64_t *Hacl_Impl_Poly1305_64___proj__MkState__item__r(Hacl_Impl_Poly1305_64_poly1305_state projectee) { Hacl_Impl_Poly1305_64_poly1305_state scrut = projectee; uint64_t *r = scrut.x00; uint64_t *h = scrut.x01; return r; }
static force_inline inline uint64_t *Hacl_Impl_Poly1305_64___proj__MkState__item__h(Hacl_Impl_Poly1305_64_poly1305_state projectee) { Hacl_Impl_Poly1305_64_poly1305_state scrut = projectee; uint64_t *r = scrut.x00; uint64_t *h = scrut.x01; return h; }
Yes; for wasm I'd have to perform the alignment of allocation by hand (and the inlining by hand too).