Skip to content

Commit 3a84056

Browse files
authored
Merge pull request #367 from asb/bf16
Add ABI information for __bf16
2 parents c0fbd21 + 0fc747c commit 3a84056

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

riscv-cc.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ alignments (based on the ILP32 convention):
449449
| long | 4 | 4
450450
| long long | 8 | 8
451451
| void * | 4 | 4
452+
| +++__bf16+++ | 2 | 2
452453
| _Float16 | 2 | 2
453454
| float | 4 | 4
454455
| double | 8 | 8
@@ -475,6 +476,7 @@ alignments (based on the LP64 convention):
475476
| long long | 8 | 8
476477
| +++__int128+++ | 16 | 16
477478
| void * | 8 | 8
479+
| +++__bf16+++ | 2 | 2
478480
| _Float16 | 2 | 2
479481
| float | 4 | 4
480482
| double | 8 | 8
@@ -502,6 +504,8 @@ A null pointer (for all types) has the value zero.
502504

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

507+
`__bf16` has the same parameter passing and return rules as for `_Float16`.
508+
505509
`_Complex` types have the same layout as a struct containing two fields of the
506510
corresponding real type (`float`, `double`, or `long double`), with the first
507511
member holding the real part and the second member holding the imaginary part.

riscv-elf.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ the _Itanium {Cpp} ABI_ <<itanium-cxx-abi>>;
145145
there are no RISC-V specific mangling rules.
146146

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

150151
== ELF Object Files
151152

0 commit comments

Comments
 (0)