authorgravatar for noam@pixelhero.devNoam Preil <noam@pixelhero.dev> 2020-08-21 18:25:46-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-08-22 12:45:29-07:00
log24efbf5ddfd7037eb5e0ec32fe73e10631add788
tree078a7457b9ad71b261f08cc3eab074a00cba8aa8
parentad9df43e4926247cff20a9d9851fffb2a99c8a30

Codegen: Move REX assert to comptime


1 files changed, 1 insertions(+), 1 deletions(-)

src-self-hosted/codegen.zig+1-1
...@@ -1776,7 +1776,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type {...@@ -1776,7 +1776,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type {
1776 /// X => extension to the SIB.index field1776 /// X => extension to the SIB.index field
1777 /// B => extension to the MODRM.rm field or the SIB.base field1777 /// B => extension to the MODRM.rm field or the SIB.base field
1778 fn rex(self: *Self, arg: struct { b: bool = false, w: bool = false, x: bool = false, r: bool = false }) void {1778 fn rex(self: *Self, arg: struct { b: bool = false, w: bool = false, x: bool = false, r: bool = false }) void {
1779 std.debug.assert(arch == .x86_64);1779 comptime assert(arch == .x86_64);
1780 // From section 2.2.1.2 of the manual, REX is encoded as b0100WRXB.1780 // From section 2.2.1.2 of the manual, REX is encoded as b0100WRXB.
1781 var value: u8 = 0x40;1781 var value: u8 = 0x40;
1782 if (arg.b) {1782 if (arg.b) {