nasm/test/fred.asm
H. Peter Anvin dd52f386b9 x86: implement FRED: ERETS, ERETU, LKGS
Kind of embarrassing... I had not implemented the FRED instruction,
despite personally being one of the architects of FRED ;)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2023-12-14 17:04:49 -08:00

35 lines
292 B
NASM

bits 64
default rel
section .text
erets:
erets
eretu:
eretu
%macro lgs 1
mov gs,%1
lkgs %1
%endmacro
lkgs:
lgs [foo]
lgs ax
lgs word [foo]
lgs eax
%ifdef ERROR
lgs dword [foo]
%endif
lgs rax
%ifdef ERROR
lgs qword [foo]
%endif
align 8
section .data
alignb 8
foo:
dq 0