NAME=ara swap
FILE=-
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
ara+
ar rax=33
ar rax
aras
ar rax
EOF
EXPECT=<<EOF
0x00000021
0x00000000
EOF
RUN

NAME=ara swap 2
FILE=-
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
ara+
ar rax=33
ar rax
aras
ar rax
aras
ar rax
EOF
EXPECT=<<EOF
0x00000021
0x00000000
0x00000021
EOF
RUN

NAME=ara push
FILE=-
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
ara~?
ara+
ara~?
EOF
EXPECT=<<EOF
16
24
EOF
RUN

NAME=ara pop
FILE=-
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
ara~?
ara+
ara~?
ara-
ara~?
ara-
ara~?
ara-
ara~?
EOF
EXPECT=<<EOF
16
24
16
8
8
EOF
RUN

NAME=arcc+tcc
FILE=-
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
afcl
e asm.arch=arm
e asm.bits=32
arcc
e asm.arch=x86
e asm.bits=64
arcc
tcc `arcc`
afcl
EOF
EXPECT=<<EOF
swift
amd64
amd64syscall
ms
reg
r0 reg(r0, r1, r2, r3)
rdi reg(rdi, rsi, rdx, rcx)
swift
amd64
amd64syscall
ms
reg
EOF
RUN
