Skip to content

Commit 609f68c

Browse files
committed
BasicCABI.md: add a note about emscripten long double alignment
For some reasons I don't know, Emscripten uses a bit different ABI than others.
1 parent 64f67c9 commit 609f68c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

BasicCABI.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ General type | C Type | `sizeof` | Alignment (bytes) | Wasm Value Type
4242
Floating point | `float` | 4 | 4 | f32
4343
Floating point | `double` | 8 | 8 | f64
4444
Floating point | `long double` | 16 | 16 | (none)
45+
Floating point | `long double` (Emscripten) | 16 | 8 | (none)
4546

4647
* `long double` values correspond to 128-bit IEEE-754 quad-precision binary128 values.
4748
Operations on these values are currently implemented as calls to
@@ -54,6 +55,7 @@ General type | C Type | `sizeof` | Alignment (bytes) | Wasm Value Type
5455
by an `unsigned int`.
5556
Otherwise, if a compiler supports such an `enum`, it would use `i64`
5657
for the `enum`.
58+
* Emscripten uses 8 byte alignment for `long double`.
5759

5860
**Aggregates and Unions**
5961

0 commit comments

Comments
 (0)