The Official Radare2 Book | страница 99



   7. ROR ">>>"

   8. NEG "!"

At the moment of this writing, ESIL does not yet support FPU. But you can implement support for unsupported instructions using r2pipe. Eventually we will get proper support for multimedia and floating point.

ESIL specifies that the parsing control-flow commands must be uppercase. Bear in mind that some architectures have uppercase register names. The corresponding register profile should take care not to reuse any of the following:

3,SKIP - skip N instructions. used to make relative forward GOTOs

3,GOTO - goto instruction 3

LOOP - alias for 0,GOTO

BREAK - stop evaluating the expression

STACK - dump stack contents to screen

CLEAR - clear stack

rep cmpsb

cx,!,?{,BREAK,},esi,[1],edi,[1],==,?{,BREAK,},esi,++,edi,++,cx,--,0,GOTO

Those are expressed with the 'TODO' command. They act as a 'BREAK', but displays a warning message describing that an instruction is not implemented and will not be emulated. For example:

fmulp ST(1), ST(0) => TODO,fmulp ST(1),ST(0)

[0x1000010f8]> e asm.esil=true

[0x1000010f8]> pd $r @ entry0

0x1000010f8 55 8,rsp,-=,rbp,rsp,=[8]

0x1000010f9 4889e5 rsp,rbp,=

0x1000010fc 4883c768 104,rdi,+=

0x100001100 4883c668 104,rsi,+=

0x100001104 5d rsp,[8],rbp,=,8,rsp,+=

0x100001105 e950350000 0x465a,rip,= ;[1]

0x10000110a 55 8,rsp,-=,rbp,rsp,=[8]

0x10000110b 4889e5 rsp,rbp,=

0x10000110e 488d4668 rsi,104,+,rax,=

0x100001112 488d7768 rdi,104,+,rsi,=

0x100001116 4889c7 rax,rdi,=

0x100001119 5d rsp,[8],rbp,=,8,rsp,+=

0x10000111a e93b350000 0x465a,rip,= ;[1]

0x10000111f 55 8,rsp,-=,rbp,rsp,=[8]

0x100001120 4889e5 rsp,rbp,=

0x100001123 488b4f60 rdi,96,+,[8],rcx,=

0x100001127 4c8b4130 rcx,48,+,[8],r8,=

0x10000112b 488b5660 rsi,96,+,[8],rdx,=

0x10000112f b801000000 1,eax,=

0x100001134 4c394230 rdx,48,+,[8],r8,==,cz,?=

0x100001138 7f1a sf,of,!,^,zf,!,&,?{,0x1154,rip,=,} ;[2]

0x10000113a 7d07 of,!,sf,^,?{,0x1143,rip,} ;[3]

0x10000113c b8ffffffff 0xffffffff,eax,= ; 0xffffffff

0x100001141 eb11 0x1154,rip,= ;[2]

0x100001143 488b4938 rcx,56,+,[8],rcx,=

0x100001147 48394a38 rdx,56,+,[8],rcx,==,cz,?=