0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00
Files
nasm/test/gdtidt.asm
H. Peter Anvin e72a54174c insns.dat: correct the [LD][GI]DT patterns
It is somewhat counterintuitive, but the correct flag for the memory
operand is "OSIZE". The "nw" flag takes care of promoting the default
operand size on 64 bits to 64.

Fixes: https://github.com/netwide-assembler/nasm/issues/130
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-10-07 09:58:54 -07:00

26 lines
307 B
NASM

default rel
%use ifunc
%define BREG %selbits(bx,ebx,rbx)
%define OREG %selbits(ebx,bx,ebx) ; Force a 67 prefix
lea BREG,lbl
lgdt [BREG]
sgdt [BREG]
lidt [BREG]
sidt [BREG]
lgdt [OREG]
sgdt [OREG]
lidt [OREG]
sidt [OREG]
lgdt [lbl]
sgdt [lbl]
lidt [lbl]
sidt [lbl]
hlt
lbl:
times 10 nop