-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
compiler_rt: Tracking Issue Integer Routines #15675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Exposing pdep and pext is another idea, but YAGNI. |
__multi3 is missing on MSVC and it is referenced by zig_mul_i128, so while clang-cl can compile but we can't do so on MSVC instead we have: _mul128 | Microsoft Learn |
See lib/compiler_rt/mulXi3.zig:17: comptime {
@export(__mulsi3, .{ .name = "__mulsi3", .linkage = common.linkage, .visibility = common.visibility });
if (common.want_aeabi) {
@export(__aeabi_lmul, .{ .name = "__aeabi_lmul", .linkage = common.linkage, .visibility = common.visibility });
} else {
@export(__muldi3, .{ .name = "__muldi3", .linkage = common.linkage, .visibility = common.visibility });
}
if (common.want_windows_v2u64_abi) {
@export(__multi3_windows_x86_64, .{ .name = "__multi3", .linkage = common.linkage, .visibility = common.visibility });
} else {
@export(__multi3, .{ .name = "__multi3", .linkage = common.linkage, .visibility = common.visibility });
}
} We want to keep bootstrapping code as simple as reasonable, but we need the compiler_rt things for LLVM, so it makes no sense to conditionally use the Windows stuff. Or can you show significant performance differences for bootstrapping justifying additional complexity? |
For context, I was experimenting with compiling to C with |
Not sure what you mean by |
I'm not seeing the value in this tracking issue. |
Uh oh!
There was an error while loading. Please reload this page.
(a<b) -> 0, (a==b) -> 1, (a>b) -> 2
(a<b) -> 0, (a==b) -> 1, (a>b) -> 2
a << b
[^unused_rl78]a >> b
arithmetic (sign fill) [^unused_rl78]a >> b
logical (zero fill) [^unused_rl78]-a
[^libgcc_compat]a * b
a / b
a / b
a % b
a % b
a / b, rem.* = a % b
a / b, rem.* = a % b
-a
[^libgcc_compat]a + b
a - b
a * b
a + b
, overflow->ov.*=1 else 0 [^perf_addition]a - b
, overflow->ov.*=1 else 0 [^perf_addition]a * b
, overflow->ov.*=1 else 0Missing piece:
TODO:
Documentation is maintained in https://github.com/matu3ba/matu3ba.github.io/tree/master/crt until review or I have a better place for it to reduce maintenance churn.
The text was updated successfully, but these errors were encountered: