radare2/test/db/anal/x86_16
pancake 2434c3ca74
Switch to Capstone5 as default ##asm (#18127)
* Add riscv for capstone5 in the meson
* Report capstone version in the asm plugins
* Many changes in the ppc analysis, seems like it's improved, (emulation quality and xrefs)
* Update all tests and report issues in capstone4 to upstream
* Fix-x86-16 test marked as broken as it needs better fix
2021-04-24 22:04:51 +02:00

122 lines
1.6 KiB
Plaintext

NAME=arj x86 16 bits
FILE=malloc://0x100
CMDS=<<EOF
e asm.arch = x86
e anal.arch = x86
e asm.bits=16
arj
EOF
EXPECT=<<EOF
{"ip":0,"ax":0,"bx":0,"cx":0,"dx":0,"sp":0,"bp":0,"si":0,"di":0,"flags":0}
EOF
RUN
NAME=lcall offset (#12284)
FILE=-
CMDS=<<EOF
e asm.arch=x86
e asm.bits=16
wx 9a34002001
?v $j
EOF
EXPECT=<<EOF
0x1234
EOF
RUN
NAME=ljmp offset (#12284)
FILE=-
CMDS=<<EOF
e asm.arch=x86
e asm.bits=16
wx ea34002001
?v $j
EOF
EXPECT=<<EOF
0x1234
EOF1
RUN
NAME=aoj pushf
FILE=-
CMDS=<<EOF
e asm.arch=x86
e asm.bits=16
wx 9c
aoj~{}
EOF
EXPECT=<<EOF
[
{
"opcode": "pushf",
"disasm": "pushf",
"pseudo": "pushf ",
"description": "push flags register onto the stack",
"mnemonic": "pushf",
"mask": "ff",
"esil": "2,sp,-=,eflags,sp,=[2]",
"sign": false,
"prefix": 0,
"id": 612,
"opex": {
"operands": [
{
"size": 2,
"rw": 1,
"type": "reg",
"value": "flags"
}
]
},
"addr": 0,
"bytes": "9c",
"size": 1,
"type": "upush",
"esilcost": 0,
"scale": 0,
"refptr": 0,
"cycles": 2,
"failcycles": 0,
"delay": 0,
"stack": "inc",
"stackptr": 2,
"family": "cpu"
}
]
EOF
RUN
NAME=16bit segment bounds - capstone
FILE=malloc://1024k
CMDS=<<EOF
e asm.arch=x86
e anal.arch=x86
e asm.bits=16
e anal.hasnext=0
wx e9c300 @ f000:ffaa
s f000:ffaa
pi 1
EOF
EXPECT=<<EOF
jmp 0xf0070
EOF
BROKEN=1
RUN
NAME=16bit segment bounds 2
FILE=malloc://1024k
CMDS=<<EOF
e asm.arch=x86
e asm.bits=16
e io.va=1
wx e97ae7 @ f000:1911
s f000:1911
ao 1~jump
EOF
EXPECT=<<EOF
description: jump
jump: 0x000f008e
EOF
RUN