Skip to content

Commit cd83f84

Browse files
authored
BasicCABI.md: add a note about emscripten long double alignment (#226)
Emscripten uses a bit different ABI from others. References: emscripten-core/emscripten#14456 https://reviews.llvm.org/D104808
1 parent 64f67c9 commit cd83f84

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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)