mirror of
https://github.com/rizinorg/rizin
synced 2026-08-22 20:26:16 -04:00
* Port ae command to RzShell * Port aepc to RzShell. * Port aek commands to RzShell * Fix help of ported ae commands * Port aeb to RzShell * Port aex command to RzShell * Remove ae* command. It was marked as not working and had no direct advantage. With the transition to RzIL it becomes obsolete. * Port aef commands to RzShell * Port ae?? command to aeH * Fix off by one error * Port ael commands to RzShell. * Port aea command to RzShell. * Highlight ESIL is used for emulation in ae commands. * Make ae parameter mandatory * Remove a* It executed not existing commands * Remove legacy ae command handler. * Fix ae tests by putting expressions in strings. They contain special/illegal argument characters for the RzShell. * Fix parameter order of aea command. For the most common case people just pass a number. Hence, it must be the first argument. * Run yamllint
158 lines
2.5 KiB
Text
158 lines
2.5 KiB
Text
NAME=64bit Integer comparison [-1 == 1 (op1 < op2)]
|
|
FILE==
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
ae "1,-1,==,63,$o,of,:=,63,$s,sf,:=,64,$b,cf,:=,$z,zf,:="
|
|
ar cf
|
|
ar sf
|
|
ar of
|
|
ar zf
|
|
EOF
|
|
EXPECT=<<EOF
|
|
cf = 0x0
|
|
sf = 0x1
|
|
of = 0x0
|
|
zf = 0x0
|
|
EOF
|
|
RUN
|
|
|
|
NAME=64bit Integer comparison [1 == -1 (op1 > op2)]
|
|
FILE==
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
ae "-1,1,==,63,$o,of,:=,63,$s,sf,:=,64,$b,cf,:=,$z,zf,:="
|
|
ar cf
|
|
ar sf
|
|
ar of
|
|
ar zf
|
|
EOF
|
|
EXPECT=<<EOF
|
|
cf = 0x1
|
|
sf = 0x0
|
|
of = 0x0
|
|
zf = 0x0
|
|
EOF
|
|
RUN
|
|
|
|
NAME=32bit Integer addition with overflow [0x80000000 + 0x80000000]
|
|
FILE==
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
ae "0x80000000,eax,:=,0x80000000,ebx,:=,eax,ebx,+=,31,$o,of,:=,31,$s,sf,:=,31,$c,cf,:=,$z,zf,:="
|
|
ar cf
|
|
ar sf
|
|
ar of
|
|
ar zf
|
|
EOF
|
|
EXPECT=<<EOF
|
|
cf = 0x1
|
|
sf = 0x0
|
|
of = 0x1
|
|
zf = 0x1
|
|
EOF
|
|
RUN
|
|
|
|
NAME=32bit Integer Addition [0x90000000 + 0x70000000]
|
|
FILE==
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
ae "0x70000000,eax,:=,0x90000000,ebx,:=,eax,ebx,+=,31,$o,of,:=,31,$s,sf,:=,31,$c,cf,:=,$z,zf,:="
|
|
ar cf
|
|
ar sf
|
|
ar of
|
|
ar zf
|
|
EOF
|
|
EXPECT=<<EOF
|
|
cf = 0x1
|
|
sf = 0x0
|
|
of = 0x0
|
|
zf = 0x1
|
|
EOF
|
|
RUN
|
|
|
|
NAME=32bit Integer Addition [0x70000000 + 0x90000000]
|
|
FILE==
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
ae "0x90000000,eax,:=,0x70000000,ebx,:=,eax,ebx,+=,31,$o,of,:=,31,$s,sf,:=,31,$c,cf,:=,$z,zf,:="
|
|
ar cf
|
|
ar sf
|
|
ar of
|
|
ar zf
|
|
EOF
|
|
EXPECT=<<EOF
|
|
cf = 0x1
|
|
sf = 0x0
|
|
of = 0x0
|
|
zf = 0x1
|
|
EOF
|
|
RUN
|
|
|
|
NAME=signed compare check. a > b [2 > 1]
|
|
FILE==
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
ae "2,eax,=,1,ebx,=,ebx,eax,>,31,$o,of,:=,31,$s,sf,:=,31,$c,cf,:=,$z,zf,:=,sf,of,^,zf,|,!,==,$z,NUM"
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x1
|
|
EOF
|
|
RUN
|
|
|
|
NAME=signed compare check. a < b [2 < 1]
|
|
FILE==
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
ae "2,eax,:=,1,ebx,:=,ebx,eax,==,ebx,eax,<,31,$o,of,:=,31,$s,sf,:=,31,$c,cf,:=,$z,zf,:=,sf,of,!=,==,$z,NUM"
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x1
|
|
EOF
|
|
RUN
|
|
|
|
NAME=unsigned compare check. a < b [-1 < 1]
|
|
FILE==
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
ae "-1,eax,:=,1,ebx,:=,ebx,eax,==,ebx,eax,<,31,$o,of,:=,31,$s,sf,:=,31,$c,cf,:=,$z,zf,:=,cf,zf,|,!,==,$z,NUM"
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x0
|
|
EOF
|
|
RUN
|
|
|
|
NAME=unsigned compare check. a > b [-1 > 1]
|
|
FILE==
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
ae "-1,eax,=,1,ebx,=,ebx,eax,>,31,$o,of,:=,31,$s,sf,:=,31,$c,cf,:=,$z,zf,:=,cf,==,$z,NUM"
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x0
|
|
EOF
|
|
RUN
|
|
|
|
NAME=signed division traps
|
|
FILE==
|
|
CMDS=<<EOF
|
|
ae "32,0,/"
|
|
ae "0,32,/"
|
|
ae "-1,0x8000000000000000,~/"
|
|
ae "-1,0x8000000000000000,~%"
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x0
|
|
ESIL TRAP type 3 code 0x00000000 divbyzero
|
|
ESIL TRAP type 3 code 0x00000000 divbyzero
|
|
ESIL TRAP type 3 code 0x00000000 divbyzero
|
|
EOF
|
|
RUN
|