| author | |
| committer | |
| log | b8553b4813e971e50dcae7b8181e5f6771f3dbff |
| tree | 20c5461768194b80bf9a6b80faef8930c8803ddb |
| parent | 51f8c306d9fa32c849b26c2d95a45901a02f448e |
3 files changed, 3 insertions(+), 3 deletions(-)
lib/std/special/compiler_rt/clzsi2_test.zig+1-1| ... | @@ -4,7 +4,7 @@ const testing = @import("std").testing; | ... | @@ -4,7 +4,7 @@ const testing = @import("std").testing; |
| 4 | fn test__clzsi2(a: u32, expected: i32) void { | 4 | fn test__clzsi2(a: u32, expected: i32) void { |
| 5 | var nakedClzsi2 = clzsi2.__clzsi2; | 5 | var nakedClzsi2 = clzsi2.__clzsi2; |
| 6 | var actualClzsi2 = @ptrCast(fn (a: i32) callconv(.C) i32, nakedClzsi2); | 6 | var actualClzsi2 = @ptrCast(fn (a: i32) callconv(.C) i32, nakedClzsi2); |
| 7 | var x = @intCast(i32, a); | 7 | var x = @bitCast(i32, a); |
| 8 | var result = actualClzsi2(x); | 8 | var result = actualClzsi2(x); |
| 9 | testing.expectEqual(expected, result); | 9 | testing.expectEqual(expected, result); |
| 10 | } | 10 | } |
lib/std/special/compiler_rt/int.zig+1-1| ... | @@ -244,7 +244,7 @@ pub fn __udivsi3(n: u32, d: u32) callconv(.C) u32 { | ... | @@ -244,7 +244,7 @@ pub fn __udivsi3(n: u32, d: u32) callconv(.C) u32 { |
| 244 | // r.all -= d.all; | 244 | // r.all -= d.all; |
| 245 | // carry = 1; | 245 | // carry = 1; |
| 246 | // } | 246 | // } |
| 247 | const s = @intCast(i32, d -% r -% 1) >> @intCast(u5, n_uword_bits - 1); | 247 | const s = @bitCast(i32, d -% r -% 1) >> @intCast(u5, n_uword_bits - 1); |
| 248 | carry = @intCast(u32, s & 1); | 248 | carry = @intCast(u32, s & 1); |
| 249 | r -= d & @bitCast(u32, s); | 249 | r -= d & @bitCast(u32, s); |
| 250 | } | 250 | } |
lib/std/special/compiler_rt/udivmod.zig+1-1| ... | @@ -184,7 +184,7 @@ pub fn udivmod(comptime DoubleInt: type, a: DoubleInt, b: DoubleInt, maybe_rem: | ... | @@ -184,7 +184,7 @@ pub fn udivmod(comptime DoubleInt: type, a: DoubleInt, b: DoubleInt, maybe_rem: |
| 184 | // carry = 1; | 184 | // carry = 1; |
| 185 | // } | 185 | // } |
| 186 | r_all = @ptrCast(*align(@alignOf(SingleInt)) DoubleInt, &r[0]).*; // TODO issue #421 | 186 | r_all = @ptrCast(*align(@alignOf(SingleInt)) DoubleInt, &r[0]).*; // TODO issue #421 |
| 187 | const s: SignedDoubleInt = @intCast(SignedDoubleInt, b -% r_all -% 1) >> (DoubleInt.bit_count - 1); | 187 | const s: SignedDoubleInt = @bitCast(SignedDoubleInt, b -% r_all -% 1) >> (DoubleInt.bit_count - 1); |
| 188 | carry = @intCast(u32, s & 1); | 188 | carry = @intCast(u32, s & 1); |
| 189 | r_all -= b & @bitCast(DoubleInt, s); | 189 | r_all -= b & @bitCast(DoubleInt, s); |
| 190 | r = @ptrCast(*[2]SingleInt, &r_all).*; // TODO issue #421 | 190 | r = @ptrCast(*[2]SingleInt, &r_all).*; // TODO issue #421 |