| ... | ... | @@ -1051,11 +1051,12 @@ pub fn genTypedValue( |
| 1051 | 1051 | }, |
| 1052 | 1052 | .Int => { |
| 1053 | 1053 | const info = typed_value.ty.intInfo(target); |
| 1054 | | if (info.bits <= ptr_bits and info.signedness == .signed) { |
| 1055 | | return GenResult.mcv(.{ .immediate = @bitCast(u64, typed_value.val.toSignedInt(target)) }); |
| 1056 | | } |
| 1057 | | if (!(info.bits > ptr_bits or info.signedness == .signed)) { |
| 1058 | | return GenResult.mcv(.{ .immediate = typed_value.val.toUnsignedInt(target) }); |
| 1054 | if (info.bits <= ptr_bits) { |
| 1055 | const unsigned = switch (info.signedness) { |
| 1056 | .signed => @bitCast(u64, typed_value.val.toSignedInt(target)), |
| 1057 | .unsigned => typed_value.val.toUnsignedInt(target), |
| 1058 | }; |
| 1059 | return GenResult.mcv(.{ .immediate = unsigned }); |
| 1059 | 1060 | } |
| 1060 | 1061 | }, |
| 1061 | 1062 | .Bool => { |