@@ -16,13 +16,13 @@ you can use this crate to get those intrinsics and solve the linker errors. To
16
16
do that, add this crate somewhere in the dependency graph of the crate you are
17
17
building:
18
18
19
- ``` toml
19
+ ``` toml
20
20
# Cargo.toml
21
21
[dependencies ]
22
22
compiler_builtins = { git = " https://github.com/rust-lang/compiler-builtins" }
23
23
```
24
24
25
- ``` rust
25
+ ``` rust
26
26
extern crate compiler_builtins;
27
27
28
28
// ...
@@ -91,7 +91,7 @@ obtained with the following:
91
91
``` sh
92
92
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
93
93
tar xzf rustc-llvm-18.0.tar.gz --strip-components 1 llvm-project-rustc-18.0-2024-02-13/compiler-rt
94
- ````
94
+ ```
95
95
96
96
Local targets may also be tested with ` ./ci/run.sh [target] ` .
97
97
@@ -100,9 +100,11 @@ rely on CI.
100
100
101
101
## Progress
102
102
103
+ - [x] aarch64/chkstk.S
103
104
- [x] adddf3.c
104
105
- [x] addsf3.c
105
106
- [x] arm/adddf3vfp.S
107
+ - [x] arm/addsf3.S
106
108
- [x] arm/addsf3vfp.S
107
109
- [x] arm/aeabi_dcmp.S
108
110
- [x] arm/aeabi_fcmp.S
@@ -113,6 +115,7 @@ rely on CI.
113
115
- [x] arm/aeabi_memset.S
114
116
- [x] arm/aeabi_uidivmod.S
115
117
- [x] arm/aeabi_uldivmod.S
118
+ - [ ] arm/chkstk.S
116
119
- [x] arm/divdf3vfp.S
117
120
- [ ] arm/divmodsi4.S (generic version is done)
118
121
- [x] arm/divsf3vfp.S
@@ -154,6 +157,12 @@ rely on CI.
154
157
- [ ] arm/unordsf2vfp.S
155
158
- [x] ashldi3.c
156
159
- [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
157
166
- [x] bswapdi2.c
158
167
- [x] bswapsi2.c
159
168
- [x] bswapti2.c
@@ -166,6 +175,7 @@ rely on CI.
166
175
- [x] divdi3.c
167
176
- [x] divmoddi4.c
168
177
- [x] divmodsi4.c
178
+ - [x] divmodti4.c
169
179
- [x] divsf3.c
170
180
- [x] divsi3.c
171
181
- [x] extendsfdf2.c
@@ -204,6 +214,8 @@ rely on CI.
204
214
- [x] mulsf3.c
205
215
- [x] powidf2.c
206
216
- [x] powisf2.c
217
+ - [ ] riscv/muldi3.S
218
+ - [ ] riscv/mulsi3.S
207
219
- [x] subdf3.c
208
220
- [x] subsf3.c
209
221
- [x] truncdfsf2.c
@@ -236,7 +248,8 @@ These builtins are needed to support 128-bit integers.
236
248
- [x] udivti3.c
237
249
- [x] umodti3.c
238
250
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.
240
253
241
254
- [x] addtf3.c
242
255
- [x] comparetf2.c
@@ -253,8 +266,10 @@ These builtins are needed to support `f16` and `f128`, which are in the process
253
266
- [x] fixunstfti.c
254
267
- [ ] floatditf.c
255
268
- [ ] floatsitf.c
269
+ - [ ] floattitf.c
256
270
- [ ] floatunditf.c
257
271
- [ ] floatunsitf.c
272
+ - [ ] floatuntitf.c
258
273
- [x] multf3.c
259
274
- [ ] powitf2.c
260
275
- [x] subtf3.c
@@ -264,11 +279,42 @@ These builtins are needed to support `f16` and `f128`, which are in the process
264
279
- [x] trunctfhf2.c
265
280
- [x] trunctfsf2.c
266
281
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
+
267
312
## Unimplemented functions
268
313
269
314
These builtins are for x87 ` f80 ` floating-point numbers that are not supported
270
315
by Rust.
271
316
317
+ - ~~ extendxftf2.c~~
272
318
- ~~ fixunsxfdi.c~~
273
319
- ~~ fixunsxfsi.c~~
274
320
- ~~ fixunsxfti.c~~
@@ -288,15 +334,25 @@ numbers.
288
334
289
335
- ~~ ppc/divtc3.c~~
290
336
- ~~ ppc/fixtfdi.c~~
337
+ - ~~ ppc/fixtfti.c~~
291
338
- ~~ ppc/fixunstfdi.c~~
339
+ - ~~ ppc/fixunstfti.c~~
292
340
- ~~ ppc/floatditf.c~~
341
+ - ~~ ppc/floattitf.c~~
293
342
- ~~ ppc/floatunditf.c~~
294
343
- ~~ ppc/gcc_qadd.c~~
295
344
- ~~ ppc/gcc_qdiv.c~~
296
345
- ~~ ppc/gcc_qmul.c~~
297
346
- ~~ ppc/gcc_qsub.c~~
298
347
- ~~ ppc/multc3.c~~
299
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
+
300
356
These builtins involve complex floating-point types that are not supported by
301
357
Rust.
302
358
@@ -342,6 +398,7 @@ These builtins are never called by LLVM.
342
398
- ~~ ctzdi2.c~~
343
399
- ~~ ctzsi2.c~~
344
400
- ~~ ctzti2.c~~
401
+ - ~~ ffssi2.c~~
345
402
- ~~ ffsdi2.c~~ - this is [ called by gcc] [ jemalloc-fail ] though!
346
403
- ~~ ffsti2.c~~
347
404
- ~~ mulvdi3.c~~
@@ -404,13 +461,34 @@ Rust only exposes atomic types on platforms that support them, and therefore doe
404
461
405
462
Miscellaneous functionality that is not used by Rust.
406
463
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)
407
469
- ~~ apple_versioning.c~~
470
+ - ~~ arm/fp_mode.c~~
471
+ - ~~ avr/exit.S~~
408
472
- ~~ clear_cache.c~~
473
+ - ~~ cpu_model/aarch64.c~~
474
+ - ~~ cpu_model/x86.c~~
475
+ - ~~ crtbegin.c~~
476
+ - ~~ crtend.c~~
409
477
- ~~ emutls.c~~
410
478
- ~~ enable_execute_stack.c~~
411
479
- ~~ eprintf.c~~
480
+ - ~~ fp_mode.c~~ (float exception handling)
412
481
- ~~ 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)
413
489
- ~~ trampoline_setup.c~~
490
+ - ~~ ve/grow_stack.S~~
491
+ - ~~ ve/grow_stack_align.S~~
414
492
415
493
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.
416
494
0 commit comments