mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-10-10 00:25:06 -04:00
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>
26 lines
307 B
NASM
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
|