| ... | @@ -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 field | 1776 | /// X => extension to the SIB.index field |
| 1777 | /// B => extension to the MODRM.rm field or the SIB.base field | 1777 | /// 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) { |