mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
Codegen: Move REX assert to comptime
This commit is contained in:
parent
ad9df43e49
commit
24efbf5ddf
@ -1776,7 +1776,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type {
|
||||
/// X => extension to the SIB.index field
|
||||
/// B => extension to the MODRM.rm field or the SIB.base field
|
||||
fn rex(self: *Self, arg: struct { b: bool = false, w: bool = false, x: bool = false, r: bool = false }) void {
|
||||
std.debug.assert(arch == .x86_64);
|
||||
comptime assert(arch == .x86_64);
|
||||
// From section 2.2.1.2 of the manual, REX is encoded as b0100WRXB.
|
||||
var value: u8 = 0x40;
|
||||
if (arg.b) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user