NAME=add 1 + 2
FILE=-
CMDS="ae 2,1,+"
EXPECT=<<EOF
0x3
EOF
RUN

NAME=add 2 + 1
FILE=-
CMDS="ae 1,2,+"
EXPECT=<<EOF
0x3
EOF
RUN

NAME=sub 2 - 3
FILE=-
CMDS="ae 3,2,-"
EXPECT=<<EOF
0xffffffffffffffff
EOF
RUN

NAME=sub 3 - 2
FILE=-
CMDS="ae 2,3,-"
EXPECT=<<EOF
0x1
EOF
RUN

NAME=sub 3 - 3
FILE=-
CMDS="ae 3,3,-"
EXPECT=<<EOF
0x0
EOF
RUN

NAME=mul 3 6502 8051 apple arm-16 arm-32 arm-64 brainfuck cmd_aae cmd_aea cmd_aetr cmd_aex cmd_pae cmp cond debug_esil esil flag_tests intreg math mips sh step step-back step-over syscall x86-32 x86-64 xtensa 2
FILE=-
CMDS="ae 2,3,*"
EXPECT=<<EOF
0x6
EOF
RUN

NAME=mul 2 6502 8051 apple arm-16 arm-32 arm-64 brainfuck cmd_aae cmd_aea cmd_aetr cmd_aex cmd_pae cmp cond debug_esil esil flag_tests intreg math mips sh step step-back step-over syscall x86-32 x86-64 xtensa 3
FILE=-
CMDS="ae 3,2,*"
EXPECT=<<EOF
0x6
EOF
RUN

NAME=div 6 / 3
FILE=-
CMDS="ae 3,6,/"
EXPECT=<<EOF
0x2
EOF
RUN

NAME=div 3 / 6
FILE=-
CMDS="ae 6,3,/"
EXPECT=<<EOF
0x0
EOF
RUN

NAME=div by zero 0 / 3
FILE=-
CMDS=<<EOF
ae 0,3,/
ae*
EOF
EXPECT=<<EOF
trap: 3
trap-code: 0
EOF
RUN

NAME=div by zero 3 / 0
FILE=-
CMDS=<<EOF
ae 3,0,/
ae*
EOF
EXPECT=<<EOF
0x0
trap: 0
trap-code: 0
EOF
RUN

NAME=float div 1.0 / 1.0
FILE=-
BROKEN=1
CMDS="ae Fx3ff0000000000000,Fx3ff0000000000000,/"
EXPECT=<<EOF
0x3ff0000000000000
EOF
RUN

NAME=float mul 1.0 6502 8051 apple arm-16 arm-32 arm-64 brainfuck cmd_aae cmd_aea cmd_aetr cmd_aex cmd_pae cmp cond debug_esil esil flag_tests intreg math mips sh step step-back step-over syscall x86-32 x86-64 xtensa 1.0
FILE=-
BROKEN=1
CMDS="ae Fx3ff0000000000000,Fx3ff0000000000000,*"
EXPECT=<<EOF
0x3ff0000000000000
EOF
RUN

NAME=float add 1.0 + 1.0
FILE=-
BROKEN=1
CMDS="ae Fx3ff0000000000000,Fx3ff0000000000000,+"
EXPECT=<<EOF
0x4000000000000000
EOF
RUN

NAME=float sub 1.0 - 1.0
FILE=-
BROKEN=1
CMDS="ae Fx3ff0000000000000,Fx3ff0000000000000,-"
EXPECT=<<EOF
0x0
EOF
RUN
