| ... | @@ -2889,10 +2889,9 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type { | ... | @@ -2889,10 +2889,9 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type { |
| 2889 | const src_mcv = try self.limitImmediateType(bin_op.rhs, i32); | 2889 | const src_mcv = try self.limitImmediateType(bin_op.rhs, i32); |
| 2890 | | 2890 | |
| 2891 | try self.genX8664BinMathCode(Type.initTag(.bool), dst_mcv, src_mcv, 7, 0x38); | 2891 | try self.genX8664BinMathCode(Type.initTag(.bool), dst_mcv, src_mcv, 7, 0x38); |
| 2892 | const info = ty.intInfo(self.target.*); | 2892 | break :result switch (ty.isSignedInt()) { |
| 2893 | break :result switch (info.signedness) { | 2893 | true => MCValue{ .compare_flags_signed = op }, |
| 2894 | .signed => MCValue{ .compare_flags_signed = op }, | 2894 | false => MCValue{ .compare_flags_unsigned = op }, |
| 2895 | .unsigned => MCValue{ .compare_flags_unsigned = op }, | | |
| 2896 | }; | 2895 | }; |
| 2897 | }, | 2896 | }, |
| 2898 | .arm, .armeb => result: { | 2897 | .arm, .armeb => result: { |
| ... | @@ -2934,10 +2933,9 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type { | ... | @@ -2934,10 +2933,9 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type { |
| 2934 | // The destination register is not present in the cmp instruction | 2933 | // The destination register is not present in the cmp instruction |
| 2935 | try self.genArmBinOpCode(undefined, lhs_mcv, rhs_mcv, false, .cmp_eq); | 2934 | try self.genArmBinOpCode(undefined, lhs_mcv, rhs_mcv, false, .cmp_eq); |
| 2936 | | 2935 | |
| 2937 | const info = ty.intInfo(self.target.*); | 2936 | break :result switch (ty.isSignedInt()) { |
| 2938 | break :result switch (info.signedness) { | 2937 | true => MCValue{ .compare_flags_signed = op }, |
| 2939 | .signed => MCValue{ .compare_flags_signed = op }, | 2938 | false => MCValue{ .compare_flags_unsigned = op }, |
| 2940 | .unsigned => MCValue{ .compare_flags_unsigned = op }, | | |
| 2941 | }; | 2939 | }; |
| 2942 | }, | 2940 | }, |
| 2943 | else => return self.fail("TODO implement cmp for {}", .{self.target.cpu.arch}), | 2941 | else => return self.fail("TODO implement cmp for {}", .{self.target.cpu.arch}), |