From 310a44d5be051a339b5739d59416a70604375541 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Sun, 21 Mar 2021 17:19:08 +0100 Subject: zir: add negate/negate_wrap, implement astgen These were previously implemented as a sub/sub_wrap instruction with a lhs of 0. Making this separate instructions however allows us to save some memory as there is no need to store a lhs. --- src/Module.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Module.zig') diff --git a/src/Module.zig b/src/Module.zig index dcf57bb709..27d585054a 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -1462,6 +1462,8 @@ pub const WipZirCode = struct { .str, .sub, .subwrap, + .negate, + .negate_wrap, .typeof, .xor, .optional_type, -- cgit v1.2.3