mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 21:08:36 +00:00
x64: fix binary not implementation
This commit is contained in:
parent
f6f98a621f
commit
3c69810fe6
@ -1154,7 +1154,8 @@ fn airNot(self: *Self, inst: Air.Inst.Index) !void {
|
||||
};
|
||||
defer if (dst_mcv_lock) |lock| self.register_manager.unlockReg(lock);
|
||||
|
||||
try self.genBinOpMir(.xor, operand_ty, dst_mcv, .{ .immediate = 1 });
|
||||
const mask = ~@as(u64, 0);
|
||||
try self.genBinOpMir(.xor, operand_ty, dst_mcv, .{ .immediate = mask });
|
||||
|
||||
break :result dst_mcv;
|
||||
};
|
||||
|
||||
@ -362,7 +362,6 @@ fn comptimeAdd(comptime a: comptime_int, comptime b: comptime_int) comptime_int
|
||||
|
||||
test "binary not" {
|
||||
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
|
||||
|
||||
try expect(comptime x: {
|
||||
break :x ~@as(u16, 0b1010101010101010) == 0b0101010101010101;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user