Skip to content

Commit 721e34b

Browse files
authored
Merge pull request #644 from tgross35/update-readme
Sync readme intrinsics with LLVM
2 parents b78d0f1 + 686511e commit 721e34b

File tree

1 file changed

+108
-21
lines changed

1 file changed

+108
-21
lines changed

Diff for: README.md

+108-21
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ you can use this crate to get those intrinsics and solve the linker errors. To
1616
do that, add this crate somewhere in the dependency graph of the crate you are
1717
building:
1818

19-
``` toml
19+
```toml
2020
# Cargo.toml
2121
[dependencies]
2222
compiler_builtins = { git = "https://github.com/rust-lang/compiler-builtins" }
2323
```
2424

25-
``` rust
25+
```rust
2626
extern crate compiler_builtins;
2727

2828
// ...
@@ -57,7 +57,7 @@ features = ["c"]
5757
5. Add the intrinsic to `examples/intrinsics.rs` to verify it can be linked on
5858
all targets.
5959
6. Send a Pull Request (PR).
60-
7. Once the PR passes our extensive [testing infrastructure][4], we'll merge it!
60+
7. Once the PR passes our extensive testing infrastructure, we'll merge it!
6161
8. Celebrate :tada:
6262

6363
[1]: https://github.com/rust-lang/llvm-project/tree/9e3de9490ff580cd484fbfa2908292b4838d56e7/compiler-rt/test/builtins/Unit
@@ -91,7 +91,7 @@ obtained with the following:
9191
```sh
9292
curl -L -o rustc-llvm-18.0.tar.gz https://github.com/rust-lang/llvm-project/archive/rustc/18.0-2024-02-13.tar.gz
9393
tar xzf rustc-llvm-18.0.tar.gz --strip-components 1 llvm-project-rustc-18.0-2024-02-13/compiler-rt
94-
````
94+
```
9595

9696
Local targets may also be tested with `./ci/run.sh [target]`.
9797

@@ -100,9 +100,11 @@ rely on CI.
100100

101101
## Progress
102102

103+
- [x] aarch64/chkstk.S
103104
- [x] adddf3.c
104105
- [x] addsf3.c
105106
- [x] arm/adddf3vfp.S
107+
- [x] arm/addsf3.S
106108
- [x] arm/addsf3vfp.S
107109
- [x] arm/aeabi_dcmp.S
108110
- [x] arm/aeabi_fcmp.S
@@ -113,6 +115,7 @@ rely on CI.
113115
- [x] arm/aeabi_memset.S
114116
- [x] arm/aeabi_uidivmod.S
115117
- [x] arm/aeabi_uldivmod.S
118+
- [ ] arm/chkstk.S
116119
- [x] arm/divdf3vfp.S
117120
- [ ] arm/divmodsi4.S (generic version is done)
118121
- [x] arm/divsf3vfp.S
@@ -154,6 +157,12 @@ rely on CI.
154157
- [ ] arm/unordsf2vfp.S
155158
- [x] ashldi3.c
156159
- [x] ashrdi3.c
160+
- [ ] avr/divmodhi4.S
161+
- [ ] avr/divmodqi4.S
162+
- [ ] avr/mulhi3.S
163+
- [ ] avr/mulqi3.S
164+
- [ ] avr/udivmodhi4.S
165+
- [ ] avr/udivmodqi4.S
157166
- [x] bswapdi2.c
158167
- [x] bswapsi2.c
159168
- [x] bswapti2.c
@@ -166,6 +175,7 @@ rely on CI.
166175
- [x] divdi3.c
167176
- [x] divmoddi4.c
168177
- [x] divmodsi4.c
178+
- [x] divmodti4.c
169179
- [x] divsf3.c
170180
- [x] divsi3.c
171181
- [x] extendsfdf2.c
@@ -204,6 +214,8 @@ rely on CI.
204214
- [x] mulsf3.c
205215
- [x] powidf2.c
206216
- [x] powisf2.c
217+
- [ ] riscv/muldi3.S
218+
- [ ] riscv/mulsi3.S
207219
- [x] subdf3.c
208220
- [x] subsf3.c
209221
- [x] truncdfsf2.c
@@ -236,7 +248,8 @@ These builtins are needed to support 128-bit integers.
236248
- [x] udivti3.c
237249
- [x] umodti3.c
238250

239-
These builtins are needed to support `f16` and `f128`, which are in the process of being added to Rust.
251+
These builtins are needed to support `f16` and `f128`, which are in the process
252+
of being added to Rust.
240253

241254
- [x] addtf3.c
242255
- [x] comparetf2.c
@@ -253,29 +266,55 @@ These builtins are needed to support `f16` and `f128`, which are in the process
253266
- [x] fixunstfti.c
254267
- [ ] floatditf.c
255268
- [ ] floatsitf.c
269+
- [ ] floattitf.c
256270
- [ ] floatunditf.c
257271
- [ ] floatunsitf.c
272+
- [ ] floatuntitf.c
258273
- [x] multf3.c
259274
- [ ] powitf2.c
260-
- [ ] ppc/fixtfdi.c
261-
- [ ] ppc/fixunstfdi.c
262-
- [ ] ppc/floatditf.c
263-
- [ ] ppc/floatunditf.c
264275
- [x] subtf3.c
265276
- [x] truncdfhf2.c
266277
- [x] truncsfhf2.c
267278
- [x] trunctfdf2.c
268279
- [x] trunctfhf2.c
269280
- [x] trunctfsf2.c
270281

282+
283+
These builtins are used by the Hexagon DSP
284+
285+
- [ ] hexagon/common_entry_exit_abi1.S
286+
- [ ] hexagon/common_entry_exit_abi2.S
287+
- [ ] hexagon/common_entry_exit_legacy.S
288+
- [x] hexagon/dfaddsub.S~~
289+
- [x] hexagon/dfdiv.S~~
290+
- [x] hexagon/dffma.S~~
291+
- [x] hexagon/dfminmax.S~~
292+
- [x] hexagon/dfmul.S~~
293+
- [x] hexagon/dfsqrt.S~~
294+
- [x] hexagon/divdi3.S~~
295+
- [x] hexagon/divsi3.S~~
296+
- [x] hexagon/fastmath2_dlib_asm.S~~
297+
- [x] hexagon/fastmath2_ldlib_asm.S~~
298+
- [x] hexagon/fastmath_dlib_asm.S~~
299+
- [x] hexagon/memcpy_forward_vp4cp4n2.S~~
300+
- [x] hexagon/memcpy_likely_aligned.S~~
301+
- [x] hexagon/moddi3.S~~
302+
- [x] hexagon/modsi3.S~~
303+
- [x] hexagon/sfdiv_opt.S~~
304+
- [x] hexagon/sfsqrt_opt.S~~
305+
- [x] hexagon/udivdi3.S~~
306+
- [x] hexagon/udivmoddi4.S~~
307+
- [x] hexagon/udivmodsi4.S~~
308+
- [x] hexagon/udivsi3.S~~
309+
- [x] hexagon/umoddi3.S~~
310+
- [x] hexagon/umodsi3.S~~
311+
271312
## Unimplemented functions
272313

273-
These builtins involve floating-point types ("`f80`" and complex numbers) that are not supported by Rust.
314+
These builtins are for x87 `f80` floating-point numbers that are not supported
315+
by Rust.
274316

275-
- ~~divdc3.c~~
276-
- ~~divsc3.c~~
277-
- ~~divtc3.c~~
278-
- ~~divxc3.c~~
317+
- ~~extendxftf2.c~~
279318
- ~~fixunsxfdi.c~~
280319
- ~~fixunsxfsi.c~~
281320
- ~~fixunsxfti.c~~
@@ -287,19 +326,45 @@ These builtins involve floating-point types ("`f80`" and complex numbers) that a
287326
- ~~floatuntixf.c~~
288327
- ~~i386/floatdixf.S~~
289328
- ~~i386/floatundixf.S~~
290-
- ~~muldc3.c~~
291-
- ~~mulsc3.c~~
292-
- ~~multc3.c~~
293-
- ~~mulxc3.c~~
294-
- ~~powixf2.c~~
329+
- ~~x86_64/floatdixf.c~~
330+
- ~~x86_64/floatundixf.S~~
331+
332+
These builtins are for IBM "extended double" non-IEEE 128-bit floating-point
333+
numbers.
334+
295335
- ~~ppc/divtc3.c~~
336+
- ~~ppc/fixtfdi.c~~
337+
- ~~ppc/fixtfti.c~~
338+
- ~~ppc/fixunstfdi.c~~
339+
- ~~ppc/fixunstfti.c~~
340+
- ~~ppc/floatditf.c~~
341+
- ~~ppc/floattitf.c~~
342+
- ~~ppc/floatunditf.c~~
296343
- ~~ppc/gcc_qadd.c~~
297344
- ~~ppc/gcc_qdiv.c~~
298345
- ~~ppc/gcc_qmul.c~~
299346
- ~~ppc/gcc_qsub.c~~
300347
- ~~ppc/multc3.c~~
301-
- ~~x86_64/floatdixf.c~~
302-
- ~~x86_64/floatundixf.S~~
348+
349+
These builtins are for 16-bit brain floating-point numbers that are not
350+
supported by Rust.
351+
352+
- ~~truncdfbf2.c~~
353+
- ~~truncsfbf2.c~~
354+
- ~~trunctfxf2.c~~
355+
356+
These builtins involve complex floating-point types that are not supported by
357+
Rust.
358+
359+
- ~~divdc3.c~~
360+
- ~~divsc3.c~~
361+
- ~~divtc3.c~~
362+
- ~~divxc3.c~~
363+
- ~~muldc3.c~~
364+
- ~~mulsc3.c~~
365+
- ~~multc3.c~~
366+
- ~~mulxc3.c~~
367+
- ~~powixf2.c~~
303368

304369
These builtins are never called by LLVM.
305370

@@ -333,6 +398,7 @@ These builtins are never called by LLVM.
333398
- ~~ctzdi2.c~~
334399
- ~~ctzsi2.c~~
335400
- ~~ctzti2.c~~
401+
- ~~ffssi2.c~~
336402
- ~~ffsdi2.c~~ - this is [called by gcc][jemalloc-fail] though!
337403
- ~~ffsti2.c~~
338404
- ~~mulvdi3.c~~
@@ -395,13 +461,34 @@ Rust only exposes atomic types on platforms that support them, and therefore doe
395461

396462
Miscellaneous functionality that is not used by Rust.
397463

464+
- ~~aarch64/fp_mode.c~~
465+
- ~~aarch64/lse.S~~ (LSE atomics)
466+
- ~~aarch64/sme-abi-init.c~~ (matrix extension)
467+
- ~~aarch64/sme-abi.S~~ (matrix extension)
468+
- ~~aarch64/sme-libc-routines.c~~ (matrix extension)
398469
- ~~apple_versioning.c~~
470+
- ~~arm/fp_mode.c~~
471+
- ~~avr/exit.S~~
399472
- ~~clear_cache.c~~
473+
- ~~cpu_model/aarch64.c~~
474+
- ~~cpu_model/x86.c~~
475+
- ~~crtbegin.c~~
476+
- ~~crtend.c~~
400477
- ~~emutls.c~~
401478
- ~~enable_execute_stack.c~~
402479
- ~~eprintf.c~~
480+
- ~~fp_mode.c~~ (float exception handling)
403481
- ~~gcc_personality_v0.c~~
482+
- ~~i386/fp_mode.c~~
483+
- ~~int_util.c~~
484+
- ~~loongarch/fp_mode.c~~
485+
- ~~os_version_check.c~~
486+
- ~~riscv/fp_mode.c~~
487+
- ~~riscv/restore.S~~ (callee-saved registers)
488+
- ~~riscv/save.S~~ (callee-saved registers)
404489
- ~~trampoline_setup.c~~
490+
- ~~ve/grow_stack.S~~
491+
- ~~ve/grow_stack_align.S~~
405492

406493
Floating-point implementations of builtins that are only called from soft-float code. It would be better to simply use the generic soft-float versions in this case.
407494

0 commit comments

Comments
 (0)