diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2025-06-18 10:59:09 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-07-22 19:43:47 -0700 |
| commit | 5060ab99c94dd8afc8b84e74fe4d050c88cdfc0a (patch) | |
| tree | cbf778a4b590aee34366bb5fc00091d5d60c2d72 /src/InternPool.zig | |
| parent | a023b9b22b6593ebd5a86736a4a9955840d1bfa1 (diff) | |
| download | zig-5060ab99c94dd8afc8b84e74fe4d050c88cdfc0a.tar.gz zig-5060ab99c94dd8afc8b84e74fe4d050c88cdfc0a.zip | |
aarch64: add new from scratch self-hosted backend
Diffstat (limited to 'src/InternPool.zig')
| -rw-r--r-- | src/InternPool.zig | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/InternPool.zig b/src/InternPool.zig index c9036da45b..15d895aed0 100644 --- a/src/InternPool.zig +++ b/src/InternPool.zig @@ -7556,12 +7556,18 @@ fn extraFuncCoerced(ip: *const InternPool, extra: Local.Extra, extra_index: u32) fn indexToKeyBigInt(ip: *const InternPool, tid: Zcu.PerThread.Id, limb_index: u32, positive: bool) Key { const limbs_items = ip.getLocalShared(tid).getLimbs().view().items(.@"0"); const int: Int = @bitCast(limbs_items[limb_index..][0..Int.limbs_items_len].*); + const big_int: BigIntConst = .{ + .limbs = limbs_items[limb_index + Int.limbs_items_len ..][0..int.limbs_len], + .positive = positive, + }; return .{ .int = .{ .ty = int.ty, - .storage = .{ .big_int = .{ - .limbs = limbs_items[limb_index + Int.limbs_items_len ..][0..int.limbs_len], - .positive = positive, - } }, + .storage = if (big_int.toInt(u64)) |x| + .{ .u64 = x } + else |_| if (big_int.toInt(i64)) |x| + .{ .i64 = x } + else |_| + .{ .big_int = big_int }, } }; } |
