Commit 33abc59
authored
Fix alignment in relaxed atomics spec test (#8961)
The spec test intends to use the natural alignment for all instructions,
but it's choosing an alignment based on the memory address type rather
than the size of the load/store. This means that sometimes the alignment
is too small (4 bytes for an 8-byte load/store in a 32-bit memory), and
sometimes the alignment is too large (8 bytes for a 4-byte load/store in
a 64-bit memory) both of which are a [validation
error](https://github.com/stevenfontanella/threads/blob/f521d7b3c19bcc9097aad979b3b91837eab88d83/interpreter/valid/valid.ml#L206)
(but are not in Binaryen today).
Use the size of the load/store as the alignment instead.
Spec reference:
<img width="737" height="216" alt="image"
src="https://github.com/user-attachments/assets/b86de03e-1316-4c2c-9a12-80773fb88119"
/>1 parent b8f9160 commit 33abc59
2 files changed
Lines changed: 304 additions & 304 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| |||
0 commit comments