0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-09-22 10:43:39 -04:00

Fix control/debug register patterns

The control and debug registers are always using the default operand
size. It is probably easiest to just encode it explicitly for now.

Control registers are particularly weird because of the AMD "lock as
REX.R" hack...

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin
2025-09-19 16:26:35 -07:00
parent b390ce4bb8
commit a0396faf3b
3 changed files with 14 additions and 9 deletions

View File

@@ -2343,7 +2343,7 @@ static inline void emit_rex(struct out_data *data, insn *ins)
} else if (rex & REX_P) {
buf[n++] = rex;
} else {
nasm_assert(!rex);
nasm_assert(!(rex & ~REX_L));
}
if (ins->vex_cm) {