mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-24 13:49:50 +00:00
136 lines
3.3 KiB
Plaintext
136 lines
3.3 KiB
Plaintext
NAME=binopeq(+=)
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
0000.00: ADD R_ebx:32 , R_eax:32 , V_00:32
|
|
0000.01: STR R_ebx:32 , , V_01:32
|
|
0000.02: STR V_00:32 , , R_ebx:32
|
|
EOF
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e anal.arch=x86
|
|
e asm.bits=32
|
|
"aetr eax,ebx,+="
|
|
EOF
|
|
RUN
|
|
|
|
NAME=binop(+)
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
0000.00: ADD R_ebx:32 , R_eax:32 , V_00:32
|
|
V_00:32
|
|
EOF
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e anal.arch=x86
|
|
e asm.bits=32
|
|
"aetr eax,ebx,+"
|
|
EOF
|
|
RUN
|
|
|
|
NAME=cmp(==)
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
0000.00: EQ R_ebx:32 , R_eax:32 , V_00:01
|
|
V_00:1
|
|
EOF
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e anal.arch=x86
|
|
e asm.bits=32
|
|
"aetr eax,ebx,=="
|
|
EOF
|
|
RUN
|
|
|
|
NAME=smaller_or_eq(<=)
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
0000.00: LT R_ebx:32 , R_eax:32 , V_00:01
|
|
0000.01: EQ R_ebx:32 , R_eax:32 , V_01:01
|
|
0000.02: OR V_01:01 , V_00:01 , V_02:01
|
|
V_02:1
|
|
EOF
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e anal.arch=x86
|
|
e asm.bits=32
|
|
"aetr eax,ebx,<="
|
|
EOF
|
|
RUN
|
|
|
|
NAME=not_eq(!=)
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
0000.00: EQ R_ebx:32 , 0x0:32 , V_00:01
|
|
0000.01: STR R_ebx:32 , , V_01:32
|
|
0000.02: OR V_00:01 , 0:32 , V_02:32
|
|
0000.03: STR V_02:32 , , R_ebx:32
|
|
EOF
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e anal.arch=x86
|
|
e asm.bits=32
|
|
"aetr ebx,!="
|
|
EOF
|
|
RUN
|
|
|
|
NAME=conditional(?{)
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
0000.00: JCC R_zf:01 , , 0x2:32
|
|
0001.00: STR R_eip:32 , , V_00:32
|
|
0001.01: JCC 1:01 , , 0x800:32
|
|
EOF
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e anal.arch=x86
|
|
e asm.bits=32
|
|
"aetr zf,?{,0x800,eip,=,}"
|
|
EOF
|
|
RUN
|
|
|
|
NAME=mem_bineq
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
0000.00: LDM R_eax:32 , , V_00:32
|
|
0000.01: OR V_00:32 , 0:16 , V_02:16
|
|
0000.02: OR 0xff:32 , V_02:16 , V_03:32
|
|
0000.03: LDM R_eax:32 , , V_04:32
|
|
0000.04: STM V_03:32 , , R_eax:32
|
|
EOF
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e anal.arch=x86
|
|
e asm.bits=32
|
|
"aetr 0xff,eax,|=[2]"
|
|
EOF
|
|
RUN
|
|
|
|
NAME=flags
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
0000.00: ADD rip , 0x2147a8:32 , V_00:32
|
|
0001.00: LDM V_00:32 , , V_01:32
|
|
0001.01: OR V_01:32 , 0:64 , V_03:64
|
|
0002.00: EQ V_03:64 , 0:32 , V_04:01
|
|
0003.00: STR R_zf:01 , , V_05:01
|
|
0003.01: OR $z , 0:01 , V_06:01
|
|
0003.02: STR V_06:01 , , R_zf:01
|
|
0004.00: STR R_cf:01 , , V_07:01
|
|
0004.01: OR $b64 , 0:01 , V_08:01
|
|
0004.02: STR V_08:01 , , R_cf:01
|
|
0005.00: STR R_pf:01 , , V_09:01
|
|
0005.01: OR $p , 0:01 , V_10:01
|
|
0005.02: STR V_10:01 , , R_pf:01
|
|
0006.00: STR R_sf:01 , , V_11:01
|
|
0006.01: OR $s , 0:01 , V_12:01
|
|
0006.02: STR V_12:01 , , R_sf:01
|
|
V_04:1
|
|
EOF
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e anal.arch=x86
|
|
e asm.bits=32
|
|
aetr 0,0x2147a8,rip,+,[8],==,$z,zf,=,$b64,cf,=,$p,pf,=,$s,sf,=
|
|
EOF
|
|
RUN
|