mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
compiler-rt: remove dead code
`__addosi4`, `__addodi4`, `__addoti4`, `__subosi4`, `__subodi4`, and `__suboti4` were all functions which we invented for no apparent reason. Neither LLVM, nor GCC, nor the Zig compiler use these functions. It appears the functions were created in a kind of misunderstanding of an old language proposal; see https://github.com/ziglang/zig/pull/10824. There is no benefit to these functions existing; if a Zig compiler backend needs this operation, it is trivial to implement, and *far* simpler than calling a compiler-rt routine. Therefore, this commit deletes them. A small amount of that code was used by other parts of compiler-rt; the logic is trivial so has just been inlined where needed. I also chose to quickly implement `__addvdi3` (a standard function) because it is trivial and we already implement the `sub` parallel.
This commit is contained in:
+1
-2
@@ -211,10 +211,10 @@ set(ZIG_STAGE2_SOURCES
|
||||
lib/compiler_rt/absvti2.zig
|
||||
lib/compiler_rt/adddf3.zig
|
||||
lib/compiler_rt/addf3.zig
|
||||
lib/compiler_rt/addo.zig
|
||||
lib/compiler_rt/addsf3.zig
|
||||
lib/compiler_rt/addtf3.zig
|
||||
lib/compiler_rt/addvsi3.zig
|
||||
lib/compiler_rt/addvdi3.zig
|
||||
lib/compiler_rt/addxf3.zig
|
||||
lib/compiler_rt/arm.zig
|
||||
lib/compiler_rt/atomics.zig
|
||||
@@ -354,7 +354,6 @@ set(ZIG_STAGE2_SOURCES
|
||||
lib/compiler_rt/sqrt.zig
|
||||
lib/compiler_rt/stack_probe.zig
|
||||
lib/compiler_rt/subdf3.zig
|
||||
lib/compiler_rt/subo.zig
|
||||
lib/compiler_rt/subsf3.zig
|
||||
lib/compiler_rt/subtf3.zig
|
||||
lib/compiler_rt/subvdi3.zig
|
||||
|
||||
Reference in New Issue
Block a user