From 72009055fcb44a0dadf317052de9567a34d30f88 Mon Sep 17 00:00:00 2001 From: billow Date: Sun, 2 Jul 2023 10:34:31 +0800 Subject: [PATCH] Update cs --- subprojects/capstone-next.wrap | 2 +- test/db/analysis/tricore | 637 +++++++++++++++++---------------- test/db/analysis/vars | 118 +++--- test/db/analysis/x86_64 | 4 + test/db/asm/x86_16 | 2 +- test/db/asm/x86_32 | 2 +- test/db/asm/x86_64 | 12 +- test/db/formats/mach0/imports | 1 + test/db/rzil/ppc32 | 1 + test/db/tools/rz | 1 + 10 files changed, 395 insertions(+), 385 deletions(-) diff --git a/subprojects/capstone-next.wrap b/subprojects/capstone-next.wrap index b06aa21d221..da174f0d9e2 100644 --- a/subprojects/capstone-next.wrap +++ b/subprojects/capstone-next.wrap @@ -1,5 +1,5 @@ [wrap-git] url = https://github.com/capstone-engine/capstone.git -revision = 7729902a56fafd971bebba7776f594172027a8bf +revision = 1995ddf95014579476d80614ea3b2c5e8c69ced2 directory = capstone-next patch_directory = capstone-next diff --git a/test/db/analysis/tricore b/test/db/analysis/tricore index 551bad700bc..3405b47c9ef 100644 --- a/test/db/analysis/tricore +++ b/test/db/analysis/tricore @@ -2,7 +2,7 @@ NAME=TriCore lea FILE=malloc://512 CMDS=!rz-asm -a tricore -d d916606c EXPECT=< 0x8008438c ld.d %e2, [%a14]-0x20 -| 0x80084390 ld.w %d15, [%a14]-0x64 -| 0x80084394 mov.a %a15, %d15 -| 0x80084396 st.d [%a15]0x18, %e2 -| 0x8008439a ld.w %d15, [%a14]-0x64 -| 0x8008439e mov.a %a15, %d15 -| 0x800843a0 ld.w %d15, [%a15]0x14 -| 0x800843a2 add %d2, %d15, 1 -| 0x800843a4 ld.w %d15, [%a14]-0x64 -| 0x800843a8 mov %d3, %d2 -| 0x800843aa mov.a %a15, %d15 -| 0x800843ac st.w [%a15]0x14, %d3 ; 20 -| 0x800843ae ld.w %d15, [%a14]-0x64 -| 0x800843b2 mov.a %a15, %d15 -| 0x800843b4 ld.w %d15, [%a15]4 -| 0x800843b6 st.w [%a14]-0x28, %d15 -| 0x800843ba ld.w %d15, [%a14]-0x28 -| 0x800843be st.w [%a14]-0x2c, %d15 -| 0x800843c2 ld.w %d15, [%a14]-0x2c -| 0x800843c6 mov.a %a15, %d15 -| 0x800843c8 ld.h %d15, [%a15]4 -| 0x800843ca eq %d15, %d15, 0 -| 0x800843cc and %d15, 0xff -| ,=< 0x800843ce jnz %d15, 0x800844ca -| | 0x800843d0 ld.w %d15, [%a14]-0x64 -| | 0x800843d4 mov.a %a15, %d15 -| | 0x800843d6 ld.w %d15, [%a15]0x10 -| ,==< 0x800843d8 jz %d15, 0x800843e0 -| ,===< 0x800843da jeq %d15, 1, 0x8008448a -| ,====< 0x800843de j 0x800844d4 -| ||`--> 0x800843e0 mov %d15, 0 -| || | 0x800843e2 st.h [%a14]-4, %d15 -| || | 0x800843e6 mov %d15, 0 -| || | 0x800843e8 st.h [%a14]-2, %d15 -| || | 0x800843ec mov %d15, 0 -| || | 0x800843ee st.b [%a14]-0x49, %d15 -| || | 0x800843f2 ld.w %d15, [%a14]-0x64 -| || | 0x800843f6 mov.a %a15, %d15 -| || | 0x800843f8 ld.w %d15, [%a15]4 -| || | 0x800843fa st.w [%a14]-0x30, %d15 -| || | 0x800843fe ld.w %d15, [%a14]-0x30 -| || | 0x80084402 mov.a %a15, %d15 -| || | 0x80084404 ld.h %d15, [%a15]4 -| || | 0x80084406 st.h [%a14]-4, %d15 -| || | 0x8008440a ld.w %d15, [%a14]-0x64 -| || | 0x8008440e mov.a %a15, %d15 -| || | 0x80084410 ld.w %d15, [%a15]0 -| || | 0x80084412 st.w [%a14]-0x34, %d15 -| || | 0x80084416 ld.w %d15, [%a14]-0x34 -| || | 0x8008441a mov.a %a15, %d15 -| || | 0x8008441c ld.w %d15, [%a15]0xc -| || | 0x8008441e sh %d15, %d15, -0x10 -| || | 0x80084422 and %d15, 0x1f -| || | 0x80084424 and %d15, 0xff -| || | 0x80084426 st.b [%a14]-0x49, %d15 -| || | 0x8008442a ld.bu %d15, [%a14]-0x49 -| || | 0x8008442e extr.u %d15, %d15, 0, 0x10 -| || | 0x80084432 rsub %d15, %d15, 0x10 -| || | 0x80084436 st.h [%a14]-2, %d15 -| || | 0x8008443a ld.hu %d15, [%a14]-2 -| || | 0x8008443e ld.hu %d2, [%a14]-4 -| ||,==< 0x80084442 jge.u %d2, %d15, 0x8008444e -| |||| 0x80084446 ld.h %d15, [%a14]-4 -| |||| 0x8008444a st.h [%a14]-2, %d15 -| |||| 0x8008444e ld.w %d15, [%a14]-0x64 -| |||| 0x80084452 mov.a %a15, %d15 -| |||| 0x80084454 ld.w %d3, [%a15]4 -| |||| 0x80084456 ld.h %d15, [%a14]-2 -| |||| 0x8008445a mov.d %d4, %a14 -| |||| 0x8008445c addi %d2, %d4, -0x48 -| |||| 0x80084460 mov.a %a4, %d3 -| |||| 0x80084462 mov.a %a5, %d2 -| |||| 0x80084464 mov %d4, %d15 -| |||| 0x80084466 mov %e6, 0 -| |||| 0x80084468 call fcn.800858fe -| |||| 0x8008446c ld.w %d15, [%a14]-0x64 -| |||| 0x80084470 mov.a %a15, %d15 -| |||| 0x80084472 ld.w %d3, [%a15]0 -| |||| 0x80084474 ld.hu %d15, [%a14]-2 -| |||| 0x80084478 mov.d %d4, %a14 -| |||| 0x8008447a addi %d2, %d4, -0x48 -| |||| 0x8008447e mov.a %a4, %d3 -| |||| 0x80084480 mov.a %a5, %d2 -| |||| 0x80084482 mov %d4, %d15 -| |||| 0x80084484 call fcn.80084d08 -| ||,==< 0x80084488 j 0x800844c8 +| `-> 0x8008438c ld.d e2, [a14]#-0x20 +| 0x80084390 ld.w d15, [a14]#-0x64 +| 0x80084394 mov.a a15, d15 +| 0x80084396 st.d [a15]#0x18, e2 +| 0x8008439a ld.w d15, [a14]#-0x64 +| 0x8008439e mov.a a15, d15 +| 0x800843a0 ld.w d15, [a15]#0x14 +| 0x800843a2 add d2, d15, #1 +| 0x800843a4 ld.w d15, [a14]#-0x64 +| 0x800843a8 mov d3, d2 +| 0x800843aa mov.a a15, d15 +| 0x800843ac st.w [a15]#0x14, d3 ; 20 +| 0x800843ae ld.w d15, [a14]#-0x64 +| 0x800843b2 mov.a a15, d15 +| 0x800843b4 ld.w d15, [a15]#4 +| 0x800843b6 st.w [a14]#-0x28, d15 +| 0x800843ba ld.w d15, [a14]#-0x28 +| 0x800843be st.w [a14]#-0x2c, d15 +| 0x800843c2 ld.w d15, [a14]#-0x2c +| 0x800843c6 mov.a a15, d15 +| 0x800843c8 ld.h d15, [a15]#4 +| 0x800843ca eq d15, d15, #0 +| 0x800843cc and d15, #0xff +| ,=< 0x800843ce jnz d15, #0x800844ca +| | 0x800843d0 ld.w d15, [a14]#-0x64 +| | 0x800843d4 mov.a a15, d15 +| | 0x800843d6 ld.w d15, [a15]#0x10 +| ,==< 0x800843d8 jz d15, #0x800843e0 +| ,===< 0x800843da jeq d15, #1, #0x8008448a +| ,====< 0x800843de j #0x800844d4 +| ||`--> 0x800843e0 mov d15, #0 +| || | 0x800843e2 st.h [a14]#-4, d15 +| || | 0x800843e6 mov d15, #0 +| || | 0x800843e8 st.h [a14]#-2, d15 +| || | 0x800843ec mov d15, #0 +| || | 0x800843ee st.b [a14]#-0x49, d15 +| || | 0x800843f2 ld.w d15, [a14]#-0x64 +| || | 0x800843f6 mov.a a15, d15 +| || | 0x800843f8 ld.w d15, [a15]#4 +| || | 0x800843fa st.w [a14]#-0x30, d15 +| || | 0x800843fe ld.w d15, [a14]#-0x30 +| || | 0x80084402 mov.a a15, d15 +| || | 0x80084404 ld.h d15, [a15]#4 +| || | 0x80084406 st.h [a14]#-4, d15 +| || | 0x8008440a ld.w d15, [a14]#-0x64 +| || | 0x8008440e mov.a a15, d15 +| || | 0x80084410 ld.w d15, [a15]#0 +| || | 0x80084412 st.w [a14]#-0x34, d15 +| || | 0x80084416 ld.w d15, [a14]#-0x34 +| || | 0x8008441a mov.a a15, d15 +| || | 0x8008441c ld.w d15, [a15]#0xc +| || | 0x8008441e sh d15, d15, #-0x10 +| || | 0x80084422 and d15, #0x1f +| || | 0x80084424 and d15, #0xff +| || | 0x80084426 st.b [a14]#-0x49, d15 +| || | 0x8008442a ld.bu d15, [a14]#-0x49 +| || | 0x8008442e extr.u d15, d15, #0, #0x10 +| || | 0x80084432 rsub d15, d15, #0x10 +| || | 0x80084436 st.h [a14]#-2, d15 +| || | 0x8008443a ld.hu d15, [a14]#-2 +| || | 0x8008443e ld.hu d2, [a14]#-4 +| ||,==< 0x80084442 jge.u d2, d15, #0x8008444e +| |||| 0x80084446 ld.h d15, [a14]#-4 +| |||| 0x8008444a st.h [a14]#-2, d15 +| |||| 0x8008444e ld.w d15, [a14]#-0x64 +| |||| 0x80084452 mov.a a15, d15 +| |||| 0x80084454 ld.w d3, [a15]#4 +| |||| 0x80084456 ld.h d15, [a14]#-2 +| |||| 0x8008445a mov.d d4, a14 +| |||| 0x8008445c addi d2, d4, #-0x48 +| |||| 0x80084460 mov.a a4, d3 +| |||| 0x80084462 mov.a a5, d2 +| |||| 0x80084464 mov d4, d15 +| |||| 0x80084466 mov e6, #0 +| |||| 0x80084468 call #0x800858fe ; fcn.800858fe +| |||| 0x8008446c ld.w d15, [a14]#-0x64 +| |||| 0x80084470 mov.a a15, d15 +| |||| 0x80084472 ld.w d3, [a15]#0 +| |||| 0x80084474 ld.hu d15, [a14]#-2 +| |||| 0x80084478 mov.d d4, a14 +| |||| 0x8008447a addi d2, d4, #-0x48 +| |||| 0x8008447e mov.a a4, d3 +| |||| 0x80084480 mov.a a5, d2 +| |||| 0x80084482 mov d4, d15 +| |||| 0x80084484 call #0x80084d08 ; fcn.80084d08 +| ||,==< 0x80084488 j #0x800844c8 .. | | |||| ; CODE XREF from fcn.800842f0 @ 0x80084488 -| |,`--> 0x800844c8 j 0x800844d4 -| ||||`-> 0x800844ca ld.w %d15, [%a14]-0x64 -| |||| 0x800844ce mov %d2, 0 -| |||| 0x800844d0 mov.a %a15, %d15 -| |||| 0x800844d2 st.b [%a15]0xc, %d2 ; 12 +| |,`--> 0x800844c8 j #0x800844d4 +| ||||`-> 0x800844ca ld.w d15, [a14]#-0x64 +| |||| 0x800844ce mov d2, #0 +| |||| 0x800844d0 mov.a a15, d15 +| |||| 0x800844d2 st.b [a15]#0xc, d2 ; 12 | |||| ; CODE XREFS from fcn.800842f0 @ 0x800843de, 0x800844c8 \ ``---> 0x800844d4 ret EOF @@ -572,46 +572,46 @@ EXPECT=< 0x80000218 mfcr %d15, 0xfe2c -| | 0x8000021c extr.u %d15, %d15, 0xf, 1 -| | 0x80000220 ne %d15, %d15, 0 +| 0x80000200 fcall #0x8000008c ; fcn.8000008c ; [77] -r-x section size 134 named .text.Bsp.waitTime +| 0x80000204 ne d15, d4, d0 +| 0x80000208 or.ne d15, d5, d1 +| ,=< 0x8000020c jnz d15, #0x80000218 +| | 0x8000020e fcall #0x80000096 ; fcn.80000096 +| | 0x80000212 ld.d e2, [a15]#0 +| ,==< 0x80000216 j #0x80000244 +| |`-> 0x80000218 mfcr d15, #0xfe2c +| | 0x8000021c extr.u d15, d15, #0xf, #1 +| | 0x80000220 ne d15, d15, #0 | | 0x80000224 disable | | 0x80000228 nop -| | 0x8000022a fcall fcn.8000007e -| | 0x8000022e ld.d %e2, [%a15]0 -| | 0x80000232 and %d0, %d2 -| | 0x80000234 and %d1, %d3 -| |,=< 0x80000236 jz %d15, 0x8000023c +| | 0x8000022a fcall #0x8000007e ; fcn.8000007e +| | 0x8000022e ld.d e2, [a15]#0 +| | 0x80000232 and d0, d2 +| | 0x80000234 and d1, d3 +| |,=< 0x80000236 jz d15, #0x8000023c | || 0x80000238 enable -| |`-> 0x8000023c addx %d2, %d0, %d4 -| | 0x80000240 addc %d3, %d1, %d5 +| |`-> 0x8000023c addx d2, d0, d4 +| | 0x80000240 addc d3, d1, d5 | | ; CODE XREF from fcn.80000200 @ 0x80000216 -| `.-> 0x80000244 fcall fcn.8000008c -| : 0x80000248 ne %d15, %d2, %d0 -| : 0x8000024c or.ne %d15, %d3, %d1 -| ,==< 0x80000250 jz %d15, 0x80000282 -| |: 0x80000252 mfcr %d15, 0xfe2c -| |: 0x80000256 extr.u %d15, %d15, 0xf, 1 -| |: 0x8000025a ne %d15, %d15, 0 +| `.-> 0x80000244 fcall #0x8000008c ; fcn.8000008c +| : 0x80000248 ne d15, d2, d0 +| : 0x8000024c or.ne d15, d3, d1 +| ,==< 0x80000250 jz d15, #0x80000282 +| |: 0x80000252 mfcr d15, #0xfe2c +| |: 0x80000256 extr.u d15, d15, #0xf, #1 +| |: 0x8000025a ne d15, d15, #0 | |: 0x8000025e disable | |: 0x80000262 nop -| |: 0x80000264 fcall fcn.8000007e -| |: 0x80000268 ld.d %e4, [%a15]0 -| |: 0x8000026c and %d0, %d4 -| |: 0x8000026e and %d1, %d5 -| ,===< 0x80000270 jz %d15, 0x80000276 +| |: 0x80000264 fcall #0x8000007e ; fcn.8000007e +| |: 0x80000268 ld.d e4, [a15]#0 +| |: 0x8000026c and d0, d4 +| |: 0x8000026e and d1, d5 +| ,===< 0x80000270 jz d15, #0x80000276 | ||: 0x80000272 enable -| `---> 0x80000276 ge.u %d15, %d0, %d2 -| |: 0x8000027a and.eq %d15, %d1, %d3 -| |: 0x8000027e or.lt %d15, %d3, %d1 -| ``=< 0x80000282 jz %d15, 0x80000244 +| `---> 0x80000276 ge.u d15, d0, d2 +| |: 0x8000027a and.eq d15, d1, d3 +| |: 0x8000027e or.lt d15, d3, d1 +| ``=< 0x80000282 jz d15, #0x80000244 \ 0x80000284 ret EOF RUN @@ -654,71 +654,74 @@ EXPECT=< 0x800004f2 mov %d15, 0 -| |,=< 0x800004f4 j 0x8000054c -| `--> 0x800004f6 mov %d4, 0x14 -| | 0x800004fa call dbg.malloc -| | 0x800004fe mov.aa %a15, %a2 -| | 0x80000500 mov.d %d15, %a15 -| | 0x80000502 ld.a %a15, [%a14]-0x18 -| | 0x80000506 st.w [%a15]0, %d15 -| | 0x80000508 ld.a %a15, [%a14]-0x18 -| | 0x8000050c ld.a %a15, [%a15]0 -| | 0x8000050e ld.w %d15, [%a14]-4 -| | 0x80000512 st.w [%a15]0, %d15 -| | 0x80000514 ld.a %a15, [%a14]-0x18 +| 0x800004ce mov.aa a14, sp +| 0x800004d0 sub.a sp, #0x18 +| 0x800004d2 st.w [a14]#-4, d4 +| 0x800004d6 st.a [a14]#-8, a4 +| 0x800004da st.d [a14]#-0x10, e6 +| 0x800004de st.a [a14]#-0x14, a5 +| 0x800004e2 st.a [a14]#-0x18, a6 +| 0x800004e6 ld.w d15, [a14]#-0x14 +| ,=< 0x800004ea jz d15, #0x800004f2 +| | 0x800004ec ld.w d15, [a14]#-0x18 +| ,==< 0x800004f0 jnz d15, #0x800004f6 +| |`-> 0x800004f2 mov d15, #0 +| |,=< 0x800004f4 j #0x8000054c +| `--> 0x800004f6 mov d4, #0x14 +| | 0x800004fa call #0x80000afc +| | 0x800004fe mov.aa a15, a2 +| | 0x80000500 mov.d d15, a15 +| | 0x80000502 ld.a a15, [a14]#-0x18 +| | 0x80000506 st.w [a15]#0, d15 +| | 0x80000508 ld.a a15, [a14]#-0x18 +| | 0x8000050c ld.a a15, [a15]#0 +| | 0x8000050e ld.w d15, [a14]#-4 +| | 0x80000512 st.w [a15]#0, d15 +| | 0x80000514 ld.a a15, [a14]#-0x18 | | 0x80000518 nop -| | 0x8000051a ld.w %d15, [%a15]0 -| | 0x8000051c mov.a %a15, %d15 -| | 0x8000051e add.a %a15, 4 -| | 0x80000520 mov %d4, 5 -| | 0x80000522 ld.a %a5, [%a14]-8 -| | 0x80000526 mov.aa %a4, %a15 -| | 0x80000528 call dbg.strncpy -| | 0x8000052c ld.a %a15, [%a14]-0x18 -| | 0x80000530 ld.a %a15, [%a15]0 -| | 0x80000532 ld.d %e4, [%a14]-0x10 -| | 0x80000536 call dbg.__truncdfsf2 -| | 0x8000053a mov %d15, %d2 -| | 0x8000053c st.w [%a15]0xc, %d15 -| | 0x8000053e ld.a %a15, [%a14]-0x18 -| | 0x80000542 ld.a %a15, [%a15]0 -| | 0x80000544 ld.w %d15, [%a14]-0x14 -| | 0x80000548 st.w [%a15]0x10, %d15 -| | 0x8000054a mov %d15, 1 -| `-> 0x8000054c mov %d2, %d15 +| | 0x8000051a ld.w d15, [a15]#0 +| | 0x8000051c mov.a a15, d15 +| | 0x8000051e add.a a15, #4 +| | 0x80000520 mov d4, #5 +| | 0x80000522 ld.a a5, [a14]#-8 +| | 0x80000526 mov.aa a4, a15 +| | 0x80000528 call #0x800011e0 +| | 0x8000052c ld.a a15, [a14]#-0x18 +| | 0x80000530 ld.a a15, [a15]#0 +| | 0x80000532 ld.d e4, [a14]#-0x10 +| | 0x80000536 call #0x80000728 +| | 0x8000053a mov d15, d2 +| | 0x8000053c st.w [a15]#0xc, d15 +| | 0x8000053e ld.a a15, [a14]#-0x18 +| | 0x80000542 ld.a a15, [a15]#0 +| | 0x80000544 ld.w d15, [a14]#-0x14 +| | 0x80000548 st.w [a15]#0x10, d15 +| | 0x8000054a mov d15, #1 +| `-> 0x8000054c mov d2, d15 \ 0x8000054e ret EOF RUN @@ -1157,7 +1157,7 @@ int printf(const char *format); / int dbg.printf(const char *fmt, va_args ..); | ; arg const char *fmt @ a6 | ; var va_list ap @ stack + 0x4 -| 0x80000c22 mov.aa %a6, %a4 ; printf.c:10 ; arg5 ; int printf(const char *fmt, va_args ..); +| 0x80000c22 mov.aa a6, a4 ; printf.c:10 ; arg5 ; int printf(const char *fmt, va_args ..); arg void *str @ a15 arg const char *buf @ a5 @@ -1168,7 +1168,7 @@ void dbg.prout(const char *buf); | ; arg void *str @ a15 | ; arg size_t n @ d4 | ; arg const char *buf @ a5 -| 0x80000c04 mov.aa %a15, %a4 ; printf.c:5 ; arg5 ; void *prout(void *str, const char *buf, size_t n); +| 0x80000c04 mov.aa a15, a4 ; printf.c:5 ; arg5 ; void *prout(void *str, const char *buf, size_t n); arg fp_number_type *b @ a12 arg fp_number_type *a @ a13 @@ -1193,7 +1193,7 @@ void dbg._fpadd_parts(); | ; var fractype a_fraction @ d11 | ; var fractype b_fraction @ d9 | ; var int diff @ d12 -| 0x80003c60 ld.bu %d15, [%a4]0 ; fp-bit.c:604 ; arg5 ; fp_number_type *_fpadd_parts(fp_number_type *a, fp_number_type *b, fp_number_type *tmp); +| 0x80003c60 ld.bu d15, [a4]#0 ; fp-bit.c:604 ; arg5 ; fp_number_type *_fpadd_parts(fp_number_type *a, fp_number_type *b, fp_number_type *tmp); var const char *sc @ a2 arg const char *s @ a4 @@ -1205,7 +1205,7 @@ void dbg.strnlen_s(const char *s); | ; arg size_t maxsize @ d4 | ; var const char *sc @ a2 | ; arg const char *s @ a4 -| 0x800030ca mov %d2, 0 ; strnlen_s.c:6 ; size_t strnlen_s(const char *s, size_t maxsize); +| 0x800030ca mov d2, #0 ; strnlen_s.c:6 ; size_t strnlen_s(const char *s, size_t maxsize); arg mbstate_t *pst @ a12 var _Statab *pwcstate @ a13 @@ -1219,7 +1219,7 @@ void dbg._Wctomb(); | ; arg wchar_t wc @ d15 | ; arg mbstate_t *pst @ a12 | ; var _Statab *pwcstate @ a13 -| 0x800018a6 movh.a %a2, 0xd000 ; xwctomb.c:123 ; int _Wctomb(char *s, wchar_t wc, mbstate_t *pst); +| 0x800018a6 movh.a a2, #0xd000 ; xwctomb.c:123 ; int _Wctomb(char *s, wchar_t wc, mbstate_t *pst); arg wchar_t *pwc @ a4 arg const char *s @ a5 @@ -1233,7 +1233,7 @@ void dbg._Mbtowc(wchar_t *pwc, const char *s, mbstate_t *pst); | ; arg wchar_t *pwc @ a4 | ; arg const char *s @ a5 | ; arg mbstate_t *pst @ a6 -| 0x80003084 movh.a %a15, 0xd000 ; xmbtowc.c:150 ; int _Mbtowc(wchar_t *pwc, const char *s, size_t nin, mbstate_t *pst); +| 0x80003084 movh.a a15, #0xd000 ; xmbtowc.c:150 ; int _Mbtowc(wchar_t *pwc, const char *s, size_t nin, mbstate_t *pst); arg int except @ d4 int feraiseexcept(int excepts); @@ -1241,7 +1241,7 @@ int feraiseexcept(int excepts); ;-- feraiseexcept: / int dbg.feraiseexcept(int except); | ; arg int except @ d4 -| 0x800037d8 mov %d2, 0 ; feraiseexcept.c:173 ; int feraiseexcept(int except); +| 0x800037d8 mov d2, #0 ; feraiseexcept.c:173 ; int feraiseexcept(int except); var Ppvoidfn newfuns @ a12 var size_t inc @ d15 @@ -1252,7 +1252,7 @@ void dbg._Atrealloc(); / int dbg._Atrealloc(); | ; var size_t inc @ d15 | ; var Ppvoidfn newfuns @ a12 -| 0x80001994 movh.a %a15, 0xd000 ; exit.c:22 ; int _Atrealloc(); +| 0x80001994 movh.a a15, #0xd000 ; exit.c:22 ; int _Atrealloc(); EOF RUN diff --git a/test/db/analysis/x86_64 b/test/db/analysis/x86_64 index 96008848b99..d75f7f8026e 100644 --- a/test/db/analysis/x86_64 +++ b/test/db/analysis/x86_64 @@ -503,6 +503,7 @@ RUN NAME=block takeover FILE=bins/elf/static-glibc-2.27 +BROKEN=1 CMDS=<> (var _flags) (bv 8 0x2) false)) (set pf (lsb (var _flags))) (set _flags (>> (var _flags) (bv 8 0x2) false)) (set af (lsb (var _flags))) (set _flags (>> (var _flags) (bv 8 0x2) false)) (set zf (lsb (var _flags))) (set _flags (>> (var _flags) (bv 8 0x1) false)) (set sf (lsb (var _flags))) (set _flags (>> (var _flags) (bv 8 0x1) false)) (set tf (lsb (var _flags))) (set _flags (>> (var _flags) (bv 8 0x1) false)) (set if (lsb (var _flags))) (set _flags (>> (var _flags) (bv 8 0x1) false)) (set df (lsb (var _flags))) (set _flags (>> (var _flags) (bv 8 0x1) false)) (set of (lsb (var _flags))) (set _flags (>> (var _flags) (bv 8 0x3) false)) (set nt (lsb (var _flags))) (set sp (+ (var sp) (bv 16 0x2)))) diff --git a/test/db/asm/x86_32 b/test/db/asm/x86_32 index b383c9046a7..93e71810924 100644 --- a/test/db/asm/x86_32 +++ b/test/db/asm/x86_32 @@ -242,7 +242,7 @@ d "lodsd eax, dword [si]" 67ad 0x0 (seq (set eax (loadw 0 32 (+ (+ (cast 32 fals d "loop 3" 66e200 0x0 (seq (set ecx (- (var ecx) (bv 32 0x1))) (branch (! (is_zero (var ecx))) (jmp (bv 32 0x6)) nop)) d "loope 3" 66e100 0x0 (seq (set ecx (- (var ecx) (bv 32 0x1))) (branch (&& (! (is_zero (var ecx))) (var zf)) (jmp (bv 32 0x6)) nop)) d "loopne 3" 66e000 0x0 (seq (set ecx (- (var ecx) (bv 32 0x1))) (branch (&& (! (is_zero (var ecx))) (! (var zf))) (jmp (bv 32 0x6)) nop)) -d "lsl eax, dword [eax]" 0f0300 +dB "lsl eax, dword [eax]" 0f0300 d "ltr ax" 0f00d8 d "ltr word [eax]" 0f0018 d "lzcnt eax, dword [eax]" f30fbd00 diff --git a/test/db/asm/x86_64 b/test/db/asm/x86_64 index 642ebc08b9e..21be1bfa8c1 100644 --- a/test/db/asm/x86_64 +++ b/test/db/asm/x86_64 @@ -1004,12 +1004,12 @@ a "bswap r15d" 410fcf ad "endbr64" f30f1efa d "enter 8, 0" c8080000 0x0 (seq (set _alloc_sz (cast 16 false (bv 64 0x8))) (set _nest_lvl (mod (cast 8 false (bv 64 0x0)) (bv 8 0x20))) (set final (- (var rsp) (bv 64 0x8))) (storew 0 (var final) (cast 64 false (var rbp))) (set rsp (var final)) (set _frame_tmp (var rsp)) (branch (is_zero (var _nest_lvl)) nop (seq (branch (! (ule (var _nest_lvl) (bv 8 0x1))) (seq (set _itr (bv 8 0x1)) (repeat (&& (ule (var _itr) (var _nest_lvl)) (! (== (var _itr) (var _nest_lvl)))) (seq (set rbp (- (var rbp) (bv 64 0x8))) (set final (- (var rsp) (bv 64 0x8))) (storew 0 (var final) (cast 64 false (loadw 0 64 (var rbp)))) (set rsp (var final)) (set _itr (+ (var _itr) (bv 8 0x1)))))) nop) (set final (- (var rsp) (bv 64 0x8))) (storew 0 (var final) (cast 64 false (var _frame_tmp))) (set rsp (var final)))) (set rsp (- (var rsp) (cast 64 false (var _alloc_sz)))) (set rbp (var _frame_tmp))) d "enter 8, 0" 66c8080000 0x0 (seq (set _alloc_sz (cast 16 false (bv 32 0x8))) (set _nest_lvl (mod (cast 8 false (bv 32 0x0)) (bv 8 0x20))) (set final (- (var rsp) (bv 64 0x8))) (storew 0 (var final) (cast 64 false (cast 32 false (var rbp)))) (set rsp (var final)) (set _frame_tmp (var rsp)) (branch (is_zero (var _nest_lvl)) nop (seq (branch (! (ule (var _nest_lvl) (bv 8 0x1))) (seq (set _itr (bv 8 0x1)) (repeat (&& (ule (var _itr) (var _nest_lvl)) (! (== (var _itr) (var _nest_lvl)))) (seq (set rbp (- (var rbp) (bv 64 0x4))) (set final (- (var rsp) (bv 64 0x8))) (storew 0 (var final) (cast 64 false (loadw 0 32 (var rbp)))) (set rsp (var final)) (set _itr (+ (var _itr) (bv 8 0x1)))))) nop) (set final (- (var rsp) (bv 64 0x8))) (storew 0 (var final) (cast 64 false (var _frame_tmp))) (set rsp (var final)))) (set rsp (- (var rsp) (cast 64 false (var _alloc_sz)))) (set rbp (cast 64 false (var _frame_tmp)))) -ad "xchg eax, r8d" 4190 0x0 (seq (set _temp (cast 32 false (var rax))) (set rax (cast 64 false (cast 32 false (var r8)))) (set r8 (cast 64 false (var _temp)))) -a "xchg r8d, eax" 4190 0x0 (seq (set _temp (cast 32 false (var rax))) (set rax (cast 64 false (cast 32 false (var r8)))) (set r8 (cast 64 false (var _temp)))) -ad "xchg rax, rdx" 4892 0x0 (seq (set _temp (var rax)) (set rax (var rdx)) (set rdx (var _temp))) -a "xchg rdx, rax" 4892 0x0 (seq (set _temp (var rax)) (set rax (var rdx)) (set rdx (var _temp))) -ad "xchg rax, r8" 4990 0x0 (seq (set _temp (var rax)) (set rax (var r8)) (set r8 (cast 64 false (var _temp)))) -a "xchg r8, rax" 4990 0x0 (seq (set _temp (var rax)) (set rax (var r8)) (set r8 (cast 64 false (var _temp)))) +adB "xchg eax, r8d" 4190 0x0 (seq (set _temp (cast 32 false (var rax))) (set rax (cast 64 false (cast 32 false (var r8)))) (set r8 (cast 64 false (var _temp)))) +aB "xchg r8d, eax" 4190 0x0 (seq (set _temp (cast 32 false (var rax))) (set rax (cast 64 false (cast 32 false (var r8)))) (set r8 (cast 64 false (var _temp)))) +adB "xchg rax, rdx" 4892 0x0 (seq (set _temp (var rax)) (set rax (var rdx)) (set rdx (var _temp))) +aB "xchg rdx, rax" 4892 0x0 (seq (set _temp (var rax)) (set rax (var rdx)) (set rdx (var _temp))) +adB "xchg rax, r8" 4990 0x0 (seq (set _temp (var rax)) (set rax (var r8)) (set r8 (cast 64 false (var _temp)))) +aB "xchg r8, rax" 4990 0x0 (seq (set _temp (var rax)) (set rax (var r8)) (set r8 (cast 64 false (var _temp)))) ad "xchg rdx, rbx" 4887da 0x0 (seq (set _temp (var rdx)) (set rdx (var rbx)) (set rbx (var _temp))) ad "xchg rbx, rdx" 4887d3 0x0 (seq (set _temp (var rbx)) (set rbx (var rdx)) (set rdx (var _temp))) ad "xchg r8, r15" 4d87f8 0x0 (seq (set _temp (var r8)) (set r8 (cast 64 false (var r15))) (set r15 (cast 64 false (var _temp)))) diff --git a/test/db/formats/mach0/imports b/test/db/formats/mach0/imports index 532c36176b5..064a7434cdd 100644 --- a/test/db/formats/mach0/imports +++ b/test/db/formats/mach0/imports @@ -50,6 +50,7 @@ address min max name super -------------------------------------------------- 0x1000080f8 0x1000080f8 0x1000080f8 Stub NSObject EOF +BROKEN=1 RUN NAME=mach0 arm64 chained imports diff --git a/test/db/rzil/ppc32 b/test/db/rzil/ppc32 index 06adab4a6e8..6d806632a84 100644 --- a/test/db/rzil/ppc32 +++ b/test/db/rzil/ppc32 @@ -181,6 +181,7 @@ EXPECT=<