Skip to content

Commit

Permalink
Merge pull request #367 from asb/bf16
Browse files Browse the repository at this point in the history
Add ABI information for __bf16
  • Loading branch information
kito-cheng authored May 23, 2023
2 parents c0fbd21 + 0fc747c commit 3a84056
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions riscv-cc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ alignments (based on the ILP32 convention):
| long | 4 | 4
| long long | 8 | 8
| void * | 4 | 4
| +++__bf16+++ | 2 | 2
| _Float16 | 2 | 2
| float | 4 | 4
| double | 8 | 8
Expand All @@ -475,6 +476,7 @@ alignments (based on the LP64 convention):
| long long | 8 | 8
| +++__int128+++ | 16 | 16
| void * | 8 | 8
| +++__bf16+++ | 2 | 2
| _Float16 | 2 | 2
| float | 4 | 4
| double | 8 | 8
Expand Down Expand Up @@ -502,6 +504,8 @@ A null pointer (for all types) has the value zero.

`_Float16` is as defined in the C ISO/IEC TS 18661-3 extension.

`__bf16` has the same parameter passing and return rules as for `_Float16`.

`_Complex` types have the same layout as a struct containing two fields of the
corresponding real type (`float`, `double`, or `long double`), with the first
member holding the real part and the second member holding the imaginary part.
Expand Down
3 changes: 2 additions & 1 deletion riscv-elf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ the _Itanium {Cpp} ABI_ <<itanium-cxx-abi>>;
there are no RISC-V specific mangling rules.

See the "Type encodings" section in _Itanium {Cpp} ABI_
for more detail on how to mangle types.
for more detail on how to mangle types. Note that `__bf16` is mangled in the
same way as `std::bfloat16_t`.

== ELF Object Files

Expand Down

0 comments on commit 3a84056

Please sign in to comment.