formal-patch

This commit is contained in:
LuEklund 2026-02-24 15:51:05 +02:00 committed by Lorenzo Torres
parent b574d39a39
commit 002d26b6b7

View file

@ -896,7 +896,8 @@ const Jcc = enum(u8) {
};
fn emitRex(buf: *codebuf.CodeBuffer, w: bool, r: u1, x: u1, b: u1) void {
const rex: u8 = 0x40 | (if (w) 0x08 else 0) | (@as(u8, r) << 2) | (@as(u8, x) << 1) | @as(u8, b);
const rex_w: u8 = if (w) @as(u8, 0x08) else @as(u8, 0x00);
const rex: u8 = @as(u8, 0x40) | rex_w | (@as(u8, r) << 2) | (@as(u8, x) << 1) | @as(u8, b);
if (rex != 0x40) buf.emit1(rex);
}