nasm/test/pushimm.asm
H. Peter Anvin (Intel) c2344472c2 test: add a test for pushing immediates. Add a common header file.
- Add a test for pushing immediates and popping registers of various
  sizes.
- Add a common header file which probably will be useful for many
  tests.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2026-03-02 12:50:49 -08:00

29 lines
441 B
NASM

%include "test.inc"
push ax
push 0x1234
push word 0x1234
push byte -1
push word -1
o16 push 0x1234
o16 push -1
o16 push word 0x1234
o16 push 0x1234
pop ax
_dq push 0x12345678
_wd push eax
_wd push dword 0x12345678
_wd push dword -1
_wd o32 push 0x12345678
_wd o32 push -1
_wd o32 push dword 0x12345678
_wd o32 push dword -1
_wd pop eax
_q push rax
;_q push dword 0x12345678
_q push qword 0x12345678
_q push qword -1
_q pop rax