From 38ec53589e27b84449702f4c35b383b9c73e223a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Wed, 4 Dec 2013 14:49:01 +0100 Subject: [PATCH 01/20] Add information on status of the EFLAGS register. --- docs/x86/optable.xml | 253 +++++++++++++++++++++++++++++++++++++++++++ libudis86/decode.h | 1 + libudis86/extern.h | 2 + libudis86/types.h | 29 +++++ libudis86/udis86.c | 15 +++ scripts/ud_itab.py | 13 ++- scripts/ud_opcode.py | 20 +++- 7 files changed, 330 insertions(+), 3 deletions(-) diff --git a/docs/x86/optable.xml b/docs/x86/optable.xml index 1984088..66e7fc7 100644 --- a/docs/x86/optable.xml +++ b/docs/x86/optable.xml @@ -103,6 +103,7 @@ aaa + UUUMUM_____ 37 /m=!64 @@ -110,6 +111,7 @@ aad + UMMUMU_____ d5 /m=!64 Ib @@ -118,6 +120,7 @@ aam + UMMUMU_____ d4 /m=!64 Ib @@ -126,6 +129,7 @@ aas + UUUMUM_____ 3f /m=!64 @@ -133,6 +137,7 @@ adc + MMMMMM_____ aso rexr rexx rexb 10 @@ -187,6 +192,7 @@ add + MMMMMM_____ aso rexr rexx rexb 00 @@ -362,6 +368,7 @@ and + RMMUMR_____ aso rexr rexx rexb 20 @@ -456,6 +463,7 @@ arpl + __M________ aso 63 /m=!64 @@ -474,6 +482,7 @@ call + ___________ aso oso rexw rexr rexx rexb ff /reg=2 /m=!64 @@ -505,6 +514,7 @@ cbw + ___________ oso rexw 98 /o=16 @@ -529,6 +539,7 @@ clc + _____R_____ f8 @@ -536,6 +547,7 @@ cld + ________R__ fc @@ -560,6 +572,7 @@ cli + _______R___ fa @@ -567,6 +580,7 @@ clts + ___________ 0f 06 @@ -574,6 +588,7 @@ cmc + _____M_____ f5 @@ -581,6 +596,7 @@ cmovo + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 40 @@ -590,6 +606,7 @@ cmovno + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 41 @@ -599,6 +616,7 @@ cmovb + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 42 @@ -608,6 +626,7 @@ cmovae + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 43 @@ -617,6 +636,7 @@ cmovz + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 44 @@ -626,6 +646,7 @@ cmovnz + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 45 @@ -635,6 +656,7 @@ cmovbe + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 46 @@ -644,6 +666,7 @@ cmova + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 47 @@ -653,6 +676,7 @@ cmovs + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 48 @@ -662,6 +686,7 @@ cmovns + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 49 @@ -671,6 +696,7 @@ cmovp + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 4a @@ -680,6 +706,7 @@ cmovnp + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 4b @@ -689,6 +716,7 @@ cmovl + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 4c @@ -698,6 +726,7 @@ cmovge + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 4d @@ -707,6 +736,7 @@ cmovle + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 4e @@ -716,6 +746,7 @@ cmovg + TTT_TT_____ aso oso rexw rexr rexx rexb 0f 4f @@ -725,6 +756,7 @@ cmp + MMMMMM_____ aso rexr rexx rexb 38 @@ -779,6 +811,7 @@ cmppd + MMMMMM_____ aso rexr rexx rexb vexl /sse=66 0f c2 @@ -789,6 +822,7 @@ cmpps + MMMMMM_____ aso rexr rexx rexb vexl 0f c2 @@ -799,6 +833,7 @@ cmpsb + MMMMMM_____ repz seg a6 @@ -807,6 +842,7 @@ cmpsw + MMMMMM_____ repz oso rexw seg a7 /o=16 @@ -815,6 +851,7 @@ cmpsd + MMMMMM_____ repz oso rexw seg a7 /o=32 @@ -829,6 +866,7 @@ cmpsq + MMMMMM_____ repz oso rexw seg a7 /o=64 @@ -837,6 +875,7 @@ cmpss + MMMMMM_____ aso rexr rexx rexb /sse=f3 0f c2 @@ -847,6 +886,7 @@ cmpxchg + MMMMMM_____ aso rexr rexx rexb 0f b0 @@ -861,6 +901,7 @@ cmpxchg8b + __M________ aso rexr rexx rexb 0f c7 /mod=!11 /reg=1 /o=16 @@ -875,6 +916,7 @@ cmpxchg16b + __M________ aso rexr rexx rexb 0f c7 /mod=!11 /reg=1 /o=64 @@ -884,6 +926,7 @@ comisd + RRMRMM_____ aso rexr rexx rexb /sse=66 0f 2f @@ -894,6 +937,7 @@ comiss + RRMRMM_____ aso rexr rexx rexb 0f 2f @@ -904,6 +948,7 @@ cpuid + ___________ 0f a2 @@ -1125,6 +1170,7 @@ cwd + ___________ oso rexw 99 /o=16 @@ -1149,6 +1195,7 @@ daa + UMMMMM_____ 27 /m=!64 inv64 @@ -1157,6 +1204,7 @@ das + UMMMMM_____ 2f /m=!64 inv64 @@ -1165,6 +1213,7 @@ dec + MMMMMM_____ oso 48 @@ -1219,6 +1268,7 @@ div + UUUUUU_____ aso oso rexw rexr rexx rexb f7 /reg=6 @@ -1300,6 +1350,7 @@ enter + ___________ c8 Iw Ib @@ -1487,6 +1538,7 @@ fcmovb + __T_TT_____ X87 da /mod=11 /x87=00 @@ -1524,6 +1576,7 @@ fcmove + __T_TT_____ X87 da /mod=11 /x87=08 @@ -1561,6 +1614,7 @@ fcmovbe + __T_TT_____ X87 da /mod=11 /x87=10 @@ -1598,6 +1652,7 @@ fcmovu + __T_TT_____ X87 da /mod=11 /x87=18 @@ -1635,6 +1690,7 @@ fcmovnb + __T_TT_____ X87 db /mod=11 /x87=00 @@ -1672,6 +1728,7 @@ fcmovne + __T_TT_____ X87 db /mod=11 /x87=08 @@ -1709,6 +1766,7 @@ fcmovnbe + __T_TT_____ X87 db /mod=11 /x87=10 @@ -1746,6 +1804,7 @@ fcmovnu + __T_TT_____ X87 db /mod=11 /x87=18 @@ -1783,6 +1842,7 @@ fucomi + __M_MM_____ X87 db /mod=11 /x87=28 @@ -1820,6 +1880,7 @@ fcom + __M_MM_____ X87 aso rexr rexx rexb @@ -1867,6 +1928,7 @@ fcom2 + __M_MM_____ X87 UNDOC dc /mod=11 /x87=10 @@ -1904,6 +1966,7 @@ fcomp3 + __M_MM_____ X87 UNDOC dc /mod=11 /x87=18 @@ -1941,6 +2004,7 @@ fcomi + __M_MM_____ X87 db /mod=11 /x87=30 @@ -1978,6 +2042,7 @@ fucomip + __M_MM_____ X87 df /mod=11 /x87=28 @@ -2015,6 +2080,7 @@ fcomip + __M_MM_____ X87 df /mod=11 /x87=30 @@ -2052,6 +2118,7 @@ fcomp + __M_MM_____ X87 aso rexr rexx rexb @@ -2099,6 +2166,7 @@ fcomp5 + __M_MM_____ X87 UNDOC de /mod=11 /x87=10 @@ -2136,6 +2204,7 @@ fcompp + __M_MM_____ X87 de /mod=11 /x87=19 @@ -3752,6 +3821,7 @@ hlt + ___________ f4 @@ -3759,6 +3829,7 @@ idiv + UUUUUU_____ aso oso rexw rexr rexx rexb f7 /reg=7 @@ -3773,6 +3844,7 @@ in + ___________ e4 AL Ib @@ -3795,6 +3867,7 @@ imul + MUUUUM_____ aso oso rexw rexr rexx rexb 0f af @@ -3824,6 +3897,7 @@ inc + MMMMM______ oso 40 @@ -3878,6 +3952,7 @@ insb + ________T__ rep seg 6c @@ -3886,6 +3961,7 @@ insw + ________T__ rep oso seg 6d /o=16 @@ -3894,6 +3970,7 @@ insd + ________T__ rep oso seg 6d /o=32 @@ -3902,6 +3979,7 @@ int1 + ______R__R_ f1 @@ -3909,6 +3987,7 @@ int3 + ______R__R_ cc @@ -3916,6 +3995,7 @@ int + ______R__R_ cd Ib @@ -3924,6 +4004,7 @@ into + T_____R__R_ ce /m=!64 inv64 @@ -3932,6 +4013,7 @@ invd + ___________ 0f 08 @@ -3952,6 +4034,7 @@ invlpg + ___________ aso rexr rexx rexb 0f 01 /reg=7 /mod=!11 @@ -3982,6 +4065,7 @@ iretw + PPPPPPPPPT_ oso rexw cf /o=16 @@ -3990,6 +4074,7 @@ iretd + PPPPPPPPPT_ oso rexw cf /o=32 @@ -3998,6 +4083,7 @@ iretq + PPPPPPPPPT_ oso rexw cf /o=64 @@ -4006,6 +4092,7 @@ jo + T__________ 70 Jb @@ -4020,6 +4107,7 @@ jno + T__________ 71 Jb @@ -4034,6 +4122,7 @@ jb + _____T_____ 72 Jb @@ -4048,6 +4137,7 @@ jae + _____T_____ 73 Jb @@ -4062,6 +4152,7 @@ jz + __T________ 74 Jb @@ -4076,6 +4167,7 @@ jnz + __T________ 75 Jb @@ -4090,6 +4182,7 @@ jbe + __T__T_____ 76 Jb @@ -4104,6 +4197,7 @@ ja + __T__T_____ 77 Jb @@ -4118,6 +4212,7 @@ js + _T_________ 78 Jb @@ -4132,6 +4227,7 @@ jns + _T_________ 79 Jb @@ -4146,6 +4242,7 @@ jp + ____T______ 7a Jb @@ -4160,6 +4257,7 @@ jnp + ____T______ 7b Jb @@ -4174,6 +4272,7 @@ jl + TT_________ 7c Jb @@ -4188,6 +4287,7 @@ jge + TT_________ 7d Jb @@ -4202,6 +4302,7 @@ jle + TTT________ 7e Jb @@ -4216,6 +4317,7 @@ jg + TTT________ 7f Jb @@ -4230,6 +4332,7 @@ jcxz + ___________ aso e3 /a=16 @@ -4239,6 +4342,7 @@ jecxz + ___________ aso e3 /a=32 @@ -4248,6 +4352,7 @@ jrcxz + ___________ aso e3 /a=64 @@ -4257,6 +4362,7 @@ jmp + ___________ aso oso rexw rexr rexx rexb ff /reg=4 @@ -4288,6 +4394,7 @@ lahf + ___________ 9f @@ -4295,6 +4402,7 @@ lar + __M________ aso oso rexw rexr rexx rexb 0f 02 @@ -4313,6 +4421,7 @@ lds + ___________ aso oso c5 /vex=none /m=!64 @@ -4322,6 +4431,7 @@ lea + ___________ aso oso rexw rexr rexx rexb 8d @@ -4331,6 +4441,7 @@ les + ___________ aso oso c4 /m=!64 @@ -4340,6 +4451,7 @@ lfs + ___________ aso oso rexw rexr rexx rexb 0f b4 @@ -4349,6 +4461,7 @@ lgs + ___________ aso oso rexw rexr rexx rexb 0f b5 @@ -4358,6 +4471,7 @@ lidt + ___________ aso rexr rexx rexb 0f 01 /reg=3 /mod=!11 @@ -4376,6 +4490,7 @@ leave + ___________ c9 @@ -4411,6 +4526,7 @@ lgdt + ___________ aso rexr rexx rexb 0f 01 /reg=2 /mod=!11 @@ -4420,6 +4536,7 @@ lldt + ___________ aso rexr rexx rexb 0f 00 /reg=2 @@ -4429,6 +4546,7 @@ lmsw + ___________ aso rexr rexx rexb 0f 01 /reg=6 /mod=!11 @@ -4443,6 +4561,7 @@ lock + ___________ f0 @@ -4450,6 +4569,7 @@ lodsb + ________T__ rep seg ac @@ -4458,6 +4578,7 @@ lodsw + ________T__ rep seg oso rexw ad /o=16 @@ -4466,6 +4587,7 @@ lodsd + ________T__ rep seg oso rexw ad /o=32 @@ -4474,6 +4596,7 @@ lodsq + ________T__ rep seg oso rexw ad /o=64 @@ -4482,6 +4605,7 @@ loopne + __T________ e0 Jb @@ -4490,6 +4614,7 @@ loope + __T________ e1 Jb @@ -4498,6 +4623,7 @@ loop + ___________ e2 Jb @@ -4506,6 +4632,7 @@ lsl + __M________ aso oso rexw rexr rexx rexb 0f 03 @@ -4515,6 +4642,7 @@ ltr + ___________ aso rexr rexx rexb 0f 00 /reg=3 @@ -4641,6 +4769,7 @@ monitor + ___________ 0f 01 /reg=1 /mod=11 /rm=0 @@ -4655,6 +4784,7 @@ mov + ___________ aso rexw rexr rexx rexb c6 /reg=0 @@ -4794,21 +4924,25 @@ R7v Iv + UUUUUU_____ rexr rexw rexb 0f 20 R C + UUUUUU_____ rexr rexw rexb 0f 21 R D + UUUUUU_____ rexr rexw rexb 0f 22 C R + UUUUUU_____ rexr rexw rexb 0f 23 D R @@ -5104,6 +5238,7 @@ movsb + ________T__ rep seg a4 @@ -5112,6 +5247,7 @@ movsw + ________T__ rep seg oso rexw a5 /o=16 @@ -5120,6 +5256,7 @@ movsd + ________T__ rep seg oso rexw a5 /o=32 @@ -5140,6 +5277,7 @@ movsq + ________T__ rep seg oso rexw a5 /o=64 @@ -5148,6 +5286,7 @@ movss + ________T__ aso rexr rexx rexb /sse=f3 0f 10 @@ -5164,6 +5303,7 @@ movsx + ___________ aso oso rexw rexr rexx rexb 0f be @@ -5210,6 +5350,7 @@ movzx + ___________ aso oso rexw rexr rexx rexb 0f b6 @@ -5224,6 +5365,7 @@ mul + MUUUUM_____ aso rexw rexr rexx rexb f6 /reg=4 @@ -5278,6 +5420,7 @@ mwait + ___________ 0f 01 /reg=1 /mod=11 /rm=1 @@ -5285,6 +5428,7 @@ neg + MMMMMM_____ aso rexw rexr rexx rexb f6 /reg=3 @@ -5299,6 +5443,7 @@ nop + ___________ aso rexr rexx rexb 0f 19 @@ -5338,6 +5483,7 @@ not + ___________ aso rexw rexr rexx rexb f6 /reg=2 @@ -5352,6 +5498,7 @@ or + RMMUMR_____ aso rexr rexx rexb 08 @@ -5425,6 +5572,7 @@ out + ___________ e6 Ib AL @@ -5447,6 +5595,7 @@ outsb + ________T__ rep seg 6e @@ -5455,6 +5604,7 @@ outsw + ________T__ rep oso seg 6f /o=16 @@ -5463,6 +5613,7 @@ outsd + ________T__ rep oso seg 6f /o=32 @@ -6064,6 +6215,7 @@ pop + ___________ 07 /m=!64 ES @@ -6145,6 +6297,7 @@ popa + ___________ oso 61 /o=16 /m=!64 @@ -6154,6 +6307,7 @@ popad + ___________ oso 61 /o=32 /m=!64 @@ -6163,6 +6317,7 @@ popfw + PPPPPPPPPP_ oso 9d /m=!64 /o=16 @@ -6171,6 +6326,7 @@ popfd + PPPPPPPPPP_ oso 9d /m=!64 /o=32 @@ -6179,6 +6335,7 @@ popfq + PPPPPPPPPP_ oso 9d /m=64 /o=32 @@ -6923,6 +7080,7 @@ push + ___________ 06 /m=!64 ES @@ -7021,6 +7179,7 @@ pusha + ___________ oso 60 /o=16 /m=!64 @@ -7030,6 +7189,7 @@ pushad + ___________ oso 60 /o=32 /m=!64 @@ -7039,6 +7199,7 @@ pushfw + ___________ oso 9c /m=!64 /o=16 @@ -7052,6 +7213,7 @@ pushfd + ___________ oso 9c /m=!64 /o=32 @@ -7060,6 +7222,7 @@ pushfq + ___________ oso rexw 9c /m=64 /o=32 @@ -7089,6 +7252,7 @@ rcl + U____M_____ aso rexw rexr rexx rexb c0 /reg=2 @@ -7100,6 +7264,7 @@ Ev Ib + M____M_____ aso rexw rexr rexx rexb d0 /reg=2 Eb I1 @@ -7115,6 +7280,7 @@ Ev CL + M____M_____ aso oso rexw rexr rexx rexb d1 /reg=2 Ev I1 @@ -7123,7 +7289,9 @@ rcr + U____M_____ + M____M_____ aso rexw rexr rexx rexb d0 /reg=3 Eb I1 @@ -7139,6 +7307,7 @@ Eb Ib + M____M_____ aso oso rexw rexr rexx rexb d1 /reg=3 Ev I1 @@ -7157,17 +7326,20 @@ rol + U____M_____ aso rexw rexr rexx rexb c0 /reg=0 Eb Ib + M____M_____ aso rexw rexr rexx rexb d0 /reg=0 Eb I1 + M____M_____ aso oso rexw rexr rexx rexb d1 /reg=0 Ev I1 @@ -7191,7 +7363,9 @@ ror + U____M_____ + M____M_____ aso rexw rexr rexx rexb d0 /reg=1 Eb I1 @@ -7207,6 +7381,7 @@ Ev Ib + M____M_____ aso oso rexw rexr rexx rexb d1 /reg=1 Ev I1 @@ -7245,6 +7420,7 @@ rdmsr + ___________ 0f 32 @@ -7252,6 +7428,7 @@ rdpmc + ___________ 0f 33 @@ -7259,6 +7436,7 @@ rdtsc + ___________ 0f 31 @@ -7274,6 +7452,7 @@ repne + ___________ f2 @@ -7281,6 +7460,7 @@ rep + ___________ f3 @@ -7288,6 +7468,7 @@ ret + ___________ c2 Iw @@ -7310,6 +7491,7 @@ rsm + MMMMMMMMMMM 0f aa @@ -7337,6 +7519,7 @@ sahf + _PPPPP_____ 9e @@ -7344,6 +7527,7 @@ sal + MMM_MM_____ @@ -7356,7 +7540,9 @@ sar + _MM_MM_____ + MMM_MM_____ aso oso rexw rexr rexx rexb d1 /reg=7 Ev I1 @@ -7367,6 +7553,7 @@ Eb Ib + MMM_MM_____ aso rexw rexr rexx rexb d0 /reg=7 Eb I1 @@ -7390,6 +7577,7 @@ shl + _MM_MM_____ aso rexw rexr rexx rexb c0 /reg=6 @@ -7401,6 +7589,7 @@ Ev Ib + MMM_MM_____ aso rexw rexr rexx rexb d0 /reg=6 Eb I1 @@ -7426,11 +7615,13 @@ Eb CL + MMM_MM_____ aso oso rexw rexr rexx rexb d1 /reg=4 Ev I1 + MMM_MM_____ aso rexw rexr rexx rexb d0 /reg=4 Eb I1 @@ -7446,6 +7637,7 @@ Ev CL + MMM_MM_____ aso oso rexw rexr rexx rexb d1 /reg=6 Ev I1 @@ -7454,6 +7646,7 @@ shr + _MM_MM_____ aso oso rexw rexr rexx rexb c1 /reg=5 @@ -7465,11 +7658,13 @@ Eb CL + MMM_MM_____ aso oso rexw rexr rexx rexb d1 /reg=5 Ev I1 + MMM_MM_____ aso rexw rexr rexx rexb d0 /reg=5 Eb I1 @@ -7488,6 +7683,7 @@ sbb + MMMMMM_____ aso rexr rexx rexb 18 @@ -7542,6 +7738,7 @@ scasb + MMMMMM_____ repz ae @@ -7550,6 +7747,7 @@ scasw + MMMMMM_____ repz oso rexw af /o=16 @@ -7558,6 +7756,7 @@ scasd + MMMMMM_____ repz oso rexw af /o=32 @@ -7566,6 +7765,7 @@ scasq + MMMMMM_____ repz oso rexw af /o=64 @@ -7574,6 +7774,7 @@ seto + TTT_TT_____ aso rexr rexx rexb 0f 90 @@ -7583,6 +7784,7 @@ setno + TTT_TT_____ aso rexr rexx rexb 0f 91 @@ -7592,6 +7794,7 @@ setb + TTT_TT_____ aso rexr rexx rexb 0f 92 @@ -7601,6 +7804,7 @@ setae + TTT_TT_____ aso rexr rexx rexb 0f 93 @@ -7610,6 +7814,7 @@ setz + TTT_TT_____ aso rexr rexx rexb 0f 94 @@ -7619,6 +7824,7 @@ setnz + TTT_TT_____ aso rexr rexx rexb 0f 95 @@ -7628,6 +7834,7 @@ setbe + TTT_TT_____ aso rexr rexx rexb 0f 96 @@ -7637,6 +7844,7 @@ seta + TTT_TT_____ aso rexr rexx rexb 0f 97 @@ -7646,6 +7854,7 @@ sets + TTT_TT_____ aso rexr rexx rexb 0f 98 @@ -7655,6 +7864,7 @@ setns + TTT_TT_____ aso rexr rexx rexb 0f 99 @@ -7664,6 +7874,7 @@ setp + TTT_TT_____ aso rexr rexx rexb 0f 9a @@ -7673,6 +7884,7 @@ setnp + TTT_TT_____ aso rexr rexx rexb 0f 9b @@ -7682,6 +7894,7 @@ setl + TTT_TT_____ aso rexr rexx rexb 0f 9c @@ -7691,6 +7904,7 @@ setge + TTT_TT_____ aso rexr rexx rexb 0f 9d @@ -7700,6 +7914,7 @@ setle + TTT_TT_____ aso rexr rexx rexb 0f 9e @@ -7709,6 +7924,7 @@ setg + TTT_TT_____ aso rexr rexx rexb 0f 9f @@ -7746,6 +7962,7 @@ sgdt + ___________ aso rexr rexx rexb 0f 01 /reg=0 /mod=!11 @@ -7755,6 +7972,7 @@ shld + UMMUMM_____ aso oso rexw rexr rexx rexb 0f a4 @@ -7769,6 +7987,7 @@ shrd + UMMUMM_____ aso oso rexw rexr rexx rexb 0f ac @@ -7803,6 +8022,7 @@ sidt + ___________ aso rexr rexx rexb 0f 01 /reg=1 /mod=!11 @@ -7812,6 +8032,7 @@ sldt + ___________ aso oso rexr rexw rexx rexb 0f 00 /reg=0 @@ -7821,6 +8042,7 @@ smsw + ___________ aso oso rexr rexw rexx rexb 0f 01 /reg=4 /mod=!11 @@ -7875,6 +8097,7 @@ stc + _____S_____ f9 @@ -7882,6 +8105,7 @@ std + ________S__ fd @@ -7897,6 +8121,7 @@ sti + _______S___ fb @@ -7922,6 +8147,7 @@ stosb + ___________ rep seg aa @@ -7930,6 +8156,7 @@ stosw + ___________ rep seg oso rexw ab /o=16 @@ -7938,6 +8165,7 @@ stosd + ___________ rep seg oso rexw ab /o=32 @@ -7946,6 +8174,7 @@ stosq + ___________ rep seg oso rexw ab /o=64 @@ -7954,6 +8183,7 @@ str + ___________ aso oso rexr rexw rexx rexb 0f 00 /reg=1 @@ -7963,6 +8193,7 @@ sub + MMMMMM_____ aso rexr rexx rexb 28 @@ -8100,6 +8331,7 @@ test + RMMUMR_____ aso rexw rexr rexx rexb f6 /reg=0 @@ -8143,6 +8375,7 @@ ucomisd + RRMRMM_____ aso rexr rexx rexb /sse=66 0f 2e @@ -8153,6 +8386,7 @@ ucomiss + RRMRMM_____ aso rexr rexx rexb 0f 2e @@ -8163,6 +8397,7 @@ ud2 + ___________ 0f 0b @@ -8210,6 +8445,7 @@ verr + __M________ aso rexr rexx rexb 0f 00 /reg=4 @@ -8219,6 +8455,7 @@ verw + __M________ aso rexr rexx rexb 0f 00 /reg=5 @@ -8364,6 +8601,7 @@ wait + ___________ 9b @@ -8371,6 +8609,7 @@ wbinvd + ___________ 0f 09 @@ -8378,6 +8617,7 @@ wrmsr + ___________ 0f 30 @@ -8385,6 +8625,7 @@ xadd + MMMMMM_____ aso oso rexr rexx rexb 0f c0 @@ -8399,6 +8640,7 @@ xchg + ___________ aso rexr rexx rexb 86 @@ -8460,6 +8702,7 @@ xlatb + ___________ rexw seg d7 @@ -8468,6 +8711,7 @@ xor + RMMUMR_____ aso rexr rexx rexb 30 @@ -9379,6 +9623,7 @@ bound + ___________ aso oso 62 /m=!64 @@ -9388,6 +9633,7 @@ bsf + UUMUUU_____ aso oso rexw rexr rexx rexb 0f bc @@ -9397,6 +9643,7 @@ bsr + UUMUUU_____ aso oso rexw rexr rexx rexb 0f bd @@ -9406,6 +9653,7 @@ bswap + ___________ oso rexw rexb 0f c8 @@ -9450,6 +9698,7 @@ bt + UUUUUM_____ aso oso rexw rexr rexx rexb 0f ba /reg=4 @@ -9464,6 +9713,7 @@ btc + UUUUUM_____ aso oso rexw rexr rexx rexb 0f bb @@ -9478,6 +9728,7 @@ btr + UUUUUM_____ aso oso rexw rexr rexx rexb 0f b3 @@ -9492,6 +9743,7 @@ bts + UUUUUM_____ aso oso rexw rexr rexx rexb 0f ab @@ -9676,6 +9928,7 @@ popcnt + RRMRRR_____ aso oso rexr rexw rexx rexb /sse=f3 0f b8 diff --git a/libudis86/decode.h b/libudis86/decode.h index 3949c4e..0d4a36e 100644 --- a/libudis86/decode.h +++ b/libudis86/decode.h @@ -177,6 +177,7 @@ struct ud_itab_entry struct ud_itab_entry_operand operand3; struct ud_itab_entry_operand operand4; uint32_t prefix; + struct ud_eflags eflags; }; struct ud_lookup_table_list_entry { diff --git a/libudis86/extern.h b/libudis86/extern.h index 71a01fd..69bad12 100644 --- a/libudis86/extern.h +++ b/libudis86/extern.h @@ -94,6 +94,8 @@ extern LIBUDIS86_DLLEXTERN enum ud_mnemonic_code ud_insn_mnemonic(const struct u extern LIBUDIS86_DLLEXTERN const char* ud_lookup_mnemonic(enum ud_mnemonic_code c); +extern LIBUDIS86_DLLEXTERN const struct ud_eflags* ud_lookup_eflags(struct ud *u); + extern LIBUDIS86_DLLEXTERN void ud_set_user_opaque_data(struct ud*, void*); extern LIBUDIS86_DLLEXTERN void* ud_get_user_opaque_data(const struct ud*); diff --git a/libudis86/types.h b/libudis86/types.h index d79dae9..e73bdf8 100644 --- a/libudis86/types.h +++ b/libudis86/types.h @@ -128,6 +128,35 @@ enum ud_type UD_OP_JIMM, UD_OP_CONST }; +enum ud_eflag_state +{ + UD_FLAG_UNCHANGED, + UD_FLAG_TESTED, + UD_FLAG_MODIFIED, + UD_FLAG_RESET, + UD_FLAG_SET, + UD_FLAG_UNDEFINED, + UD_FLAG_PRIOR +}; + +/* This structure describes the state of the EFLAGS register + * once an instruction has been executed. + */ +struct ud_eflags +{ + enum ud_eflag_state of_state; + enum ud_eflag_state sf_state; + enum ud_eflag_state zf_state; + enum ud_eflag_state af_state; + enum ud_eflag_state pf_state; + enum ud_eflag_state cf_state; + enum ud_eflag_state tf_state; + enum ud_eflag_state if_state; + enum ud_eflag_state df_state; + enum ud_eflag_state nt_state; + enum ud_eflag_state rf_state; +}; + #include "itab.h" union ud_lval { diff --git a/libudis86/udis86.c b/libudis86/udis86.c index e039c4e..489ed3b 100644 --- a/libudis86/udis86.c +++ b/libudis86/udis86.c @@ -340,6 +340,21 @@ ud_lookup_mnemonic(enum ud_mnemonic_code c) } } +/* ============================================================================= + * ud_lookup_eflags + * Looks up eflags information structure + * Returns NULL if invalid. + * ============================================================================= + */ +const struct ud_eflags* +ud_lookup_eflags(struct ud *u) +{ + if (u == NULL || u->itab_entry == NULL) { + return NULL; + } else { + return &u->itab_entry->eflags; + } +} /* * ud_inp_init diff --git a/scripts/ud_itab.py b/scripts/ud_itab.py index 841233d..2bee4ca 100644 --- a/scripts/ud_itab.py +++ b/scripts/ud_itab.py @@ -280,8 +280,17 @@ def genInsnTable( self ): pfx_c.append( "P_none" ) pfx = "|".join( pfx_c ) - self.ItabC.write( " /* %04d */ { UD_I%s %s, %s },\n" \ - % ( self.getInsnIndex(insn), insn.mnemonic + ',', opr, pfx ) ) + flag_map = {'_': 'UD_FLAG_UNCHANGED', + 'T': 'UD_FLAG_TESTED', + 'M': 'UD_FLAG_MODIFIED', + 'R': 'UD_FLAG_RESET', + 'S': 'UD_FLAG_SET', + 'U': 'UD_FLAG_UNDEFINED', + 'P': 'UD_FLAG_PRIOR'} + eflags = ", ".join(map(lambda f: flag_map[f], [flag for flag in insn.eflags])) + + self.ItabC.write( " /* %04d */ { UD_I%s %s, %s, {%s} },\n" \ + % ( self.getInsnIndex(insn), insn.mnemonic + ',', opr, pfx, eflags ) ) self.ItabC.write( "};\n" ) diff --git a/scripts/ud_opcode.py b/scripts/ud_opcode.py index c43a320..7bdbc90 100644 --- a/scripts/ud_opcode.py +++ b/scripts/ud_opcode.py @@ -30,6 +30,7 @@ class UdInsnDef: """ def __init__(self, **insnDef): self.mnemonic = insnDef['mnemonic'] + self.eflags = insnDef['eflags'] self.prefixes = insnDef['prefixes'] self.opcodes = insnDef['opcodes'] self.operands = insnDef['operands'] @@ -310,7 +311,7 @@ def __init__(self, xml): # add an invalid instruction entry without any mapping # in the opcode tables. - self.invalidInsn = UdInsnDef(mnemonic="invalid", opcodes=[], cpuid=[], + self.invalidInsn = UdInsnDef(mnemonic="invalid", eflags="___________", opcodes=[], cpuid=[], operands=[], prefixes=[]) self._insns.append(self.invalidInsn) @@ -370,6 +371,10 @@ def addInsn(self, **insnDef): # Canonicalize opcode list opcexts = insnDef['opcexts'] opcodes = list(insnDef['opcodes']) + eflags = insnDef['eflags'] if 'eflags' in insnDef else "___________" + + # TODO: REMOVE! + # print opcodes, eflags, insnDef['mnemonic'] # Re-order vex if '/vex' in opcexts: @@ -386,6 +391,7 @@ def addInsn(self, **insnDef): opcodes.append(ext + '=' + opcexts[ext]) insn = UdInsnDef(mnemonic = insnDef['mnemonic'], + eflags = insnDef['eflags'], prefixes = insnDef['prefixes'], operands = insnDef['operands'], opcodes = opcodes, @@ -458,6 +464,7 @@ def addInsnDef(self, insnDef): fn = self.addSSE2AVXInsn fn(mnemonic = insnDef['mnemonic'], + eflags = insnDef['eflags'], prefixes = insnDef['prefixes'], opcodes = opcodes, opcexts = opcexts, @@ -474,6 +481,7 @@ def addSSE2AVXInsn(self, **insnDef): # SSE ssemnemonic = insnDef['mnemonic'] + sseeflags = insnDef['eflags'] sseopcodes = insnDef['opcodes'] # remove vex opcode extensions sseopcexts = dict([(e, v) for e, v in insnDef['opcexts'].iteritems() @@ -490,6 +498,7 @@ def addSSE2AVXInsn(self, **insnDef): if not flag.startswith('avx')] self.addInsn(mnemonic = ssemnemonic, + eflags = sseeflags, prefixes = sseprefixes, opcodes = sseopcodes, opcexts = sseopcexts, @@ -498,6 +507,7 @@ def addSSE2AVXInsn(self, **insnDef): # AVX vexmnemonic = 'v' + insnDef['mnemonic'] + vexeflags = insnDef['eflags'] vexprefixes = insnDef['prefixes'] vexopcodes = ['c4'] vexopcexts = dict([(e, insnDef['opcexts'][e]) @@ -518,6 +528,7 @@ def addSSE2AVXInsn(self, **insnDef): if not flag.startswith('sse')] self.addInsn(mnemonic = vexmnemonic, + eflags = vexeflags, prefixes = vexprefixes, opcodes = vexopcodes, opcexts = vexopcexts, @@ -589,25 +600,32 @@ def parseOptableXML(xml): raise Exception("warning: invalid insn node - %s" % insnNode.localName) mnemonic = insnNode.getElementsByTagName('mnemonic')[0].firstChild.data vendor, cpuid = '', [] + global_eflags = "___________" for node in insnNode.childNodes: if node.localName == 'vendor': vendor = node.firstChild.data.split() elif node.localName == 'cpuid': cpuid = node.firstChild.data.split() + elif node.localName == 'eflags': + global_eflags = node.firstChild.data for node in insnNode.childNodes: if node.localName == 'def': + eflags = global_eflags insnDef = { 'pfx' : [] } for node in node.childNodes: if not node.localName: continue if node.localName in ('pfx', 'opc', 'opr', 'vendor', 'cpuid'): insnDef[node.localName] = node.firstChild.data.split() + elif node.localName == 'eflags': + eflags = node.firstChild.data elif node.localName == 'mode': insnDef['pfx'].extend(node.firstChild.data.split()) insns.append({'prefixes' : insnDef.get('pfx', []), 'mnemonic' : mnemonic, + 'eflags' : eflags, 'opcodes' : insnDef.get('opc', []), 'operands' : insnDef.get('opr', []), 'vendor' : insnDef.get('vendor', vendor), From 5fa744fb53f7c99a5e47d9fea09ce20eccc610ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Thu, 5 Dec 2013 09:25:54 +0100 Subject: [PATCH 02/20] Add an option to udcli to display EFLAGS information of disassembled instructions. --- udcli/udcli.c | 78 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 62 insertions(+), 16 deletions(-) diff --git a/udcli/udcli.c b/udcli/udcli.c index 9b044ca..2b3d9e7 100644 --- a/udcli/udcli.c +++ b/udcli/udcli.c @@ -73,6 +73,7 @@ static char help[] = " hexadecimal representation. Example: 0f 01 ae 00\n" " -noff : Do not display the offset of instructions.\n" " -nohex : Do not display the hexadecimal code of instructions.\n" + " -eflags : Display information on EFLAGS register.\n" " -h : Display this help message.\n" " --version: Show version.\n" "\n" @@ -87,11 +88,40 @@ unsigned char o_do_count= 0; unsigned char o_do_off = 1; unsigned char o_do_hex = 1; unsigned char o_do_x = 0; +unsigned char o_do_eflags = 0; unsigned o_vendor = UD_VENDOR_AMD; int input_hook_x(ud_t* u); int input_hook_file(ud_t* u); +void print_flag(enum ud_eflag_state flag) +{ + switch(flag) { + case UD_FLAG_UNCHANGED: printf("_"); break; + case UD_FLAG_TESTED: printf("T"); break; + case UD_FLAG_MODIFIED: printf("M"); break; + case UD_FLAG_RESET: printf("R"); break; + case UD_FLAG_SET: printf("S"); break; + case UD_FLAG_UNDEFINED: printf("U"); break; + case UD_FLAG_PRIOR: printf("P"); break; + } +} + +void print_eflags(const struct ud_eflags *state) +{ + printf("of:"); print_flag(state->of_state); printf(" "); + printf("sf:"); print_flag(state->sf_state); printf(" "); + printf("zf:"); print_flag(state->zf_state); printf(" "); + printf("af:"); print_flag(state->af_state); printf(" "); + printf("pf:"); print_flag(state->pf_state); printf(" "); + printf("cf:"); print_flag(state->cf_state); printf(" "); + printf("tf:"); print_flag(state->tf_state); printf(" "); + printf("if:"); print_flag(state->if_state); printf(" "); + printf("df:"); print_flag(state->df_state); printf(" "); + printf("nt:"); print_flag(state->nt_state); printf(" "); + printf("rf:"); print_flag(state->rf_state); +} + int main(int argc, char **argv) { char *prog_path = *argv; @@ -133,6 +163,8 @@ int main(int argc, char **argv) o_do_off = 0; else if (strcmp(*argv,"-nohex") == 0) o_do_hex = 0; + else if (strcmp(*argv,"-eflags") == 0) + o_do_eflags = 1; else if (strcmp(*argv,"-x") == 0) o_do_x = 1; else if (strcmp(*argv,"-s") == 0) @@ -209,25 +241,39 @@ int main(int argc, char **argv) ud_input_skip(&ud_obj, o_skip); } + // Note: I use another variable, because I plan to add + // other options in the future. Hence, o_do_meta holds + // the information about if we have to display any + // metadata. + unsigned char o_do_meta = o_do_eflags; + /* disassembly loop */ while (ud_disassemble(&ud_obj)) { - if (o_do_off) - printf("%016" FMT64 "x ", ud_insn_off(&ud_obj)); - if (o_do_hex) { - const char* hex1, *hex2; - hex1 = ud_insn_hex(&ud_obj); - hex2 = hex1 + 16; - printf("%-16.16s %-24s", hex1, ud_insn_asm(&ud_obj)); - if (strlen(hex1) > 16) { - printf("\n"); - if (o_do_off) - printf("%15s -", ""); - printf("%-16s", hex2); - } - } - else printf(" %-24s", ud_insn_asm(&ud_obj)); + if (o_do_off) + printf("%016" FMT64 "x ", ud_insn_off(&ud_obj)); + if (o_do_hex) { + const char* hex1, *hex2; + hex1 = ud_insn_hex(&ud_obj); + hex2 = hex1 + 16; + printf("%-16.16s %-24s", hex1, ud_insn_asm(&ud_obj)); + if (strlen(hex1) > 16) { + printf("\n"); + if (o_do_off) + printf("%15s -", ""); + printf("%-16s", hex2); + } + } + else printf(" %-24s", ud_insn_asm(&ud_obj)); + + if (o_do_meta) { + printf(" ; "); + if (o_do_eflags) { + const struct ud_eflags* eflags = ud_lookup_eflags(&ud_obj); + print_eflags(eflags); + } + } - printf("\n"); + printf("\n"); } exit(EXIT_SUCCESS); From 632344f62f368a9ff82ba66cfa6602cd211bab22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Thu, 5 Dec 2013 11:42:54 +0100 Subject: [PATCH 03/20] Add a field in the operand structure, to know if it has a signed immediate or not. --- libudis86/decode.c | 28 +++++++++++++++++++++------- libudis86/types.h | 1 + 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/libudis86/decode.c b/libudis86/decode.c index 83e8e18..ecf4d19 100644 --- a/libudis86/decode.c +++ b/libudis86/decode.c @@ -1244,13 +1244,27 @@ ud_decode(struct ud *u) u->mnemonic = u->itab_entry->mnemonic; } - /* maybe this stray segment override byte - * should be spewed out? - */ - if ( !P_SEG( u->itab_entry->prefix ) && - u->operand[0].type != UD_OP_MEM && - u->operand[1].type != UD_OP_MEM ) - u->pfx_seg = 0; + /* maybe this stray segment override byte + * should be spewed out? + */ + if ( !P_SEG( u->itab_entry->prefix ) && + u->operand[0].type != UD_OP_MEM && + u->operand[1].type != UD_OP_MEM ) + u->pfx_seg = 0; + + /* Retrieve some information about operands. */ + for (int i=0; i<4; i++) { + struct ud_operand *op = &u->operand[i]; + switch (op->type) { + case UD_OP_REG: op->signed_lval = 0; break; + case UD_OP_MEM: op->signed_lval = 0; break; + case UD_OP_IMM: op->signed_lval = (op->_oprcode == OP_sI ? 1 : 0); break; + case UD_OP_JIMM: op->signed_lval = 1; break; + case UD_OP_PTR: op->signed_lval = 0; break; + case UD_OP_CONST: op->signed_lval = 0; break; + default: break; + } + } u->insn_offset = u->pc; /* set offset of instruction */ u->asm_buf_fill = 0; /* set translation buffer index to 0 */ diff --git a/libudis86/types.h b/libudis86/types.h index e73bdf8..45163ee 100644 --- a/libudis86/types.h +++ b/libudis86/types.h @@ -186,6 +186,7 @@ struct ud_operand { uint8_t scale; uint8_t offset; union ud_lval lval; + uint8_t signed_lval; /* * internal use only */ From 5d45db83a0df04b9ef9ee002c96a2e91aa94935c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Mon, 9 Dec 2013 14:19:25 +0100 Subject: [PATCH 04/20] Update EFLAGS values for FPU instructions. --- docs/x86/optable.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/x86/optable.xml b/docs/x86/optable.xml index 66e7fc7..5c4f518 100644 --- a/docs/x86/optable.xml +++ b/docs/x86/optable.xml @@ -1538,7 +1538,7 @@ fcmovb - __T_TT_____ + _____T_____ X87 da /mod=11 /x87=00 @@ -1576,7 +1576,7 @@ fcmove - __T_TT_____ + __T________ X87 da /mod=11 /x87=08 @@ -1614,7 +1614,7 @@ fcmovbe - __T_TT_____ + __T__T_____ X87 da /mod=11 /x87=10 @@ -1652,7 +1652,7 @@ fcmovu - __T_TT_____ + ____T______ X87 da /mod=11 /x87=18 @@ -1690,7 +1690,7 @@ fcmovnb - __T_TT_____ + _____T_____ X87 db /mod=11 /x87=00 @@ -1728,7 +1728,7 @@ fcmovne - __T_TT_____ + __T________ X87 db /mod=11 /x87=08 @@ -1766,7 +1766,7 @@ fcmovnbe - __T_TT_____ + __T__T_____ X87 db /mod=11 /x87=10 @@ -1804,7 +1804,7 @@ fcmovnu - __T_TT_____ + ____T______ X87 db /mod=11 /x87=18 From 234fa3624b87aae9378eeb7962ffc90b712f35ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Mon, 9 Dec 2013 14:32:31 +0100 Subject: [PATCH 05/20] Some information about the field. --- docs/x86/optable.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/x86/optable.xml b/docs/x86/optable.xml index 5c4f518..ca9639b 100644 --- a/docs/x86/optable.xml +++ b/docs/x86/optable.xml @@ -99,6 +99,24 @@ If the above transformations do not generate the required definitions, the instructions will need to be defined separately. + + EFLAGS + The field describe the status of the EFLAGS register + once the instruction has been executed. This is an array of eleven + values, for each bit of the EFLAGS register. + + The order of the flags is OF, SF, ZF, AF, PF, CF, TF, IF, DF, NT, RF. + Each flag can have one of these values: + _ : the flag is not used + T : flag is tested + M : flag is modified according to the result of the operation + R : flag is reset (its value is 0) + S : flag is set (its value is 1) + U : flag is undefined + P : flag is set to its prior value (like push / pop) + + By default, we assume that the mask value is "___________". + --> From 7abe41dcabc5dde9d44fdbae24d8afa0d215318c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Mon, 9 Dec 2013 17:53:25 +0100 Subject: [PATCH 06/20] Add meta-information about operand access mode (read/write or both) and implicite register used or defined. --- docs/x86/avx.xml | 359 ++++++++++++++++++++ docs/x86/optable.xml | 785 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 1131 insertions(+), 13 deletions(-) diff --git a/docs/x86/avx.xml b/docs/x86/avx.xml index 9b7b12c..e74ab7a 100644 --- a/docs/x86/avx.xml +++ b/docs/x86/avx.xml @@ -1,5 +1,6 @@ vaddpd + W vex.L vex.660f 58 V H W @@ -8,6 +9,7 @@ vaddps + W vex.L vex.0f 58 V H W @@ -16,6 +18,7 @@ vaddsd + W vex.f20f 58 V H W @@ -24,6 +27,7 @@ vaddss + W vex.f30f 58 V H W @@ -32,6 +36,7 @@ vandpd + W vex.L vex.660f 54 V H W @@ -40,6 +45,7 @@ vandps + W vex.L vex.0f 54 V H W @@ -48,6 +54,7 @@ vandnpd + W vex.L vex.660f 55 V H W @@ -56,6 +63,7 @@ vandnps + W vex.L vex.0f 55 V H W @@ -64,6 +72,7 @@ vcmppd + W vex.L vex.660f c2 V W Ib @@ -72,6 +81,7 @@ vcmpps + W vex.L vex.0f c2 V W Ib @@ -80,6 +90,7 @@ vcmpsd + W vex.f20f c2 V W Ib @@ -88,6 +99,7 @@ vcmpss + W vex.f30f c2 V W Ib @@ -112,6 +124,7 @@ vcvtdq2pd + W vex.L vex.f30f e6 V H W @@ -120,6 +133,7 @@ vcvtdq2ps + W vex.L vex.0f 5b V H W @@ -128,6 +142,7 @@ vcvtpd2dq + W vex.L vex.f20f e6 V H W @@ -136,6 +151,7 @@ vcvtpd2pi + W vex.L vex.660f 2d P W @@ -144,6 +160,7 @@ vcvtpd2ps + W vex.L vex.660f 5a V H W @@ -152,6 +169,7 @@ vcvtpi2ps + W vex.L vex.0f 2a V Q @@ -160,6 +178,7 @@ vcvtpi2pd + W vex.L vex.660f 2a V Q @@ -168,6 +187,7 @@ vcvtps2dq + W vex.L vex.660f 5b V H W @@ -176,6 +196,7 @@ vcvtps2pi + W vex.L vex.0f 2d P W @@ -184,6 +205,8 @@ vcvtps2pd + W + vex.L vex.0f 5a V H W @@ -192,6 +215,7 @@ vcvtsd2si + W vex.W vex.L vex.f20f 2d Gy W @@ -200,6 +224,7 @@ vcvtsd2ss + W vex.f20f 5a V H W @@ -208,6 +233,7 @@ vcvtsi2ss + W aso vex.f30f 2a V Ey @@ -216,6 +242,7 @@ vcvtss2si + W vex.W vex.L vex.f30f 2d Gy W @@ -224,6 +251,7 @@ vcvtss2sd + W vex.f30f 5a V H W @@ -232,6 +260,7 @@ vcvttpd2pi + W vex.L vex.660f 2c P W @@ -240,6 +269,7 @@ vcvttpd2dq + W vex.L vex.660f e6 V H W @@ -248,6 +278,7 @@ vcvttps2dq + W vex.L vex.f30f 5b V H W @@ -256,6 +287,7 @@ vcvttps2pi + W vex.L vex.0f 2c P W @@ -264,6 +296,7 @@ vcvttsd2si + W vex.W vex.L vex.f20f 2c Gy W @@ -272,6 +305,7 @@ vcvtsi2sd + W aso vex.f20f 2a V Ey @@ -280,6 +314,7 @@ vcvttss2si + W vex.W vex.L vex.f30f 2c Gy W @@ -288,6 +323,7 @@ vdivpd + W vex.L vex.660f 5e V H W @@ -296,6 +332,7 @@ vdivps + W vex.L vex.0f 5e V H W @@ -304,6 +341,7 @@ vdivsd + W vex.f20f 5e V H W @@ -312,6 +350,7 @@ vdivss + W vex.f30f 5e V H W @@ -328,6 +367,7 @@ vmaxpd + W vex.L vex.660f 5f V H W @@ -336,6 +376,7 @@ vmaxps + W vex.L vex.0f 5f V H W @@ -344,6 +385,7 @@ vmaxsd + W vex.f20f 5f V H W @@ -352,6 +394,7 @@ vmaxss + W vex.f30f 5f V H W @@ -360,6 +403,7 @@ vminpd + W vex.L vex.660f 5d V H W @@ -368,6 +412,7 @@ vminps + W vex.L vex.0f 5d V H W @@ -376,6 +421,7 @@ vminsd + W vex.f20f 5d V H W @@ -384,6 +430,7 @@ vminss + W vex.f30f 5d V H W @@ -392,6 +439,7 @@ vmovapd + W vex.L vex.660f 28 V H W @@ -400,6 +448,7 @@ vmovapd + W vex.L vex.660f 29 W H V @@ -408,6 +457,7 @@ vmovaps + W vex.L vex.0f 28 V H W @@ -416,6 +466,7 @@ vmovaps + W vex.L vex.0f 29 W H V @@ -424,6 +475,7 @@ vmovd + W aso vex.L vex.660f 6e V Ey @@ -432,6 +484,7 @@ vmovd + W aso vex.L vex.0f 6e P Ey @@ -440,6 +493,7 @@ vmovd + W aso vex.L vex.660f 7e Ey V @@ -448,6 +502,7 @@ vmovd + W aso vex.L vex.0f 7e Ey P @@ -456,6 +511,7 @@ vmovhpd + W aso vex.L vex.660f 16 /mod=!11 V M @@ -464,6 +520,7 @@ vmovhpd + W aso vex.L vex.660f 17 M V @@ -472,6 +529,7 @@ vmovhps + W aso vex.L vex.0f 16 /mod=!11 V M @@ -480,6 +538,7 @@ vmovhps + W aso vex.L vex.0f 17 M V @@ -488,6 +547,7 @@ vmovlhps + W vex.L vex.0f 16 /mod=11 V U @@ -496,6 +556,7 @@ vmovlpd + W aso vex.L vex.660f 12 /mod=!11 V M @@ -504,6 +565,7 @@ vmovlpd + W aso vex.L vex.660f 13 M V @@ -512,6 +574,7 @@ vmovlps + W aso vex.L vex.0f 12 /mod=!11 V M @@ -520,6 +583,7 @@ vmovlps + W aso vex.L vex.0f 13 M V @@ -528,6 +592,7 @@ vmovhlps + W vex.L vex.0f 12 /mod=11 V U @@ -536,6 +601,7 @@ vmovmskpd + W vex.W vex.L vex.660f 50 Gd U @@ -544,6 +610,7 @@ vmovmskps + W vex.W vex.L vex.0f 50 Gd U @@ -552,6 +619,7 @@ vmovntdq + W aso vex.L vex.660f e7 M V @@ -560,6 +628,7 @@ vmovnti + W aso vex.W vex.L vex.0f c3 M Gy @@ -568,6 +637,7 @@ vmovntpd + W aso vex.L vex.660f 2b M V @@ -576,6 +646,7 @@ vmovntps + W aso vex.L vex.0f 2b M V @@ -584,6 +655,7 @@ vmovntq + W aso vex.L vex.0f e7 M V @@ -592,6 +664,7 @@ vmovq + W vex.L vex.0f 6f V W @@ -600,6 +673,7 @@ vmovq + W vex.L vex.660f d6 W H V @@ -608,6 +682,7 @@ vmovq + W vex.L vex.f30f 7e V H W @@ -616,6 +691,7 @@ vmovq + W vex.L vex.0f 7f W V @@ -624,6 +700,7 @@ vmovsd + W vex.f20f 10 V H W @@ -632,6 +709,7 @@ vmovsd + W vex.f20f 11 W H V @@ -640,6 +718,7 @@ vmovss + W vex.f30f 10 V H W @@ -648,6 +727,7 @@ vmovss + W vex.f30f 11 W H V @@ -656,6 +736,7 @@ vmovsx + W aso vex.W vex.L vex.0f be Gv Eb @@ -664,6 +745,7 @@ vmovsx + W aso vex.W vex.L vex.0f bf Gy Ew @@ -672,6 +754,7 @@ vmovupd + W vex.L vex.660f 10 V H W @@ -680,6 +763,7 @@ vmovupd + W vex.L vex.660f 11 W H V @@ -688,6 +772,7 @@ vmovups + W vex.L vex.0f 10 V H W @@ -696,6 +781,7 @@ vmovups + W vex.L vex.0f 11 W H V @@ -704,6 +790,7 @@ vmovzx + W aso vex.W vex.L vex.0f b6 Gv Eb @@ -712,6 +799,7 @@ vmovzx + W aso vex.W vex.L vex.0f b7 Gy Ew @@ -720,6 +808,7 @@ vmulpd + W vex.L vex.660f 59 V H W @@ -728,6 +817,7 @@ vmulps + W vex.L vex.0f 59 V H W @@ -736,6 +826,7 @@ vmulsd + W vex.f20f 59 V H W @@ -744,6 +835,7 @@ vmulss + W vex.f30f 59 V H W @@ -752,6 +844,7 @@ vorps + W vex.L vex.0f 56 V H W @@ -760,6 +853,7 @@ vpacksswb + W vex.L vex.660f 63 V H W @@ -768,6 +862,7 @@ vpacksswb + W vex.L vex.0f 63 V W @@ -776,6 +871,7 @@ vpackssdw + W vex.L vex.660f 6b V H W @@ -784,6 +880,7 @@ vpackssdw + W vex.L vex.0f 6b V W @@ -792,6 +889,7 @@ vpackuswb + W vex.L vex.660f 67 V H W @@ -800,6 +898,7 @@ vpackuswb + W vex.L vex.0f 67 V W @@ -808,6 +907,7 @@ vpaddb + W vex.L vex.660f fc V H W @@ -816,6 +916,7 @@ vpaddb + W vex.L vex.0f fc V W @@ -824,6 +925,7 @@ vpaddw + W vex.L vex.0f fd V W @@ -832,6 +934,7 @@ vpaddw + W vex.L vex.660f fd V H W @@ -840,6 +943,7 @@ vpaddd + W vex.L vex.0f fe V W @@ -848,6 +952,7 @@ vpaddd + W vex.L vex.660f fe V H W @@ -856,6 +961,7 @@ vpaddsb + W vex.L vex.0f ec V W @@ -864,6 +970,7 @@ vpaddsb + W vex.L vex.660f ec V H W @@ -872,6 +979,7 @@ vpaddsw + W vex.L vex.0f ed V W @@ -880,6 +988,7 @@ vpaddsw + W vex.L vex.660f ed V H W @@ -888,6 +997,7 @@ vpaddusb + W vex.L vex.0f dc V W @@ -896,6 +1006,7 @@ vpaddusb + W vex.L vex.660f dc V H W @@ -904,6 +1015,7 @@ vpaddusw + W vex.L vex.0f dd V W @@ -912,6 +1024,7 @@ vpaddusw + W vex.L vex.660f dd V H W @@ -920,6 +1033,7 @@ vpand + W vex.L vex.660f db V H W @@ -928,6 +1042,7 @@ vpand + W vex.L vex.0f db V W @@ -936,6 +1051,7 @@ vpandn + W vex.L vex.660f df V H W @@ -944,6 +1060,7 @@ vpandn + W vex.L vex.0f df V W @@ -952,6 +1069,7 @@ vpavgb + W vex.L vex.660f e0 V H W @@ -960,6 +1078,7 @@ vpavgb + W vex.L vex.0f e0 V W @@ -968,6 +1087,7 @@ vpavgw + W vex.L vex.660f e3 V H W @@ -976,6 +1096,7 @@ vpavgw + W vex.L vex.0f e3 V W @@ -984,6 +1105,7 @@ vpcmpeqb + W vex.L vex.0f 74 V W @@ -992,6 +1114,7 @@ vpcmpeqb + W vex.L vex.660f 74 V H W @@ -1000,6 +1123,7 @@ vpcmpeqw + W vex.L vex.0f 75 V W @@ -1008,6 +1132,7 @@ vpcmpeqw + W vex.L vex.660f 75 V H W @@ -1016,6 +1141,7 @@ vpcmpeqd + W vex.L vex.0f 76 V W @@ -1024,6 +1150,7 @@ vpcmpeqd + W vex.L vex.660f 76 V H W @@ -1032,6 +1159,7 @@ vpcmpgtb + W vex.L vex.660f 64 V H W @@ -1040,6 +1168,7 @@ vpcmpgtb + W vex.L vex.0f 64 V W @@ -1048,6 +1177,7 @@ vpcmpgtw + W vex.L vex.660f 65 V H W @@ -1056,6 +1186,7 @@ vpcmpgtw + W vex.L vex.0f 65 V W @@ -1064,6 +1195,7 @@ vpcmpgtd + W vex.L vex.660f 66 V H W @@ -1072,6 +1204,7 @@ vpcmpgtd + W vex.L vex.0f 66 V W @@ -1080,6 +1213,7 @@ vpextrb + W aso vex.W vex.L vex.660f3a 14 MbRv V Ib @@ -1088,6 +1222,7 @@ vpextrd + W aso vex.L vex.660f3a 16 /o=16 Ed V Ib @@ -1096,6 +1231,7 @@ vpextrd + W aso vex.L vex.660f3a 16 /o=32 Ed V Ib @@ -1104,6 +1240,7 @@ vpextrq + W aso vex.L vex.660f3a 16 /o=64 Eq V Ib @@ -1112,6 +1249,7 @@ vpextrw + W vex.W vex.L vex.660f c5 Gd U Ib @@ -1120,6 +1258,7 @@ vpextrw + W vex.W vex.L vex.0f c5 Gd N Ib @@ -1128,6 +1267,7 @@ vpinsrb + W aso vex.W vex.L vex.660f3a 20 V MbRd Ib @@ -1136,6 +1276,7 @@ vpinsrw + W aso vex.W vex.L vex.0f c4 P MwRy Ib @@ -1144,6 +1285,7 @@ vpinsrw + W aso vex.W vex.L vex.660f c4 V MwRy Ib @@ -1152,6 +1294,7 @@ vpinsrd + W aso vex.L vex.660f3a 22 /o=16 V Ed Ib @@ -1160,6 +1303,7 @@ vpinsrd + W aso vex.L vex.660f3a 22 /o=32 V Ed Ib @@ -1168,6 +1312,7 @@ vpinsrq + W aso vex.L vex.660f3a 22 /o=64 V Eq Ib @@ -1176,6 +1321,7 @@ vpmaddwd + W vex.L vex.0f f5 V W @@ -1184,6 +1330,7 @@ vpmaddwd + W vex.L vex.660f f5 V H W @@ -1192,6 +1339,7 @@ vpmaxsw + W vex.L vex.660f ee V H W @@ -1200,6 +1348,7 @@ vpmaxsw + W vex.L vex.0f ee V W @@ -1208,6 +1357,7 @@ vpmaxub + W vex.L vex.0f de V W @@ -1216,6 +1366,7 @@ vpmaxub + W vex.L vex.660f de V H W @@ -1224,6 +1375,7 @@ vpminsw + W vex.L vex.660f ea V H W @@ -1232,6 +1384,7 @@ vpminsw + W vex.L vex.0f ea V W @@ -1240,6 +1393,7 @@ vpminub + W vex.L vex.660f da V H W @@ -1248,6 +1402,7 @@ vpminub + W vex.L vex.0f da V W @@ -1256,6 +1411,7 @@ vpmovmskb + W vex.W vex.L vex.660f d7 Gd U @@ -1264,6 +1420,7 @@ vpmovmskb + W vex.W vex.L vex.0f d7 Gd N @@ -1272,6 +1429,7 @@ vpmulhuw + W vex.L vex.0f e4 V W @@ -1280,6 +1438,7 @@ vpmulhuw + W vex.L vex.660f e4 V H W @@ -1288,6 +1447,7 @@ vpmulhw + W vex.L vex.660f e5 V H W @@ -1296,6 +1456,7 @@ vpmulhw + W vex.L vex.0f e5 V W @@ -1304,6 +1465,7 @@ vpmullw + W vex.L vex.0f d5 V W @@ -1312,6 +1474,7 @@ vpmullw + W vex.L vex.660f d5 V H W @@ -1320,6 +1483,7 @@ vpop + W vex.W vex.L vex.0f a9 GS @@ -1328,6 +1492,7 @@ vpop + W vex.L vex.0f a1 FS @@ -1336,6 +1501,7 @@ vpor + W vex.L vex.660f eb V H W @@ -1344,6 +1510,7 @@ vpor + W vex.L vex.0f eb V W @@ -1448,6 +1615,7 @@ vpsadbw + W vex.L vex.660f f6 V H W @@ -1456,6 +1624,7 @@ vpsadbw + W vex.L vex.0f f6 V W @@ -1464,6 +1633,7 @@ vpshufw + W vex.L vex.0f 70 P Q Ib @@ -1472,6 +1642,7 @@ vpsllw + W vex.L vex.660f f1 V H W @@ -1480,6 +1651,7 @@ vpsllw + W vex.L vex.0f f1 V W @@ -1488,6 +1660,7 @@ vpsllw + W vex.L vex.660f 71 /reg=6 U Ib @@ -1496,6 +1669,7 @@ vpsllw + W vex.L vex.0f 71 /reg=6 N Ib @@ -1504,6 +1678,7 @@ vpslld + W vex.L vex.660f f2 V H W @@ -1512,6 +1687,7 @@ vpslld + W vex.L vex.0f f2 V W @@ -1520,6 +1696,7 @@ vpslld + W vex.L vex.660f 72 /reg=6 U Ib @@ -1528,6 +1705,7 @@ vpslld + W vex.L vex.0f 72 /reg=6 N Ib @@ -1536,6 +1714,7 @@ vpsllq + W vex.L vex.660f f3 V H W @@ -1544,6 +1723,7 @@ vpsllq + W vex.L vex.0f f3 V W @@ -1552,6 +1732,7 @@ vpsllq + W vex.L vex.660f 73 /reg=6 U Ib @@ -1560,6 +1741,7 @@ vpsllq + W vex.L vex.0f 73 /reg=6 N Ib @@ -1568,6 +1750,7 @@ vpsraw + W vex.L vex.0f e1 V W @@ -1576,6 +1759,7 @@ vpsraw + W vex.L vex.660f e1 V H W @@ -1584,6 +1768,7 @@ vpsraw + W vex.L vex.660f 71 /reg=4 U Ib @@ -1592,6 +1777,7 @@ vpsraw + W vex.L vex.0f 71 /reg=4 N Ib @@ -1600,6 +1786,7 @@ vpsrad + W vex.L vex.0f 72 /reg=4 N Ib @@ -1608,6 +1795,7 @@ vpsrad + W vex.L vex.660f e2 V H W @@ -1616,6 +1804,7 @@ vpsrad + W vex.L vex.0f e2 V W @@ -1624,6 +1813,7 @@ vpsrad + W vex.L vex.660f 72 /reg=4 U Ib @@ -1632,6 +1822,7 @@ vpsrlw + W vex.L vex.0f 71 /reg=2 N Ib @@ -1640,6 +1831,7 @@ vpsrlw + W vex.L vex.0f d1 V W @@ -1648,6 +1840,7 @@ vpsrlw + W vex.L vex.660f d1 V H W @@ -1656,6 +1849,7 @@ vpsrlw + W vex.L vex.660f 71 /reg=2 U Ib @@ -1664,6 +1858,7 @@ vpsrld + W vex.L vex.0f 72 /reg=2 N Ib @@ -1672,6 +1867,7 @@ vpsrld + W vex.L vex.0f d2 V W @@ -1680,6 +1876,7 @@ vpsrld + W vex.L vex.660f d2 V H W @@ -1688,6 +1885,7 @@ vpsrld + W vex.L vex.660f 72 /reg=2 U Ib @@ -1696,6 +1894,7 @@ vpsrlq + W vex.L vex.0f 73 /reg=2 N Ib @@ -1704,6 +1903,7 @@ vpsrlq + W vex.L vex.0f d3 V W @@ -1712,6 +1912,7 @@ vpsrlq + W vex.L vex.660f d3 V H W @@ -1720,6 +1921,7 @@ vpsrlq + W vex.L vex.660f 73 /reg=2 U Ib @@ -1728,6 +1930,7 @@ vpsubb + W vex.L vex.660f f8 V H W @@ -1736,6 +1939,7 @@ vpsubb + W vex.L vex.0f f8 V W @@ -1744,6 +1948,7 @@ vpsubw + W vex.L vex.660f f9 V H W @@ -1752,6 +1957,7 @@ vpsubw + W vex.L vex.0f f9 V W @@ -1760,6 +1966,7 @@ vpsubd + W vex.L vex.0f fa V W @@ -1768,6 +1975,7 @@ vpsubd + W vex.L vex.660f fa V H W @@ -1776,6 +1984,7 @@ vpsubsb + W vex.L vex.0f e8 V W @@ -1784,6 +1993,7 @@ vpsubsb + W vex.L vex.660f e8 V H W @@ -1792,6 +2002,7 @@ vpsubsw + W vex.L vex.0f e9 V W @@ -1800,6 +2011,7 @@ vpsubsw + W vex.L vex.660f e9 V H W @@ -1808,6 +2020,7 @@ vpsubusb + W vex.L vex.0f d8 V W @@ -1816,6 +2029,7 @@ vpsubusb + W vex.L vex.660f d8 V H W @@ -1824,6 +2038,7 @@ vpsubusw + W vex.L vex.0f d9 V W @@ -1832,6 +2047,7 @@ vpsubusw + W vex.L vex.660f d9 V H W @@ -1840,6 +2056,7 @@ vpunpckhbw + W vex.L vex.660f 68 V H W @@ -1848,6 +2065,7 @@ vpunpckhbw + W vex.L vex.0f 68 V W @@ -1856,6 +2074,7 @@ vpunpckhwd + W vex.L vex.660f 69 V H W @@ -1864,6 +2083,7 @@ vpunpckhwd + W vex.L vex.0f 69 V W @@ -1872,6 +2092,7 @@ vpunpckhdq + W vex.L vex.660f 6a V H W @@ -1880,6 +2101,7 @@ vpunpckhdq + W vex.L vex.0f 6a V W @@ -1888,6 +2110,7 @@ vpunpcklbw + W vex.L vex.660f 60 V H W @@ -1896,6 +2119,7 @@ vpunpcklbw + W vex.L vex.0f 60 V W @@ -1904,6 +2128,7 @@ vpunpcklwd + W vex.L vex.660f 61 V H W @@ -1912,6 +2137,7 @@ vpunpcklwd + W vex.L vex.0f 61 V W @@ -1920,6 +2146,7 @@ vpunpckldq + W vex.L vex.660f 62 V H W @@ -1928,6 +2155,7 @@ vpunpckldq + W vex.L vex.0f 62 V W @@ -1952,6 +2180,7 @@ vpxor + W vex.L vex.660f ef V H W @@ -1960,6 +2189,7 @@ vpxor + W vex.L vex.0f ef V W @@ -1968,6 +2198,7 @@ vrcpps + W vex.L vex.0f 53 V H W @@ -1976,6 +2207,7 @@ vrcpss + W vex.f30f 53 V H W @@ -1984,6 +2216,7 @@ vrsqrtps + W vex.L vex.0f 52 V H W @@ -1992,6 +2225,7 @@ vrsqrtss + W vex.f30f 52 V H W @@ -2000,6 +2234,7 @@ vshufpd + W vex.L vex.660f c6 V W Ib @@ -2008,6 +2243,7 @@ vshufps + W vex.L vex.0f c6 V W Ib @@ -2016,6 +2252,7 @@ vsqrtps + W vex.L vex.0f 51 V H W @@ -2024,6 +2261,7 @@ vsqrtpd + W vex.L vex.660f 51 V H W @@ -2032,6 +2270,7 @@ vsqrtsd + W vex.f20f 51 V H W @@ -2040,6 +2279,7 @@ vsqrtss + W vex.f30f 51 V H W @@ -2048,6 +2288,7 @@ vsubpd + W vex.L vex.660f 5c V H W @@ -2056,6 +2297,7 @@ vsubps + W vex.L vex.0f 5c V H W @@ -2064,6 +2306,7 @@ vsubsd + W vex.f20f 5c V H W @@ -2072,6 +2315,7 @@ vsubss + W vex.f30f 5c V H W @@ -2096,6 +2340,7 @@ vunpckhpd + W vex.L vex.660f 15 V H W @@ -2104,6 +2349,7 @@ vunpckhps + W vex.L vex.0f 15 V H W @@ -2112,6 +2358,7 @@ vunpcklps + W vex.L vex.0f 14 V H W @@ -2120,6 +2367,7 @@ vunpcklpd + W vex.L vex.660f 14 V H W @@ -2128,6 +2376,7 @@ vxorpd + W vex.L vex.660f 57 V H W @@ -2136,6 +2385,7 @@ vxorps + W vex.L vex.0f 57 V H W @@ -2144,6 +2394,7 @@ vmovdqa + W vex.L vex.660f 7f W H V @@ -2152,6 +2403,7 @@ vmovdqa + W vex.L vex.660f 6f V H W @@ -2160,6 +2412,7 @@ vmovdq2q + W vex.L vex.f20f d6 P U @@ -2168,6 +2421,7 @@ vmovdqu + W vex.L vex.f30f 6f V H W @@ -2176,6 +2430,7 @@ vmovdqu + W vex.L vex.f30f 7f W H V @@ -2184,6 +2439,7 @@ vmovq2dq + W vex.L vex.f30f d6 V N @@ -2192,6 +2448,7 @@ vpaddq + W vex.L vex.0f d4 V W @@ -2200,6 +2457,7 @@ vpaddq + W vex.L vex.660f d4 V H W @@ -2208,6 +2466,7 @@ vpsubq + W vex.L vex.660f fb V H W @@ -2216,6 +2475,7 @@ vpsubq + W vex.L vex.0f fb V W @@ -2224,6 +2484,7 @@ vpmuludq + W vex.L vex.0f f4 V W @@ -2232,6 +2493,7 @@ vpmuludq + W vex.L vex.660f f4 V H W @@ -2240,6 +2502,7 @@ vpshufhw + W vex.L vex.f30f 70 V W Ib @@ -2248,6 +2511,7 @@ vpshuflw + W vex.L vex.f20f 70 V W Ib @@ -2256,6 +2520,7 @@ vpshufd + W vex.L vex.660f 70 V W Ib @@ -2264,6 +2529,7 @@ vpslldq + W vex.L vex.660f 73 /reg=7 U Ib @@ -2272,6 +2538,7 @@ vpsrldq + W vex.L vex.660f 73 /reg=3 U Ib @@ -2280,6 +2547,7 @@ vpunpckhqdq + W vex.L vex.660f 6d V H W @@ -2288,6 +2556,7 @@ vpunpcklqdq + W vex.L vex.660f 6c V H W @@ -2296,6 +2565,7 @@ vaddsubpd + W vex.L vex.660f d0 V H W @@ -2304,6 +2574,7 @@ vaddsubps + W vex.L vex.f20f d0 V H W @@ -2312,6 +2583,7 @@ vhaddpd + W vex.L vex.660f 7c V H W @@ -2320,6 +2592,7 @@ vhaddps + W vex.L vex.f20f 7c V H W @@ -2328,6 +2601,7 @@ vhsubpd + W vex.L vex.660f 7d V H W @@ -2336,6 +2610,7 @@ vhsubps + W vex.L vex.f20f 7d V H W @@ -2344,6 +2619,7 @@ vmovddup + W vex.L vex.f20f 12 /mod=11 V H W @@ -2352,6 +2628,7 @@ vmovddup + W vex.L vex.f20f 12 /mod=!11 V H W @@ -2360,6 +2637,7 @@ vmovshdup + W vex.L vex.f30f 16 /mod=11 V H W @@ -2368,6 +2646,7 @@ vmovshdup + W vex.L vex.f30f 16 /mod=!11 V H W @@ -2376,6 +2655,7 @@ vmovsldup + W vex.L vex.f30f 12 /mod=11 V H W @@ -2384,6 +2664,7 @@ vmovsldup + W vex.L vex.f30f 12 /mod=!11 V H W @@ -2392,6 +2673,7 @@ vpabsb + W vex.L vex.0f38 1c V W @@ -2400,6 +2682,7 @@ vpabsb + W vex.L vex.660f38 1c V H W @@ -2408,6 +2691,7 @@ vpabsw + W vex.L vex.0f38 1d V W @@ -2416,6 +2700,7 @@ vpabsw + W vex.L vex.660f38 1d V H W @@ -2424,6 +2709,7 @@ vpabsd + W vex.0f38 1e V W @@ -2432,6 +2718,7 @@ vpabsd + W vex.660f38 1e V H W @@ -2440,6 +2727,7 @@ vpsignb + W vex.L vex.0f38 00 V W @@ -2448,6 +2736,7 @@ vpsignb + W vex.L vex.660f38 00 V H W @@ -2456,6 +2745,7 @@ vphaddw + W vex.L vex.0f38 01 V W @@ -2464,6 +2754,7 @@ vphaddw + W vex.L vex.660f38 01 V H W @@ -2472,6 +2763,7 @@ vphaddd + W vex.L vex.0f38 02 V W @@ -2480,6 +2772,7 @@ vphaddd + W vex.L vex.660f38 02 V H W @@ -2488,6 +2781,7 @@ vphaddsw + W vex.L vex.0f38 03 V W @@ -2496,6 +2790,7 @@ vphaddsw + W vex.L vex.660f38 03 V H W @@ -2504,6 +2799,7 @@ vpmaddubsw + W vex.L vex.0f38 04 V W @@ -2512,6 +2808,7 @@ vpmaddubsw + W vex.L vex.660f38 04 V H W @@ -2520,6 +2817,7 @@ vphsubw + W vex.L vex.0f38 05 V W @@ -2528,6 +2826,7 @@ vphsubw + W vex.L vex.660f38 05 V H W @@ -2536,6 +2835,7 @@ vphsubd + W vex.L vex.0f38 06 V W @@ -2544,6 +2844,7 @@ vphsubd + W vex.L vex.660f38 06 V H W @@ -2552,6 +2853,7 @@ vphsubsw + W vex.L vex.0f38 07 V W @@ -2560,6 +2862,7 @@ vphsubsw + W vex.L vex.660f38 07 V H W @@ -2568,6 +2871,7 @@ vpsignb + W vex.L vex.0f38 08 V W @@ -2576,6 +2880,7 @@ vpsignb + W vex.L vex.660f38 08 V H W @@ -2584,6 +2889,7 @@ vpsignd + W vex.L vex.0f38 0a V W @@ -2592,6 +2898,7 @@ vpsignd + W vex.L vex.660f38 0a V H W @@ -2600,6 +2907,7 @@ vpsignw + W vex.L vex.0f38 09 V W @@ -2608,6 +2916,7 @@ vpsignw + W vex.L vex.660f38 09 V H W @@ -2616,6 +2925,7 @@ vpmulhrsw + W vex.L vex.0f38 0b V W @@ -2624,6 +2934,7 @@ vpmulhrsw + W vex.L vex.660f38 0b V H W @@ -2632,6 +2943,7 @@ vpalignr + W vex.L vex.0f3a 0f P Q Ib @@ -2640,6 +2952,7 @@ vpalignr + W vex.L vex.660f3a 0f V W Ib @@ -2648,6 +2961,7 @@ vpblendvb + W vex.L vex.660f38 10 V H W @@ -2656,6 +2970,7 @@ vpmuldq + W vex.L vex.660f38 28 V H W @@ -2664,6 +2979,7 @@ vpminsb + W vex.L vex.660f38 38 V H W @@ -2672,6 +2988,7 @@ vpminsd + W vex.660f38 39 V H W @@ -2680,6 +2997,7 @@ vpminuw + W vex.L vex.660f38 3a V H W @@ -2688,6 +3006,7 @@ vpminud + W vex.L vex.660f38 3b V H W @@ -2696,6 +3015,7 @@ vpmaxsb + W vex.L vex.660f38 3c V H W @@ -2704,6 +3024,7 @@ vpmaxsd + W vex.660f38 3d V H W @@ -2712,6 +3033,7 @@ vpmaxud + W vex.L vex.660f38 3f V H W @@ -2720,6 +3042,7 @@ vpmaxuw + W vex.L vex.660f38 3e V H W @@ -2728,6 +3051,7 @@ vpmulld + W vex.L vex.660f38 40 V H W @@ -2736,6 +3060,7 @@ vphminposuw + W vex.L vex.660f38 41 V H W @@ -2744,6 +3069,7 @@ vroundps + W vex.L vex.660f3a 08 V W Ib @@ -2752,6 +3078,7 @@ vroundpd + W vex.L vex.660f3a 09 V W Ib @@ -2760,6 +3087,7 @@ vroundss + W vex.660f3a 0a V W Ib @@ -2768,6 +3096,7 @@ vroundsd + W vex.660f3a 0b V W Ib @@ -2776,6 +3105,7 @@ vblendpd + W vex.L vex.660f3a 0d V W Ib @@ -2784,6 +3114,7 @@ vpblendw + W vex.L vex.660f3a 0e V W Ib @@ -2792,6 +3123,7 @@ vblendps + W vex.L vex.660f3a 0c V W Ib @@ -2800,6 +3132,7 @@ vblendvpd + W vex.L vex.660f38 15 V H W @@ -2808,6 +3141,7 @@ vblendvps + W vex.L vex.660f38 14 V H W @@ -2816,6 +3150,7 @@ vdpps + W vex.L vex.660f3a 40 V W Ib @@ -2824,6 +3159,7 @@ vdppd + W vex.L vex.660f3a 41 V W Ib @@ -2832,6 +3168,7 @@ vmpsadbw + W vex.L vex.660f3a 42 V W Ib @@ -2840,6 +3177,7 @@ vextractps + W aso vex.W vex.L vex.660f3a 17 MdRy V Ib @@ -2848,6 +3186,7 @@ vinsertps + W aso vex.L vex.660f3a 21 V Md Ib @@ -2856,6 +3195,7 @@ vmovntdqa + W aso vex.L vex.660f38 2a V Mo @@ -2864,6 +3204,7 @@ vpackusdw + W vex.L vex.660f38 2b V H W @@ -2872,6 +3213,7 @@ vpmovsxbw + W aso vex.L vex.660f38 20 V MqU @@ -2880,6 +3222,7 @@ vpmovsxbd + W aso vex.L vex.660f38 21 V MdU @@ -2888,6 +3231,7 @@ vpmovsxbq + W aso vex.L vex.660f38 22 V MwU @@ -2896,6 +3240,7 @@ vpmovsxwd + W aso vex.L vex.660f38 23 V MqU @@ -2904,6 +3249,7 @@ vpmovsxwq + W aso vex.L vex.660f38 24 V MdU @@ -2912,6 +3258,7 @@ vpmovsxdq + W aso vex.L vex.660f38 25 V MqU @@ -2920,6 +3267,7 @@ vpmovzxbw + W aso vex.L vex.660f38 30 V MqU @@ -2928,6 +3276,7 @@ vpmovzxbd + W aso vex.L vex.660f38 31 V MdU @@ -2936,6 +3285,7 @@ vpmovzxbq + W aso vex.L vex.660f38 32 V MwU @@ -2944,6 +3294,7 @@ vpmovzxwd + W aso vex.L vex.660f38 33 V MqU @@ -2952,6 +3303,7 @@ vpmovzxwq + W aso vex.L vex.660f38 34 V MdU @@ -2960,6 +3312,7 @@ vpmovzxdq + W aso vex.L vex.660f38 35 V MqU @@ -2968,6 +3321,7 @@ vpcmpeqq + W vex.L vex.660f38 29 V H W @@ -2984,6 +3338,7 @@ vpcmpestri + W vex.L vex.660f3a 61 V W Ib @@ -2992,6 +3347,7 @@ vpcmpestrm + W vex.L vex.660f3a 60 V W Ib @@ -3000,6 +3356,7 @@ vpcmpgtq + W vex.L vex.660f38 37 V H W @@ -3008,6 +3365,7 @@ vpcmpistri + W vex.L vex.660f3a 63 V W Ib @@ -3016,6 +3374,7 @@ vpcmpistrm + W vex.L vex.660f3a 62 V W Ib diff --git a/docs/x86/optable.xml b/docs/x86/optable.xml index ca9639b..1120753 100644 --- a/docs/x86/optable.xml +++ b/docs/x86/optable.xml @@ -122,6 +122,8 @@ aaa UUUMUM_____ + al + al 37 /m=!64 @@ -129,6 +131,8 @@ aad + ax + ax UMMUMU_____ d5 /m=!64 @@ -138,6 +142,8 @@ aam + ax + ax UMMUMU_____ d4 /m=!64 @@ -147,6 +153,8 @@ aas + al + al UUUMUM_____ 3f /m=!64 @@ -155,6 +163,7 @@ adc + RW MMMMMM_____ aso rexr rexx rexb @@ -210,6 +219,7 @@ add + RW MMMMMM_____ aso rexr rexx rexb @@ -265,6 +275,7 @@ addpd + RW aso rexr rexx rexb vexl /sse=66 0f 58 @@ -275,6 +286,7 @@ addps + RW aso rexr rexx rexb vexl 0f 58 @@ -285,6 +297,7 @@ addsd + RW aso rexr rexx rexb /sse=f2 0f 58 @@ -295,6 +308,7 @@ addss + RW aso rexr rexx rexb /sse=f3 0f 58 @@ -305,6 +319,7 @@ addsubpd + RW aso rexr rexx rexb /sse=66 0f d0 @@ -315,6 +330,7 @@ addsubps + RW aso rexr rexx rexb /sse=f2 0f d0 @@ -325,6 +341,7 @@ aesdec + RW aso rexr rexx rexb /sse=66 0f 38 de @@ -335,6 +352,7 @@ aesdeclast + RW aso rexr rexx rexb /sse=66 0f 38 df @@ -345,6 +363,7 @@ aesenc + RW aesni aso rexr rexx rexb @@ -356,6 +375,7 @@ aesenclast + RW aesni avx aso rexr rexx rexb @@ -366,6 +386,7 @@ aesimc + W aso rexr rexx rexb /sse=66 0f 38 db @@ -376,6 +397,7 @@ aeskeygenassist + W aso rexr rexx rexb /sse=66 0f 3a df @@ -386,6 +408,7 @@ and + RW RMMUMR_____ aso rexr rexx rexb @@ -441,6 +464,7 @@ andpd + RW aso rexr rexx rexb vexl /sse=66 0f 54 @@ -451,6 +475,7 @@ andps + RW aso rexr rexx rexb 0f 54 @@ -461,6 +486,7 @@ andnpd + RW aso rexr rexx rexb /sse=66 0f 55 @@ -471,6 +497,7 @@ andnps + RW aso rexr rexx rexb 0f 55 @@ -481,6 +508,7 @@ arpl + W __M________ aso @@ -491,6 +519,7 @@ movsxd + W aso oso rexw rexx rexr rexb 63 /m=64 @@ -500,6 +529,9 @@ call + rsp + rsp + rip ___________ aso oso rexw rexr rexx rexb @@ -532,6 +564,8 @@ cbw + al + ax ___________ oso rexw @@ -541,6 +575,8 @@ cwde + ax + eax oso rexw 98 /o=32 @@ -549,6 +585,8 @@ cdqe + eax + rax oso rexw 98 /o=64 @@ -573,6 +611,7 @@ clflush + W aso rexw rexr rexx rexb 0f ae /reg=7 /mod=!11 @@ -598,6 +637,8 @@ clts + cr0 + cr0 ___________ 0f 06 @@ -614,6 +655,7 @@ cmovo + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -624,6 +666,7 @@ cmovno + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -634,6 +677,7 @@ cmovb + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -644,6 +688,7 @@ cmovae + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -654,6 +699,7 @@ cmovz + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -664,6 +710,7 @@ cmovnz + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -674,6 +721,7 @@ cmovbe + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -684,6 +732,7 @@ cmova + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -694,6 +743,7 @@ cmovs + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -704,6 +754,7 @@ cmovns + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -714,6 +765,7 @@ cmovp + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -724,6 +776,7 @@ cmovnp + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -734,6 +787,7 @@ cmovl + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -744,6 +798,7 @@ cmovge + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -754,6 +809,7 @@ cmovle + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -764,6 +820,7 @@ cmovg + W TTT_TT_____ aso oso rexw rexr rexx rexb @@ -829,6 +886,7 @@ cmppd + RW MMMMMM_____ aso rexr rexx rexb vexl @@ -840,6 +898,7 @@ cmpps + RW MMMMMM_____ aso rexr rexx rexb vexl @@ -851,6 +910,10 @@ cmpsb + rsi + rdi + rsi + rdi MMMMMM_____ repz seg @@ -860,6 +923,10 @@ cmpsw + rsi + rdi + rsi + rdi MMMMMM_____ repz oso rexw seg @@ -871,10 +938,15 @@ cmpsd MMMMMM_____ + rsi + rdi + rsi + rdi repz oso rexw seg a7 /o=32 + RW aso rexr rexx rexb /sse=f2 0f c2 V H W Ib @@ -884,6 +956,10 @@ cmpsq + rsi + rdi + rsi + rdi MMMMMM_____ repz oso rexw seg @@ -893,6 +969,7 @@ cmpss + RW MMMMMM_____ aso rexr rexx rexb @@ -904,6 +981,9 @@ cmpxchg + rax + rax + RW MMMMMM_____ aso rexr rexx rexb @@ -919,6 +999,11 @@ cmpxchg8b + rax + rdx + rax + rdx + RW __M________ aso rexr rexx rexb @@ -934,6 +1019,11 @@ cmpxchg16b + rax + rdx + rax + rdx + RW __M________ aso rexr rexx rexb @@ -966,6 +1056,11 @@ cpuid + eax + eax + ebx + ecx + edx ___________ 0f a2 @@ -974,6 +1069,7 @@ cvtdq2pd + W aso rexr rexx rexb vexl /sse=f3 0f e6 @@ -984,6 +1080,7 @@ cvtdq2ps + W aso rexr rexx rexb 0f 5b @@ -994,6 +1091,7 @@ cvtpd2dq + W aso rexr rexx rexb vexl /sse=f2 0f e6 @@ -1004,6 +1102,7 @@ cvtpd2pi + W aso rexr rexx rexb /sse=66 0f 2d @@ -1013,6 +1112,7 @@ cvtpd2ps + W aso rexr rexx rexb vexl /sse=66 0f 5a @@ -1023,6 +1123,7 @@ cvtpi2ps + W aso rexr rexx rexb 0f 2a @@ -1032,6 +1133,7 @@ cvtpi2pd + W aso rexr rexx rexb /sse=66 0f 2a @@ -1041,6 +1143,7 @@ cvtps2dq + W aso rexr rexx rexb vexl /sse=66 0f 5b @@ -1051,6 +1154,7 @@ cvtps2pd + W aso rexr rexx rexb vexl 0f 5a @@ -1061,6 +1165,7 @@ cvtps2pi + W aso rexr rexx rexb 0f 2d @@ -1070,6 +1175,7 @@ cvtsd2si + W aso rexw rexr rexx rexb /sse=f2 0f 2d @@ -1080,6 +1186,7 @@ cvtsd2ss + W aso rexr rexx rexb /sse=f2 0f 5a @@ -1090,6 +1197,7 @@ cvtsi2sd + W aso rexw rexr rexx rexb /sse=f2 0f 2a @@ -1100,6 +1208,7 @@ cvtsi2ss + W aso rexw rexr rexx rexb /sse=f3 0f 2a @@ -1110,6 +1219,7 @@ cvtss2sd + W aso rexr rexx rexb /sse=f3 0f 5a @@ -1120,6 +1230,7 @@ cvtss2si + W aso rexw rexr rexx rexb /sse=f3 0f 2d @@ -1130,6 +1241,7 @@ cvttpd2dq + W aso rexr rexx rexb vexl /sse=66 0f e6 @@ -1140,6 +1252,7 @@ cvttpd2pi + W aso rexr rexx rexb /sse=66 0f 2c @@ -1149,6 +1262,7 @@ cvttps2dq + W aso rexr rexx rexb vexl /sse=f3 0f 5b @@ -1159,6 +1273,7 @@ cvttps2pi + W aso rexr rexx rexb 0f 2c @@ -1168,6 +1283,7 @@ cvttsd2si + W aso rexw rexr rexx rexb /sse=f2 0f 2c @@ -1178,6 +1294,7 @@ cvttss2si + W aso rexw rexr rexx rexb /sse=f3 0f 2c @@ -1188,6 +1305,9 @@ cwd + ax + ax + dx ___________ oso rexw @@ -1197,6 +1317,9 @@ cdq + eax + eax + edx oso rexw 99 /o=32 @@ -1205,6 +1328,9 @@ cqo + rax + rax + rdx oso rexw 99 /o=64 @@ -1213,6 +1339,8 @@ daa + al + al UMMMMM_____ 27 /m=!64 @@ -1222,6 +1350,8 @@ das + al + al UMMMMM_____ 2f /m=!64 @@ -1231,6 +1361,7 @@ dec + RW MMMMMM_____ oso @@ -1286,13 +1417,20 @@ div + W UUUUUU_____ + ax + dx + ax + dx aso oso rexw rexr rexx rexb f7 /reg=6 Ev + ax + ax aso rexw rexr rexx rexb f6 /reg=6 Eb @@ -1301,6 +1439,7 @@ divpd + RW aso rexr rexx rexb vexl /sse=66 0f 5e @@ -1311,6 +1450,7 @@ divps + RW aso rexr rexx rexb 0f 5e @@ -1321,6 +1461,7 @@ divsd + RW aso rexr rexx rexb /sse=f2 0f 5e @@ -1331,6 +1472,7 @@ divss + RW aso rexr rexx rexb /sse=f3 0f 5e @@ -1341,6 +1483,7 @@ dppd + RW aso rexr rexx rexb /sse=66 0f 3a 41 @@ -1351,6 +1494,7 @@ dpps + RW aso rexr rexx rexb vexl /sse=66 0f 3a 40 @@ -1378,6 +1522,7 @@ extractps + W aso rexr rexw rexx rexb /sse=66 0f 3a 17 @@ -1388,6 +1533,8 @@ f2xm1 + st0 + st0 X87 d9 /mod=11 /x87=30 @@ -1396,6 +1543,8 @@ fabs + st0 + st0 X87 d9 /mod=11 /x87=21 @@ -3849,11 +3998,17 @@ idiv UUUUUU_____ + rax + rdx + rax + rdx aso oso rexw rexr rexx rexb f7 /reg=7 Ev + rax + rax aso rexw rexr rexx rexb f6 /reg=7 Eb @@ -3862,6 +4017,7 @@ in + W ___________ e4 @@ -3885,6 +4041,7 @@ imul + RW MUUUUM_____ aso oso rexw rexr rexx rexb @@ -3892,11 +4049,16 @@ Gv Ev + al + ax aso rexw rexr rexx rexb f6 /reg=5 Eb + rax + rax + rdx aso oso rexw rexr rexx rexb f7 /reg=5 Ev @@ -3915,6 +4077,7 @@ inc + RW MMMMM______ oso @@ -3970,6 +4133,9 @@ insb + dx + rdi + rdi ________T__ rep seg @@ -3979,6 +4145,9 @@ insw + dx + rdi + rdi ________T__ rep oso seg @@ -3988,6 +4157,9 @@ insd + dx + rdi + rdi ________T__ rep oso seg @@ -4110,6 +4282,7 @@ jo + rip T__________ 70 @@ -4125,6 +4298,7 @@ jno + rip T__________ 71 @@ -4140,6 +4314,7 @@ jb + rip _____T_____ 72 @@ -4155,6 +4330,7 @@ jae + rip _____T_____ 73 @@ -4170,6 +4346,7 @@ jz + rip __T________ 74 @@ -4185,6 +4362,7 @@ jnz + rip __T________ 75 @@ -4200,6 +4378,7 @@ jbe + rip __T__T_____ 76 @@ -4215,6 +4394,7 @@ ja + rip __T__T_____ 77 @@ -4230,6 +4410,7 @@ js + rip _T_________ 78 @@ -4245,6 +4426,7 @@ jns + rip _T_________ 79 @@ -4260,6 +4442,7 @@ jp + rip ____T______ 7a @@ -4275,6 +4458,7 @@ jnp + rip ____T______ 7b @@ -4290,6 +4474,7 @@ jl + rip TT_________ 7c @@ -4305,6 +4490,7 @@ jge + rip TT_________ 7d @@ -4320,6 +4506,7 @@ jle + rip TTT________ 7e @@ -4335,6 +4522,7 @@ jg + rip TTT________ 7f @@ -4350,6 +4538,7 @@ jcxz + rip ___________ aso @@ -4360,6 +4549,7 @@ jecxz + rip ___________ aso @@ -4370,6 +4560,7 @@ jrcxz + rip ___________ aso @@ -4380,6 +4571,7 @@ jmp + rip ___________ aso oso rexw rexr rexx rexb @@ -4412,6 +4604,7 @@ lahf + ah ___________ 9f @@ -4420,6 +4613,7 @@ lar + W __M________ aso oso rexw rexr rexx rexb @@ -4439,6 +4633,7 @@ lds + W ___________ aso oso @@ -4449,6 +4644,7 @@ lea + W ___________ aso oso rexw rexr rexx rexb @@ -4459,6 +4655,8 @@ les + W + es ___________ aso oso @@ -4469,6 +4667,8 @@ lfs + W + fs ___________ aso oso rexw rexr rexx rexb @@ -4479,6 +4679,8 @@ lgs + W + fs ___________ aso oso rexw rexr rexx rexb @@ -4499,6 +4701,8 @@ lss + W + ss aso oso rexw rexr rexx rexb 0f b2 @@ -4508,6 +4712,9 @@ leave + rbp + rbp + rsp ___________ c9 @@ -4564,6 +4771,7 @@ lmsw + cr0 ___________ aso rexr rexx rexb @@ -4587,6 +4795,9 @@ lodsb + rsi + al + rsi ________T__ rep seg @@ -4596,6 +4807,9 @@ lodsw + rsi + ax + rsi ________T__ rep seg oso rexw @@ -4605,6 +4819,9 @@ lodsd + rsi + eax + rsi ________T__ rep seg oso rexw @@ -4614,6 +4831,9 @@ lodsq + rsi + rax + rsi ________T__ rep seg oso rexw @@ -4650,6 +4870,7 @@ lsl + W __M________ aso oso rexw rexr rexx rexb @@ -4670,6 +4891,7 @@ maskmovq + rdi aso rexr rexx rexb 0f f7 /mod=11 @@ -4679,6 +4901,7 @@ maxpd + RW aso rexr rexx rexb vexl /sse=66 0f 5f @@ -4689,6 +4912,7 @@ maxps + RW aso rexr rexx rexb vexl 0f 5f @@ -4699,6 +4923,7 @@ maxsd + RW aso rexr rexx rexb /sse=f2 0f 5f @@ -4709,6 +4934,7 @@ maxss + RW aso rexr rexx rexb /sse=f3 0f 5f @@ -4747,6 +4973,7 @@ minpd + RW aso rexr rexx rexb vexl /sse=66 0f 5d @@ -4757,6 +4984,7 @@ minps + RW aso rexr rexx rexb 0f 5d @@ -4767,6 +4995,7 @@ minsd + RW aso rexr rexx rexb /sse=f2 0f 5d @@ -4777,6 +5006,7 @@ minss + RW aso rexr rexx rexb /sse=f3 0f 5d @@ -4787,6 +5017,8 @@ monitor + rax + rdx ___________ 0f 01 /reg=1 /mod=11 /rm=0 @@ -4802,6 +5034,7 @@ mov + W ___________ aso rexw rexr rexx rexb @@ -4969,6 +5202,7 @@ movapd + W aso rexr rexx rexb vexl /sse=66 0f 28 @@ -4985,6 +5219,7 @@ movaps + W aso rexr rexx rexb vexl 0f 28 @@ -5001,6 +5236,7 @@ movd + W aso rexw rexr rexx rexb 0f 6e /o=16 @@ -5054,6 +5290,7 @@ movhpd + W aso rexr rexx rexb /sse=66 0f 16 /mod=!11 @@ -5070,6 +5307,7 @@ movhps + W aso rexr rexx rexb 0f 16 /mod=!11 @@ -5086,6 +5324,7 @@ movlhps + W aso rexr rexx rexb 0f 16 /mod=11 @@ -5096,6 +5335,7 @@ movlpd + W aso rexr rexx rexb /sse=66 0f 12 /mod=!11 @@ -5111,6 +5351,7 @@ movlps + W aso rexr rexx rexb 0f 12 /mod=!11 @@ -5126,6 +5367,7 @@ movhlps + W aso rexr rexx rexb 0f 12 /mod=11 @@ -5136,6 +5378,7 @@ movmskpd + W oso rexr rexb vexl /sse=66 0f 50 @@ -5146,6 +5389,7 @@ movmskps + W oso rexr rexb 0f 50 @@ -5156,6 +5400,7 @@ movntdq + W aso rexr rexx rexb vexl /sse=66 0f e7 @@ -5166,6 +5411,7 @@ movnti + W aso rexw rexr rexx rexb 0f c3 @@ -5175,6 +5421,7 @@ movntpd + W aso rexr rexx rexb vexl /sse=66 0f 2b @@ -5185,6 +5432,7 @@ movntps + W aso rexr rexx rexb vexl 0f 2b @@ -5195,6 +5443,7 @@ movntq + W aso rexr rexx rexb 0f e7 @@ -5204,6 +5453,7 @@ movq + W aso rexw rexr rexx rexb 0f 6e /o=64 @@ -5256,6 +5506,9 @@ movsb + W + rsi + rsi ________T__ rep seg @@ -5265,6 +5518,9 @@ movsw + W + rsi + rsi ________T__ rep seg oso rexw @@ -5274,6 +5530,9 @@ movsd + W + rsi + rsi ________T__ rep seg oso rexw @@ -5295,6 +5554,9 @@ movsq + W + rsi + rsi ________T__ rep seg oso rexw @@ -5304,6 +5566,7 @@ movss + W ________T__ aso rexr rexx rexb @@ -5321,6 +5584,7 @@ movsx + W ___________ aso oso rexw rexr rexx rexb @@ -5336,6 +5600,7 @@ movupd + W aso rexr rexx rexb vexl /sse=66 0f 10 @@ -5352,6 +5617,7 @@ movups + W aso rexr rexx rexb vexl 0f 10 @@ -5368,6 +5634,7 @@ movzx + W ___________ aso oso rexw rexr rexx rexb @@ -5385,11 +5652,16 @@ mul MUUUUM_____ + al + ax aso rexw rexr rexx rexb f6 /reg=4 Eb + rax + rax + rdx aso oso rexw rexr rexx rexb f7 /reg=4 Ev @@ -5398,6 +5670,7 @@ mulpd + RW aso rexr rexx rexb vexl /sse=66 0f 59 @@ -5408,6 +5681,7 @@ mulps + RW aso rexr rexx rexb vexl 0f 59 @@ -5418,6 +5692,7 @@ mulsd + RW aso rexr rexx rexb /sse=f2 0f 59 @@ -5428,6 +5703,7 @@ mulss + RW aso rexr rexx rexb /sse=f3 0f 59 @@ -5446,6 +5722,7 @@ neg + RW MMMMMM_____ aso rexw rexr rexx rexb @@ -5501,6 +5778,7 @@ not + RW ___________ aso rexw rexr rexx rexb @@ -5516,6 +5794,7 @@ or + RW RMMUMR_____ aso rexr rexx rexb @@ -5570,6 +5849,7 @@ orpd + RW aso rexr rexx rexb vexl /sse=66 0f 56 @@ -5613,6 +5893,8 @@ outsb + rsi + rsi ________T__ rep seg @@ -5622,6 +5904,8 @@ outsw + rsi + rsi ________T__ rep oso seg @@ -5631,6 +5915,8 @@ outsd + rsi + rsi ________T__ rep oso seg @@ -5640,6 +5926,7 @@ packsswb + RW aso rexr rexx rexb vexl /sse=66 0f 63 @@ -5656,6 +5943,7 @@ packssdw + RW aso rexr rexx rexb vexl /sse=66 0f 6b @@ -5672,6 +5960,7 @@ packuswb + RW aso rexr rexx rexb vexl /sse=66 0f 67 @@ -5688,6 +5977,7 @@ paddb + RW aso rexr rexx rexb vexl /sse=66 0f fc @@ -5704,6 +5994,7 @@ paddw + RW aso rexr rexx rexb 0f fd @@ -5720,6 +6011,7 @@ paddd + RW aso rexr rexx rexb 0f fe @@ -5737,6 +6029,7 @@ paddsb + RW aso rexr rexx rexb 0f ec @@ -5752,6 +6045,7 @@ paddsw + RW aso rexr rexx rexb 0f ed @@ -5767,6 +6061,7 @@ paddusb + RW aso rexr rexx rexb 0f dc @@ -5782,6 +6077,7 @@ paddusw + RW aso rexr rexx rexb 0f dd @@ -5797,6 +6093,7 @@ pand + RW aso rexr rexx rexb /sse=66 0f db @@ -5812,6 +6109,7 @@ pandn + RW aso rexr rexx rexb /sse=66 0f df @@ -5827,6 +6125,7 @@ pavgb + RW aso rexr rexx rexb /sse=66 0f e0 @@ -5842,6 +6141,7 @@ pavgw + RW aso rexr rexx rexb /sse=66 0f e3 @@ -5857,6 +6157,7 @@ pcmpeqb + RW aso rexr rexx rexb 0f 74 @@ -5872,6 +6173,7 @@ pcmpeqw + RW aso rexr rexx rexb 0f 75 @@ -5887,6 +6189,7 @@ pcmpeqd + RW aso rexr rexx rexb 0f 76 @@ -5902,6 +6205,7 @@ pcmpgtb + RW aso rexr rexx rexb /sse=66 0f 64 @@ -5917,6 +6221,7 @@ pcmpgtw + RW aso rexr rexx rexb /sse=66 0f 65 @@ -5932,6 +6237,7 @@ pcmpgtd + RW aso rexr rexx rexb /sse=66 0f 66 @@ -5947,6 +6253,7 @@ pextrb + W aso rexx rexr rexb /sse=66 0f 3a 14 /vexw=0 @@ -5958,6 +6265,7 @@ pextrd + W aso rexr rexx rexw rexb /sse=66 0f 3a 16 /o=16 /vexw=0 @@ -5974,6 +6282,7 @@ pextrq + W aso rexr rexw rexb /sse=66 0f 3a 16 /o=64 /vexw=1 @@ -5985,6 +6294,7 @@ pextrw + W aso rexw rexr rexb /sse=66 0f c5 @@ -6006,6 +6316,7 @@ pinsrb + W aso rexw rexr rexx rexb /sse=66 0f 3a 20 @@ -6016,6 +6327,7 @@ pinsrw + W aso rexw rexr rexx rexb 0f c4 @@ -6033,6 +6345,7 @@ pinsrd + W aso rexw rexr rexx rexb /sse=66 0f 3a 22 /o=16 @@ -6050,6 +6363,7 @@ pinsrq + W aso oso rexw rexr rexx rexb /sse=66 0f 3a 22 /o=64 @@ -6060,6 +6374,7 @@ vpinsrb + W aso rexw rexr rexx rexb /vex=66_0f3a 20 /vexw=0 /vexl=0 @@ -6070,6 +6385,7 @@ vpinsrd + W aso oso rexw rexr rexx rexb /vex=66_0f3a 22 /m=!64 /vexw=0 /vexl=0 @@ -6087,6 +6403,7 @@ vpinsrq + W aso oso rexw rexr rexx rexb /vex=66_0f3a 22 /m=64 /vexw=1 /vexl=0 @@ -6098,6 +6415,7 @@ pmaddwd + RW aso rexr rexx rexb 0f f5 @@ -6113,6 +6431,7 @@ pmaxsw + RW aso rexr rexx rexb /sse=66 0f ee @@ -6128,6 +6447,7 @@ pmaxub + RW aso rexr rexx rexb 0f de @@ -6143,6 +6463,7 @@ pminsw + RW aso rexr rexx rexb /sse=66 0f ea @@ -6158,6 +6479,7 @@ pminub + RW aso rexr rexx rexb /sse=66 0f da @@ -6173,6 +6495,7 @@ pmovmskb + W oso rexr rexw rexb /sse=66 0f d7 /vexl=0 @@ -6188,6 +6511,7 @@ pmulhuw + RW aso rexr rexx rexb 0f e4 @@ -6203,6 +6527,7 @@ pmulhw + RW aso rexr rexx rexb /sse=66 0f e5 @@ -6218,6 +6543,7 @@ pmullw + RW aso rexr rexx rexb 0f d5 @@ -6233,6 +6559,9 @@ pop + W + rsp + rsp ___________ 07 /m=!64 @@ -6315,6 +6644,15 @@ popa + di + si + bp + bx + dx + cx + ax + rdp + rsp ___________ oso @@ -6325,6 +6663,15 @@ popad + edi + esi + ebp + ebx + edx + ecx + eax + rdp + rsp ___________ oso @@ -6335,6 +6682,8 @@ popfw + rsp + rsp PPPPPPPPPP_ oso @@ -6344,6 +6693,8 @@ popfd + rsp + rsp PPPPPPPPPP_ oso @@ -6353,6 +6704,8 @@ popfq + rsp + rsp PPPPPPPPPP_ oso @@ -6368,6 +6721,7 @@ por + RW aso rexr rexx rexb /sse=66 0f eb @@ -6463,6 +6817,7 @@ psadbw + RW aso rexr rexx rexb /sse=66 0f f6 @@ -6478,6 +6833,7 @@ pshufw + W aso rexr rexx rexb 0f 70 @@ -6487,6 +6843,7 @@ psllw + RW aso rexr rexx rexb /sse=66 0f f1 @@ -6512,6 +6869,7 @@ pslld + RW aso rexr rexx rexb /sse=66 0f f2 @@ -6537,6 +6895,7 @@ psllq + RW aso rexr rexx rexb /sse=66 0f f3 @@ -6562,6 +6921,7 @@ psraw + RW aso rexr rexx rexb 0f e1 @@ -6587,6 +6947,7 @@ psrad + RW 0f 72 /reg=4 N Ib @@ -6612,6 +6973,7 @@ psrlw + RW 0f 71 /reg=2 N Ib @@ -6637,6 +6999,7 @@ psrld + RW 0f 72 /reg=2 N Ib @@ -6662,6 +7025,7 @@ psrlq + RW 0f 73 /reg=2 N Ib @@ -6687,6 +7051,7 @@ psubb + RW aso rexr rexx rexb /sse=66 0f f8 @@ -6702,6 +7067,7 @@ psubw + RW aso rexr rexx rexb /sse=66 0f f9 @@ -6717,6 +7083,7 @@ psubd + RW aso rexr rexx rexb 0f fa @@ -6732,6 +7099,7 @@ psubsb + RW aso rexr rexx rexb 0f e8 @@ -6747,6 +7115,7 @@ psubsw + RW aso rexr rexx rexb 0f e9 @@ -6762,6 +7131,7 @@ psubusb + RW aso rexr rexx rexb 0f d8 @@ -6777,6 +7147,7 @@ psubusw + RW aso rexr rexx rexb 0f d9 @@ -6792,6 +7163,7 @@ punpckhbw + RW aso rexr rexx rexb /sse=66 0f 68 @@ -6807,6 +7179,7 @@ punpckhwd + RW aso rexr rexx rexb /sse=66 0f 69 @@ -6822,6 +7195,7 @@ punpckhdq + RW aso rexr rexx rexb /sse=66 0f 6a @@ -6837,6 +7211,7 @@ punpcklbw + RW aso rexr rexx rexb /sse=66 0f 60 @@ -6852,6 +7227,7 @@ punpcklwd + RW aso rexr rexx rexb /sse=66 0f 61 @@ -6867,6 +7243,7 @@ punpckldq + RW aso rexr rexx rexb /sse=66 0f 62 @@ -6882,6 +7259,7 @@ pi2fw + W aso rexr rexx rexb 0f 0f /3dnow=0c @@ -6891,6 +7269,7 @@ pi2fd + W aso rexr rexx rexb 0f 0f /3dnow=0d @@ -6900,6 +7279,7 @@ pf2iw + W aso rexr rexx rexb 0f 0f /3dnow=1c @@ -6909,6 +7289,7 @@ pf2id + W aso rexr rexx rexb 0f 0f /3dnow=1d @@ -6918,6 +7299,7 @@ pfnacc + RW aso rexr rexx rexb 0f 0f /3dnow=8a @@ -6927,6 +7309,7 @@ pfpnacc + RW aso rexr rexx rexb 0f 0f /3dnow=8e @@ -6936,6 +7319,7 @@ pfcmpge + RW aso rexr rexx rexb 0f 0f /3dnow=90 @@ -6945,6 +7329,7 @@ pfmin + RW aso rexr rexx rexb 0f 0f /3dnow=94 @@ -6954,6 +7339,7 @@ pfrcp + W aso rexr rexx rexb 0f 0f /3dnow=96 @@ -6963,6 +7349,7 @@ pfrsqrt + W aso rexr rexx rexb 0f 0f /3dnow=97 @@ -6972,6 +7359,7 @@ pfsub + RW aso rexr rexx rexb 0f 0f /3dnow=9a @@ -6981,6 +7369,7 @@ pfadd + RW aso rexr rexx rexb 0f 0f /3dnow=9e @@ -6990,6 +7379,7 @@ pfcmpgt + RW aso rexr rexx rexb 0f 0f /3dnow=a0 @@ -6999,6 +7389,7 @@ pfmax + RW aso rexr rexx rexb 0f 0f /3dnow=a4 @@ -7008,6 +7399,7 @@ pfrcpit1 + W aso rexr rexx rexb 0f 0f /3dnow=a6 @@ -7017,6 +7409,7 @@ pfrsqit1 + W aso rexr rexx rexb 0f 0f /3dnow=a7 @@ -7026,6 +7419,7 @@ pfsubr + RW aso rexr rexx rexb 0f 0f /3dnow=aa @@ -7035,6 +7429,7 @@ pfacc + RW aso rexr rexx rexb 0f 0f /3dnow=ae @@ -7044,6 +7439,7 @@ pfcmpeq + RW aso rexr rexx rexb 0f 0f /3dnow=b0 @@ -7053,6 +7449,7 @@ pfmul + RW aso rexr rexx rexb 0f 0f /3dnow=b4 @@ -7062,6 +7459,7 @@ pfrcpit2 + W aso rexr rexx rexb 0f 0f /3dnow=b6 @@ -7071,6 +7469,7 @@ pmulhrw + RW aso rexr rexx rexb 0f 0f /3dnow=b7 @@ -7080,6 +7479,7 @@ pswapd + W aso rexr rexx rexb 0f 0f /3dnow=bb @@ -7089,6 +7489,7 @@ pavgusb + RW aso rexr rexx rexb 0f 0f /3dnow=bf @@ -7098,6 +7499,8 @@ push + rsp + rsp ___________ 06 /m=!64 @@ -7197,6 +7600,15 @@ pusha + ax + cx + dx + bx + bp + si + di + rsp + rsp ___________ oso @@ -7207,6 +7619,15 @@ pushad + eax + ecx + edx + ebx + ebp + esi + edi + rsp + rsp ___________ oso @@ -7217,6 +7638,8 @@ pushfw + rsp + rsp ___________ oso @@ -7231,6 +7654,8 @@ pushfd + rsp + rsp ___________ oso @@ -7240,6 +7665,8 @@ pushfq + rsp + rsp ___________ oso rexw @@ -7255,6 +7682,7 @@ pxor + RW aso rexr rexx rexb /sse=66 0f ef @@ -7270,6 +7698,7 @@ rcl + RW U____M_____ aso rexw rexr rexx rexb @@ -7307,6 +7736,7 @@ rcr + RW U____M_____ M____M_____ @@ -7344,6 +7774,7 @@ rol + RW U____M_____ aso rexw rexr rexx rexb @@ -7381,6 +7812,7 @@ ror + RW U____M_____ M____M_____ @@ -7418,6 +7850,7 @@ rcpps + W aso rexr rexx rexb vexl 0f 53 @@ -7428,6 +7861,7 @@ rcpss + W aso rexr rexx rexb /sse=f3 0f 53 @@ -7438,6 +7872,9 @@ rdmsr + ecx + rdx + rax ___________ 0f 32 @@ -7446,6 +7883,9 @@ rdpmc + ecx + rdx + rax ___________ 0f 33 @@ -7454,6 +7894,8 @@ rdtsc + rdx + rax ___________ 0f 31 @@ -7462,6 +7904,9 @@ rdtscp + ecx + edx + eax amd 0f 01 /reg=7 /mod=11 /rm=1 @@ -7470,6 +7915,8 @@ repne + rcx + rcx ___________ f2 @@ -7478,6 +7925,8 @@ rep + rcx + rcx ___________ f3 @@ -7486,6 +7935,8 @@ ret + rsp + rsp ___________ c2 @@ -7498,6 +7949,8 @@ retf + rsp + rsp ca Iw @@ -7517,6 +7970,7 @@ rsqrtps + W aso rexr rexx rexb vexl 0f 52 @@ -7527,6 +7981,7 @@ rsqrtss + W aso rexr rexx rexb /sse=f3 0f 52 @@ -7537,6 +7992,7 @@ sahf + ah _PPPPP_____ 9e @@ -7545,11 +8001,13 @@ sal + RW MMM_MM_____ salc + RW d6 /m=!64 inv64 @@ -7558,6 +8016,7 @@ sar + RW _MM_MM_____ MMM_MM_____ @@ -7595,6 +8054,7 @@ shl + RW _MM_MM_____ aso rexw rexr rexx rexb @@ -7664,6 +8124,7 @@ shr + RW _MM_MM_____ aso oso rexw rexr rexx rexb @@ -7701,6 +8162,7 @@ sbb + W MMMMMM_____ aso rexr rexx rexb @@ -7723,10 +8185,14 @@ Gv Ev + al + al 1c AL Ib + eax + eax oso rexw 1d rAX sIz @@ -7756,6 +8222,9 @@ scasb + al + rdi + rdi MMMMMM_____ repz @@ -7765,6 +8234,9 @@ scasw + ax + rdi + rdi MMMMMM_____ repz oso rexw @@ -7774,6 +8246,9 @@ scasd + eax + rdi + rdi MMMMMM_____ repz oso rexw @@ -7783,6 +8258,9 @@ scasq + rax + rdi + rdi MMMMMM_____ repz oso rexw @@ -7792,6 +8270,7 @@ seto + W TTT_TT_____ aso rexr rexx rexb @@ -7802,6 +8281,7 @@ setno + W TTT_TT_____ aso rexr rexx rexb @@ -7812,6 +8292,7 @@ setb + W TTT_TT_____ aso rexr rexx rexb @@ -7822,6 +8303,7 @@ setae + W TTT_TT_____ aso rexr rexx rexb @@ -7832,6 +8314,7 @@ setz + W TTT_TT_____ aso rexr rexx rexb @@ -7842,6 +8325,7 @@ setnz + W TTT_TT_____ aso rexr rexx rexb @@ -7852,6 +8336,7 @@ setbe + W TTT_TT_____ aso rexr rexx rexb @@ -7862,6 +8347,7 @@ seta + W TTT_TT_____ aso rexr rexx rexb @@ -7872,6 +8358,7 @@ sets + W TTT_TT_____ aso rexr rexx rexb @@ -7882,6 +8369,7 @@ setns + W TTT_TT_____ aso rexr rexx rexb @@ -7892,6 +8380,7 @@ setp + W TTT_TT_____ aso rexr rexx rexb @@ -7902,6 +8391,7 @@ setnp + W TTT_TT_____ aso rexr rexx rexb @@ -7912,6 +8402,7 @@ setl + W TTT_TT_____ aso rexr rexx rexb @@ -7922,6 +8413,7 @@ setge + W TTT_TT_____ aso rexr rexx rexb @@ -7932,6 +8424,7 @@ setle + W TTT_TT_____ aso rexr rexx rexb @@ -7942,6 +8435,7 @@ setg + W TTT_TT_____ aso rexr rexx rexb @@ -7990,6 +8484,7 @@ shld + RW UMMUMM_____ aso oso rexw rexr rexx rexb @@ -8005,6 +8500,7 @@ shrd + RW UMMUMM_____ aso oso rexw rexr rexx rexb @@ -8020,6 +8516,7 @@ shufpd + RW aso rexr rexx rexb vexl /sse=66 0f c6 @@ -8030,6 +8527,7 @@ shufps + RW aso rexr rexx rexb 0f c6 @@ -8040,6 +8538,7 @@ sidt + W ___________ aso rexr rexx rexb @@ -8050,6 +8549,7 @@ sldt + W ___________ aso oso rexr rexw rexx rexb @@ -8060,6 +8560,7 @@ smsw + W ___________ aso oso rexr rexw rexx rexb @@ -8075,6 +8576,7 @@ sqrtps + W aso rexr rexx rexb vexl 0f 51 @@ -8085,6 +8587,7 @@ sqrtpd + W aso rexr rexx rexb /sse=66 0f 51 @@ -8095,6 +8598,7 @@ sqrtsd + W aso rexr rexx rexb /sse=f2 0f 51 @@ -8105,6 +8609,7 @@ sqrtss + W aso rexr rexx rexb /sse=f3 0f 51 @@ -8147,6 +8652,15 @@ skinit + rax + rbx + rcx + rdx + rsi + rdi + rbp + rsp + cr0 amd 0f 01 /reg=3 /mod=11 /rm=6 @@ -8155,6 +8669,7 @@ stmxcsr + W aso rexw rexr rexx rexb 0f ae /mod=!11 /reg=3 @@ -8165,6 +8680,9 @@ stosb + al + rdi + rdi ___________ rep seg @@ -8174,6 +8692,9 @@ stosw + ax + rdi + rdi ___________ rep seg oso rexw @@ -8183,6 +8704,9 @@ stosd + eax + rdi + rdi ___________ rep seg oso rexw @@ -8192,6 +8716,9 @@ stosq + rax + rdi + rdi ___________ rep seg oso rexw @@ -8211,6 +8738,7 @@ sub + RW MMMMMM_____ aso rexr rexx rexb @@ -8266,6 +8794,7 @@ subpd + RW aso rexr rexx rexb vexl /sse=66 0f 5c @@ -8276,6 +8805,7 @@ subps + RW aso rexr rexx rexb vexl 0f 5c @@ -8286,6 +8816,7 @@ subsd + RW aso rexr rexx rexb /sse=f2 0f 5c @@ -8296,6 +8827,7 @@ subss + RW aso rexr rexx rexb /sse=f3 0f 5c @@ -8306,6 +8838,7 @@ swapgs + gs 0f 01 /reg=7 /mod=11 /rm=0 @@ -8313,6 +8846,11 @@ syscall + rip + rcx + r11 + rip + MMMMMMMMMMM 0f 05 @@ -8320,6 +8858,9 @@ sysenter + rsp + rip + MMMMMMMMMMM 0f 34 /m=!64 @@ -8331,6 +8872,9 @@ sysexit + rsp + rip + MMMMMMMMMMM 0f 35 /m=!64 @@ -8342,6 +8886,9 @@ sysret + rcx + rip + MMMMMMMMMMM 0f 07 @@ -8423,6 +8970,7 @@ unpckhpd + RW aso rexr rexx rexb vexl /sse=66 0f 15 @@ -8433,6 +8981,7 @@ unpckhps + RW aso rexr rexx rexb 0f 15 @@ -8443,6 +8992,7 @@ unpcklps + RW aso rexr rexx rexb 0f 14 @@ -8453,6 +9003,7 @@ unpcklpd + RW aso rexr rexx rexb vexl /sse=66 0f 14 @@ -8491,6 +9042,7 @@ rdrand + W oso rexr rexw rexx rexb 0f c7 /mod=11 /reg=6 @@ -8635,6 +9187,8 @@ wrmsr + edx + eax ___________ 0f 30 @@ -8643,6 +9197,8 @@ xadd + RW + W MMMMMM_____ aso oso rexr rexx rexb @@ -8658,6 +9214,8 @@ xchg + RW + RW ___________ aso rexr rexx rexb @@ -8713,6 +9271,9 @@ xgetbv + ecx + edx + eax 0f 01 /mod=11 /reg=2 /rm=0 @@ -8720,6 +9281,9 @@ xlatb + al + ebx + al ___________ rexw seg @@ -8729,6 +9293,7 @@ xor + RW RMMUMR_____ aso rexr rexx rexb @@ -8784,6 +9349,7 @@ xorpd + RW aso rexr rexx rexb vexl /sse=66 0f 57 @@ -8794,6 +9360,7 @@ xorps + RW aso rexr rexx rexb 0f 57 @@ -8804,6 +9371,13 @@ xcryptecb + eax + edx + ebx + rsi + rdi + rsi + rdi 0f a7 /mod=11 /rm=0 /reg=1 @@ -8811,6 +9385,13 @@ xcryptcbc + eax + edx + ebx + rsi + rdi + rsi + rdi 0f a7 /mod=11 /rm=0 /reg=2 @@ -8818,6 +9399,13 @@ xcryptctr + eax + edx + ebx + rsi + rdi + rsi + rdi 0f a7 /mod=11 /rm=0 /reg=3 @@ -8825,6 +9413,13 @@ xcryptcfb + eax + edx + ebx + rsi + rdi + rsi + rdi 0f a7 /mod=11 /rm=0 /reg=4 @@ -8832,6 +9427,13 @@ xcryptofb + eax + edx + ebx + rsi + rdi + rsi + rdi 0f a7 /mod=11 /rm=0 /reg=5 @@ -8839,31 +9441,43 @@ xrstor - - aso rexw rexr rexx rexb - 0f ae /reg=5 /mod=!11 - M - + edx + eax + + aso rexw rexr rexx rexb + 0f ae /reg=5 /mod=!11 + M + xsave - - aso rexw rexr rexx rexb - 0f ae /reg=4 /mod=!11 - M - + edx + eax + + aso rexw rexr rexx rexb + 0f ae /reg=4 /mod=!11 + M + xsetbv - - 0f 01 /mod=11 /reg=2 /rm=1 - + edx + eax + + 0f 01 /mod=11 /reg=2 /rm=1 + xsha1 + eax + esi + edi + eax + esi + edi 0f a6 /mod=11 /rm=0 /reg=1 @@ -8871,6 +9485,12 @@ xsha256 + eax + esi + edi + eax + esi + edi 0f a6 /mod=11 /rm=0 /reg=2 @@ -8878,6 +9498,10 @@ xstore + edx + edi + eax + edi 0f a7 /mod=11 /rm=0 /reg=0 @@ -8885,6 +9509,7 @@ pclmulqdq + RW aso rexr rexx rexb /sse=66 0f 3a 44 @@ -8911,6 +9536,7 @@ movdqa + W aso rexr rexx rexb vexl /sse=66 0f 7f @@ -8926,6 +9552,7 @@ maskmovdqu + rdi aso rexr rexx rexb /sse=66 0f f7 /mod=11 @@ -8936,6 +9563,7 @@ movdq2q + W aso rexb /sse=f2 0f d6 @@ -8945,6 +9573,7 @@ movdqu + W aso rexr rexx rexb vexl /sse=f3 0f 6f @@ -8960,6 +9589,7 @@ movq2dq + W aso rexr /sse=f3 0f d6 @@ -8969,6 +9599,7 @@ paddq + RW aso rexr rexx rexb 0f d4 @@ -8984,6 +9615,7 @@ psubq + RW aso rexr rexx rexb /sse=66 0f fb @@ -8999,6 +9631,7 @@ pmuludq + RW aso rexr rexx rexb 0f f4 @@ -9013,6 +9646,7 @@ pshufhw + W aso rexr rexx rexb /sse=f3 0f 70 @@ -9023,6 +9657,7 @@ pshuflw + W aso rexr rexx rexb /sse=f2 0f 70 @@ -9033,6 +9668,7 @@ pshufd + W aso rexr rexx rexb /sse=66 0f 70 @@ -9043,6 +9679,7 @@ pslldq + RW rexb /sse=66 0f 73 /reg=7 @@ -9053,6 +9690,7 @@ psrldq + RW rexb /sse=66 0f 73 /reg=3 @@ -9063,6 +9701,7 @@ punpckhqdq + RW aso rexr rexx rexb /sse=66 0f 6d @@ -9073,6 +9712,7 @@ punpcklqdq + RW aso rexr rexx rexb /sse=66 0f 6c @@ -9083,6 +9723,7 @@ haddpd + RW aso rexr rexx rexb vexl /sse=66 0f 7c @@ -9093,6 +9734,7 @@ haddps + RW aso rexr rexx rexb vexl /sse=f2 0f 7c @@ -9103,6 +9745,7 @@ hsubpd + RW aso rexr rexx rexb vexl /sse=66 0f 7d @@ -9113,6 +9756,7 @@ hsubps + RW aso rexr rexx rexb vexl /sse=f2 0f 7d @@ -9123,6 +9767,7 @@ insertps + W aso rexr rexw rexx rexb /sse=66 0f 3a 21 @@ -9133,6 +9778,7 @@ lddqu + W aso rexr rexx rexb vexl /sse=f2 0f f0 @@ -9143,6 +9789,7 @@ movddup + W aso rexr rexx rexb /sse=f2 0f 12 /mod=11 @@ -9158,6 +9805,7 @@ movshdup + W aso rexr rexx rexb vexl /sse=f3 0f 16 /mod=11 @@ -9174,6 +9822,7 @@ movsldup + W aso rexr rexx rexb vexl /sse=f3 0f 12 /mod=11 @@ -9194,6 +9843,7 @@ pabsb + W aso rexr rexx rexb 0f 38 1c @@ -9210,6 +9860,7 @@ pabsw + W aso rexr rexx rexb 0f 38 1d @@ -9226,6 +9877,7 @@ pabsd + W aso rexr rexx rexb 0f 38 1e @@ -9242,6 +9894,7 @@ pshufb + RW aso rexr rexx rexb 0f 38 00 @@ -9257,6 +9910,7 @@ phaddw + RW aso rexr rexx rexb 0f 38 01 @@ -9272,6 +9926,7 @@ phaddd + RW aso rexr rexx rexb 0f 38 02 @@ -9287,6 +9942,7 @@ phaddsw + RW aso rexr rexx rexb 0f 38 03 @@ -9302,6 +9958,7 @@ pmaddubsw + RW aso rexr rexx rexb 0f 38 04 @@ -9317,6 +9974,7 @@ phsubw + RW aso rexr rexx rexb 0f 38 05 @@ -9332,6 +9990,7 @@ phsubd + RW aso rexr rexx rexb 0f 38 06 @@ -9347,6 +10006,7 @@ phsubsw + RW aso rexr rexx rexb 0f 38 07 @@ -9362,6 +10022,7 @@ psignb + RW aso rexr rexx rexb 0f 38 08 @@ -9377,6 +10038,7 @@ psignd + RW aso rexr rexx rexb 0f 38 0a @@ -9392,6 +10054,7 @@ psignw + RW aso rexr rexx rexb 0f 38 09 @@ -9407,6 +10070,7 @@ pmulhrsw + RW aso rexr rexx rexb 0f 38 0b @@ -9422,6 +10086,7 @@ palignr + RW aso rexr rexx rexb 0f 3a 0f @@ -9441,6 +10106,7 @@ pblendvb + RW aso rexr rexx rexb /sse=66 0f 38 10 @@ -9451,6 +10117,7 @@ pmuldq + RW aso rexr rexx rexb /sse=66 0f 38 28 @@ -9461,6 +10128,7 @@ pminsb + RW aso rexr rexx rexb /sse=66 0f 38 38 @@ -9471,6 +10139,7 @@ pminsd + RW aso rexr rexx rexb /sse=66 0f 38 39 @@ -9481,6 +10150,7 @@ pminuw + RW aso rexr rexx rexb /sse=66 0f 38 3a @@ -9491,6 +10161,7 @@ pminud + RW aso rexr rexx rexb /sse=66 0f 38 3b @@ -9501,6 +10172,7 @@ pmaxsb + RW aso rexr rexx rexb /sse=66 0f 38 3c @@ -9511,6 +10183,7 @@ pmaxsd + RW aso rexr rexx rexb /sse=66 0f 38 3d @@ -9521,6 +10194,7 @@ pmaxud + RW aso rexr rexx rexb /sse=66 0f 38 3f @@ -9531,6 +10205,7 @@ pmaxuw + RW aso rexr rexx rexb /sse=66 0f 38 3e @@ -9541,6 +10216,7 @@ pmulld + RW aso rexr rexx rexb /sse=66 0f 38 40 @@ -9551,6 +10227,7 @@ phminposuw + W aso rexr rexx rexb /sse=66 0f 38 41 @@ -9561,6 +10238,7 @@ roundps + W aso rexr rexx rexb vexl /sse=66 0f 3a 08 @@ -9571,6 +10249,7 @@ roundpd + W aso rexr rexx rexb vexl /sse=66 0f 3a 09 @@ -9581,6 +10260,7 @@ roundss + W aso rexr rexx rexb /sse=66 0f 3a 0a @@ -9591,6 +10271,7 @@ roundsd + W aso rexr rexx rexb /sse=66 0f 3a 0b @@ -9601,6 +10282,7 @@ blendpd + RW aso rexr rexx rexb vexl /sse=66 0f 3a 0d @@ -9611,6 +10293,7 @@ blendps + RW aso rexr rexx rexb /sse=66 0f 3a 0c @@ -9621,6 +10304,7 @@ blendvpd + RW aso rexr rexx rexb /sse=66 0f 38 15 @@ -9631,6 +10315,7 @@ blendvps + RW aso rexr rexx rexb /sse=66 0f 38 14 @@ -9651,6 +10336,7 @@ bsf + W UUMUUU_____ aso oso rexw rexr rexx rexb @@ -9661,6 +10347,7 @@ bsr + W UUMUUU_____ aso oso rexw rexr rexx rexb @@ -9671,6 +10358,7 @@ bswap + RW ___________ oso rexw rexb @@ -9731,6 +10419,7 @@ btc + RW UUUUUM_____ aso oso rexw rexr rexx rexb @@ -9746,6 +10435,7 @@ btr + RW UUUUUM_____ aso oso rexw rexr rexx rexb @@ -9761,6 +10451,7 @@ bts + RW UUUUUM_____ aso oso rexw rexr rexx rexb @@ -9776,6 +10467,7 @@ pblendw + RW aso rexr rexx rexb /sse=66 0f 3a 0e @@ -9786,6 +10478,7 @@ mpsadbw + RW aso rexr rexx rexb vexl /sse=66 0f 3a 42 @@ -9796,6 +10489,7 @@ movntdqa + W aso rexr rexw rexx rexb vexl /sse=66 0f 38 2a @@ -9806,6 +10500,7 @@ packusdw + RW aso rexr rexw rexx rexb vexl /sse=66 0f 38 2b @@ -9816,6 +10511,7 @@ pmovsxbw + W aso rexr rexw rexx rexb /sse=66 0f 38 20 @@ -9826,6 +10522,7 @@ pmovsxbd + W aso rexr rexw rexx rexb /sse=66 0f 38 21 @@ -9836,6 +10533,7 @@ pmovsxbq + W aso rexr rexw rexx rexb /sse=66 0f 38 22 @@ -9846,6 +10544,7 @@ pmovsxwd + W aso rexr rexw rexx rexb /sse=66 0f 38 23 @@ -9856,6 +10555,7 @@ pmovsxwq + W aso rexr rexw rexx rexb /sse=66 0f 38 24 @@ -9866,6 +10566,7 @@ pmovsxdq + W aso rexr rexw rexx rexb /sse=66 0f 38 25 @@ -9876,6 +10577,7 @@ pmovzxbw + W aso rexr rexw rexx rexb /sse=66 0f 38 30 @@ -9886,6 +10588,7 @@ pmovzxbd + W aso rexr rexw rexx rexb /sse=66 0f 38 31 @@ -9896,6 +10599,7 @@ pmovzxbq + W aso rexr rexw rexx rexb /sse=66 0f 38 32 @@ -9906,6 +10610,7 @@ pmovzxwd + W aso rexr rexw rexx rexb /sse=66 0f 38 33 @@ -9916,6 +10621,7 @@ pmovzxwq + W aso rexr rexw rexx rexb /sse=66 0f 38 34 @@ -9926,6 +10632,7 @@ pmovzxdq + W aso rexr rexw rexx rexb /sse=66 0f 38 35 @@ -9946,6 +10653,7 @@ popcnt + W RRMRRR_____ aso oso rexr rexw rexx rexb @@ -10017,6 +10725,7 @@ movbe + W aso oso rexr rexw rexx rexb 0f 38 f0 @@ -10033,6 +10742,7 @@ crc32 + RW aso oso rexr rexw rexx rexb /sse=f2 0f 38 f0 @@ -10053,6 +10763,7 @@ vbroadcastss + W aso rexr rexx rexb vexl /vex=66_0f38 18 /vexw=0 @@ -10063,6 +10774,7 @@ vbroadcastsd + W aso rexr rexx rexb vexl /vex=66_0f38 19 /vexw=0 /vexl=1 @@ -10073,6 +10785,7 @@ vextractf128 + W aso rexr rexx rexb vexl /vex=66_0f3a 19 /vexw=0 /vexl=1 @@ -10083,6 +10796,7 @@ vinsertf128 + W aso rexr rexx rexb vexl /vex=66_0f3a 18 /vexw=0 /vexl=1 @@ -10093,6 +10807,7 @@ vmaskmovps + W aso rexr rexx rexb vexl /vex=66_0f38 2c /vexw=0 @@ -10109,6 +10824,7 @@ vmaskmovpd + W aso rexr rexx rexb vexl /vex=66_0f38 2d /vexw=0 @@ -10125,6 +10841,7 @@ vpermilpd + W aso rexr rexx rexb vexl /vex=66_0f38 0d /vexw=0 @@ -10141,6 +10858,7 @@ vpermilps + W aso rexr rexx rexb vexl /vex=66_0f38 0c /vexw=0 @@ -10157,6 +10875,7 @@ vperm2f128 + W aso rexr rexx rexb vexl /vex=66_0f3a 06 /vexw=0 /vexl=1 @@ -10187,6 +10906,22 @@ vzeroupper + ymm0 + ymm1 + ymm2 + ymm3 + ymm4 + ymm5 + ymm6 + ymm7 + ymm8 + ymm9 + ymm10 + ymm11 + ymm12 + ymm13 + ymm14 + ymm15 /vex=0f 77 /vexl=0 avx @@ -10195,6 +10930,22 @@ vzeroall + ymm0 + ymm1 + ymm2 + ymm3 + ymm4 + ymm5 + ymm6 + ymm7 + ymm8 + ymm9 + ymm10 + ymm11 + ymm12 + ymm13 + ymm14 + ymm15 /vex=0f 77 /vexl=1 avx @@ -10203,6 +10954,7 @@ vblendvpd + W aso rexr rexx rexb vexl /vex=66_0f3a 4b /vexw=0 @@ -10213,6 +10965,7 @@ vblendvps + W aso rexr rexx rexb vexl /vex=66_0f3a 4a /vexw=0 @@ -10223,6 +10976,7 @@ vmovsd + W aso rexr rexx rexb /vex=f2_0f 10 /mod=11 @@ -10251,6 +11005,7 @@ vmovss + W aso rexr rexx rexb /vex=f3_0f 10 /mod=11 @@ -10279,6 +11034,7 @@ vpblendvb + W aso rexr rexx rexb /vex=66_0f3a 4c /vexw=0 @@ -10289,6 +11045,7 @@ vpsllw + W aso rexr rexx rexb /vex=66_0f f1 /vexl=0 @@ -10305,6 +11062,7 @@ vpslld + W aso rexr rexx rexb /vex=66_0f f2 /vexl=0 @@ -10321,6 +11079,7 @@ vpsllq + W aso rexr rexx rexb /vex=66_0f f3 /vexl=0 From c053e98b33494d448c0a567438198dd4c980c3c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Mon, 9 Dec 2013 18:33:51 +0100 Subject: [PATCH 07/20] Export the Read / Write operand information. --- libudis86/decode.c | 3 + libudis86/decode.h | 6 +- libudis86/types.h | 7 ++ scripts/ud_itab.py | 17 ++++- scripts/ud_opcode.py | 162 ++++++++++++++++++++++++++++++------------- 5 files changed, 144 insertions(+), 51 deletions(-) diff --git a/libudis86/decode.c b/libudis86/decode.c index ecf4d19..ef86158 100644 --- a/libudis86/decode.c +++ b/libudis86/decode.c @@ -1266,6 +1266,9 @@ ud_decode(struct ud *u) } } + u->operand[0].access = u->itab_entry->operand1_access; + u->operand[1].access = u->itab_entry->operand2_access; + u->insn_offset = u->pc; /* set offset of instruction */ u->asm_buf_fill = 0; /* set translation buffer index to 0 */ u->pc += u->inp_ctr; /* move program counter by bytes decoded */ diff --git a/libudis86/decode.h b/libudis86/decode.h index 0d4a36e..1258049 100644 --- a/libudis86/decode.h +++ b/libudis86/decode.h @@ -162,7 +162,7 @@ Mx_reg_size(ud_operand_size_t size) struct ud_itab_entry_operand { enum ud_operand_code type; - ud_operand_size_t size; + ud_operand_size_t size; }; @@ -176,8 +176,10 @@ struct ud_itab_entry struct ud_itab_entry_operand operand2; struct ud_itab_entry_operand operand3; struct ud_itab_entry_operand operand4; + uint8_t operand1_access; + uint8_t operand2_access; uint32_t prefix; - struct ud_eflags eflags; + struct ud_eflags eflags; }; struct ud_lookup_table_list_entry { diff --git a/libudis86/types.h b/libudis86/types.h index 45163ee..9bb718b 100644 --- a/libudis86/types.h +++ b/libudis86/types.h @@ -139,6 +139,12 @@ enum ud_eflag_state UD_FLAG_PRIOR }; +enum ud_operand_access +{ + UD_OP_ACCESS_READ = 1, + UD_OP_ACCESS_WRITE = 2 +}; + /* This structure describes the state of the EFLAGS register * once an instruction has been executed. */ @@ -187,6 +193,7 @@ struct ud_operand { uint8_t offset; union ud_lval lval; uint8_t signed_lval; + uint8_t access; /* * internal use only */ diff --git a/scripts/ud_itab.py b/scripts/ud_itab.py index 2bee4ca..4df9649 100644 --- a/scripts/ud_itab.py +++ b/scripts/ud_itab.py @@ -272,6 +272,19 @@ def genInsnTable( self ): opr = "%s %s %s %s" % (opr_c[0] + ",", opr_c[1] + ",", opr_c[2] + ",", opr_c[3]) + op1_access = "UD_OP_ACCESS_READ"; + op2_access = "UD_OP_ACCESS_READ"; + + if insn.firstOpAccess == "W": + op1_access = "UD_OP_ACCESS_WRITE" + elif insn.firstOpAccess == "RW": + op1_access = "UD_OP_ACCESS_READ | UD_OP_ACCESS_WRITE" + + if insn.secondOpAccess == "W": + op2_access = "UD_OP_ACCESS_WRITE" + elif insn.secondOpAccess == "RW": + op2_access = "UD_OP_ACCESS_READ | UD_OP_ACCESS_WRITE" + for p in insn.prefixes: if not ( p in self.PrefixDict.keys() ): print("error: invalid prefix specification: %s \n" % pfx) @@ -289,8 +302,8 @@ def genInsnTable( self ): 'P': 'UD_FLAG_PRIOR'} eflags = ", ".join(map(lambda f: flag_map[f], [flag for flag in insn.eflags])) - self.ItabC.write( " /* %04d */ { UD_I%s %s, %s, {%s} },\n" \ - % ( self.getInsnIndex(insn), insn.mnemonic + ',', opr, pfx, eflags ) ) + self.ItabC.write( " /* %04d */ { UD_I%s %s, %s, %s, %s, {%s} },\n" \ + % ( self.getInsnIndex(insn), insn.mnemonic + ',', opr, op1_access, op2_access, pfx, eflags ) ) self.ItabC.write( "};\n" ) diff --git a/scripts/ud_opcode.py b/scripts/ud_opcode.py index 7bdbc90..da93cfb 100644 --- a/scripts/ud_opcode.py +++ b/scripts/ud_opcode.py @@ -29,13 +29,17 @@ class UdInsnDef: """An x86 instruction definition """ def __init__(self, **insnDef): - self.mnemonic = insnDef['mnemonic'] - self.eflags = insnDef['eflags'] - self.prefixes = insnDef['prefixes'] - self.opcodes = insnDef['opcodes'] - self.operands = insnDef['operands'] - self._cpuid = insnDef['cpuid'] - self._opcexts = {} + self.mnemonic = insnDef['mnemonic'] + self.eflags = insnDef['eflags'] + self.firstOpAccess = insnDef['firstOpAccess'] + self.secondOpAccess = insnDef['secondOpAccess'] + self.implicitRegUse = insnDef['implicitRegUse'] + self.implicitRegDef = insnDef['implicitRegDef'] + self.prefixes = insnDef['prefixes'] + self.opcodes = insnDef['opcodes'] + self.operands = insnDef['operands'] + self._cpuid = insnDef['cpuid'] + self._opcexts = {} for opc in self.opcodes: if opc.startswith('/'): @@ -311,8 +315,16 @@ def __init__(self, xml): # add an invalid instruction entry without any mapping # in the opcode tables. - self.invalidInsn = UdInsnDef(mnemonic="invalid", eflags="___________", opcodes=[], cpuid=[], - operands=[], prefixes=[]) + self.invalidInsn = UdInsnDef(mnemonic="invalid", + eflags="___________", + firstOpAccess="", + secondOpAccess="", + implicitRegUse=[], + implicitRegDef=[], + opcodes=[], + cpuid=[], + operands=[], + prefixes=[]) self._insns.append(self.invalidInsn) # Construct UdOpcodeTables object from the given @@ -371,10 +383,14 @@ def addInsn(self, **insnDef): # Canonicalize opcode list opcexts = insnDef['opcexts'] opcodes = list(insnDef['opcodes']) - eflags = insnDef['eflags'] if 'eflags' in insnDef else "___________" + eflags = insnDef['eflags'] + firstOpAccess = insnDef['firstOpAccess'] + secondOpAccess = insnDef['secondOpAccess'] + implicitRegUse = insnDef['implicitRegUse'] + implicitRegDef = insnDef['implicitRegDef'] # TODO: REMOVE! - # print opcodes, eflags, insnDef['mnemonic'] + # print opcodes, eflags, insnDef['mnemonic'], firstOpAccess, secondOpAccess, implicitRegUse, implicitRegDef # Re-order vex if '/vex' in opcexts: @@ -392,6 +408,10 @@ def addInsn(self, **insnDef): insn = UdInsnDef(mnemonic = insnDef['mnemonic'], eflags = insnDef['eflags'], + firstOpAccess = insnDef['firstOpAccess'], + secondOpAccess = insnDef['secondOpAccess'], + implicitRegUse = insnDef['implicitRegUse'], + implicitRegDef = insnDef['implicitRegDef'], prefixes = insnDef['prefixes'], operands = insnDef['operands'], opcodes = opcodes, @@ -463,13 +483,17 @@ def addInsnDef(self, insnDef): if 'avx' in insnDef['cpuid'] and '/sse' in opcexts: fn = self.addSSE2AVXInsn - fn(mnemonic = insnDef['mnemonic'], - eflags = insnDef['eflags'], - prefixes = insnDef['prefixes'], - opcodes = opcodes, - opcexts = opcexts, - operands = insnDef['operands'], - cpuid = insnDef['cpuid']) + fn(mnemonic = insnDef['mnemonic'], + eflags = insnDef['eflags'], + firstOpAccess = insnDef['firstOpAccess'], + secondOpAccess = insnDef['secondOpAccess'], + implicitRegUse = insnDef['implicitRegUse'], + implicitRegDef = insnDef['implicitRegDef'], + prefixes = insnDef['prefixes'], + opcodes = opcodes, + opcexts = opcexts, + operands = insnDef['operands'], + cpuid = insnDef['cpuid']) def addSSE2AVXInsn(self, **insnDef): @@ -480,9 +504,13 @@ def addSSE2AVXInsn(self, **insnDef): """ # SSE - ssemnemonic = insnDef['mnemonic'] - sseeflags = insnDef['eflags'] - sseopcodes = insnDef['opcodes'] + ssemnemonic = insnDef['mnemonic'] + sseeflags = insnDef['eflags'] + ssefirstOpAccess = insnDef['firstOpAccess'] + ssesecondOpAccess = insnDef['secondOpAccess'] + sseimplicitRegUse = insnDef['implicitRegUse'] + sseimplicitRegDef = insnDef['implicitRegDef'] + sseopcodes = insnDef['opcodes'] # remove vex opcode extensions sseopcexts = dict([(e, v) for e, v in insnDef['opcexts'].iteritems() if not e.startswith('/vex')]) @@ -497,20 +525,28 @@ def addSSE2AVXInsn(self, **insnDef): ssecpuid = [flag for flag in insnDef['cpuid'] if not flag.startswith('avx')] - self.addInsn(mnemonic = ssemnemonic, - eflags = sseeflags, - prefixes = sseprefixes, - opcodes = sseopcodes, - opcexts = sseopcexts, - operands = sseoperands, - cpuid = ssecpuid) + self.addInsn(mnemonic = ssemnemonic, + eflags = sseeflags, + firstOpAccess = ssefirstOpAccess, + secondOpAccess = ssesecondOpAccess, + implicitRegUse = sseimplicitRegUse, + implicitRegDef = sseimplicitRegDef, + prefixes = sseprefixes, + opcodes = sseopcodes, + opcexts = sseopcexts, + operands = sseoperands, + cpuid = ssecpuid) # AVX - vexmnemonic = 'v' + insnDef['mnemonic'] - vexeflags = insnDef['eflags'] - vexprefixes = insnDef['prefixes'] - vexopcodes = ['c4'] - vexopcexts = dict([(e, insnDef['opcexts'][e]) + vexmnemonic = 'v' + insnDef['mnemonic'] + vexeflags = insnDef['eflags'] + vexfirstOpAccess = insnDef['firstOpAccess'] + vexsecondOpAccess = insnDef['secondOpAccess'] + veximplicitRegUse = insnDef['implicitRegUse'] + veximplicitRegDef = insnDef['implicitRegDef'] + vexprefixes = insnDef['prefixes'] + vexopcodes = ['c4'] + vexopcexts = dict([(e, insnDef['opcexts'][e]) for e in insnDef['opcexts'] if e != '/sse']) vexopcexts['/vex'] = insnDef['opcexts']['/sse'] + '_' + '0f' if insnDef['opcodes'][1] == '38' or insnDef['opcodes'][1] == '3a': @@ -527,13 +563,17 @@ def addSSE2AVXInsn(self, **insnDef): vexcpuid = [flag for flag in insnDef['cpuid'] if not flag.startswith('sse')] - self.addInsn(mnemonic = vexmnemonic, - eflags = vexeflags, - prefixes = vexprefixes, - opcodes = vexopcodes, - opcexts = vexopcexts, - operands = vexoperands, - cpuid = vexcpuid) + self.addInsn(mnemonic = vexmnemonic, + eflags = vexeflags, + firstOpAccess = vexfirstOpAccess, + secondOpAccess = vexsecondOpAccess, + implicitRegUse = veximplicitRegUse, + implicitRegDef = veximplicitRegDef, + prefixes = vexprefixes, + opcodes = vexopcodes, + opcexts = vexopcexts, + operands = vexoperands, + cpuid = vexcpuid) def getInsnList(self): """Returns a list of all instructions in the collection""" @@ -601,6 +641,10 @@ def parseOptableXML(xml): mnemonic = insnNode.getElementsByTagName('mnemonic')[0].firstChild.data vendor, cpuid = '', [] global_eflags = "___________" + global_firstOpAccess = "R" + global_secondOpAccess = "R" + global_implicitRegUse = [] + global_implicitRegDef = [] for node in insnNode.childNodes: if node.localName == 'vendor': @@ -609,10 +653,22 @@ def parseOptableXML(xml): cpuid = node.firstChild.data.split() elif node.localName == 'eflags': global_eflags = node.firstChild.data + elif node.localName == 'first_operand_access': + global_firstOpAccess = node.firstChild.data + elif node.localName == 'second_operand_access': + global_secondOpAccess = node.firstChild.data + elif node.localName == 'implicit_register_use': + global_implicitRegUse.append(node.firstChild.data) + elif node.localName == 'implicit_register_def': + global_implicitRegDef.append(node.firstChild.data) for node in insnNode.childNodes: if node.localName == 'def': eflags = global_eflags + firstOpAccess = global_firstOpAccess + secondOpAccess = global_secondOpAccess + implicitRegUse = global_implicitRegUse + implicitRegDef = global_implicitRegDef insnDef = { 'pfx' : [] } for node in node.childNodes: if not node.localName: @@ -621,13 +677,25 @@ def parseOptableXML(xml): insnDef[node.localName] = node.firstChild.data.split() elif node.localName == 'eflags': eflags = node.firstChild.data + elif node.localName == 'first_operand_access': + firstOpAccess = node.firstChild.data + elif node.localName == 'second_operand_access': + secondOpAccess = node.firstChild.data + elif node.localName == 'implicit_register_use': + implicitRegUse.append(node.firstChild.data) + elif node.localName == 'implicit_register_def': + implicitRegDef.append(node.firstChild.data) elif node.localName == 'mode': insnDef['pfx'].extend(node.firstChild.data.split()) - insns.append({'prefixes' : insnDef.get('pfx', []), - 'mnemonic' : mnemonic, - 'eflags' : eflags, - 'opcodes' : insnDef.get('opc', []), - 'operands' : insnDef.get('opr', []), - 'vendor' : insnDef.get('vendor', vendor), - 'cpuid' : insnDef.get('cpuid', cpuid)}) + insns.append({'prefixes' : insnDef.get('pfx', []), + 'mnemonic' : mnemonic, + 'eflags' : eflags, + 'firstOpAccess' : firstOpAccess, + 'secondOpAccess' : secondOpAccess, + 'implicitRegUse' : implicitRegUse, + 'implicitRegDef' : implicitRegDef, + 'opcodes' : insnDef.get('opc', []), + 'operands' : insnDef.get('opr', []), + 'vendor' : insnDef.get('vendor', vendor), + 'cpuid' : insnDef.get('cpuid', cpuid)}) return insns From e0a269e295e1864f53c337bf4fa979e34b8f9a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Tue, 10 Dec 2013 09:11:50 +0100 Subject: [PATCH 08/20] Fix access mode for operand 3 and 4. --- libudis86/decode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libudis86/decode.c b/libudis86/decode.c index ef86158..841924c 100644 --- a/libudis86/decode.c +++ b/libudis86/decode.c @@ -1268,6 +1268,8 @@ ud_decode(struct ud *u) u->operand[0].access = u->itab_entry->operand1_access; u->operand[1].access = u->itab_entry->operand2_access; + u->operand[2].access = UD_OP_ACCESS_READ; + u->operand[3].access = UD_OP_ACCESS_READ; u->insn_offset = u->pc; /* set offset of instruction */ u->asm_buf_fill = 0; /* set translation buffer index to 0 */ From 130ba9cd691ae5cebf112249eb0d876df9273217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Tue, 10 Dec 2013 09:33:43 +0100 Subject: [PATCH 09/20] Add information about implicit register changes for ret instructions. --- docs/x86/optable.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/x86/optable.xml b/docs/x86/optable.xml index 1120753..dab79b3 100644 --- a/docs/x86/optable.xml +++ b/docs/x86/optable.xml @@ -7937,6 +7937,7 @@ ret rsp rsp + rip ___________ c2 @@ -7951,6 +7952,7 @@ retf rsp rsp + rip ca Iw From 51d5a6a8adaaaef31f4372f4c9e18156d39d1809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Tue, 10 Dec 2013 09:40:03 +0100 Subject: [PATCH 10/20] Fix EFLAGS values of the SETcc instructions. --- docs/x86/optable.xml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/x86/optable.xml b/docs/x86/optable.xml index dab79b3..20320ab 100644 --- a/docs/x86/optable.xml +++ b/docs/x86/optable.xml @@ -8273,7 +8273,7 @@ seto W - TTT_TT_____ + T__________ aso rexr rexx rexb 0f 90 @@ -8284,7 +8284,7 @@ setno W - TTT_TT_____ + T__________ aso rexr rexx rexb 0f 91 @@ -8295,7 +8295,7 @@ setb W - TTT_TT_____ + _____T_____ aso rexr rexx rexb 0f 92 @@ -8306,7 +8306,7 @@ setae W - TTT_TT_____ + _____T_____ aso rexr rexx rexb 0f 93 @@ -8317,7 +8317,7 @@ setz W - TTT_TT_____ + __T________ aso rexr rexx rexb 0f 94 @@ -8328,7 +8328,7 @@ setnz W - TTT_TT_____ + __T________ aso rexr rexx rexb 0f 95 @@ -8339,7 +8339,7 @@ setbe W - TTT_TT_____ + __T__T_____ aso rexr rexx rexb 0f 96 @@ -8350,7 +8350,7 @@ seta W - TTT_TT_____ + __T__T_____ aso rexr rexx rexb 0f 97 @@ -8361,7 +8361,7 @@ sets W - TTT_TT_____ + _T_________ aso rexr rexx rexb 0f 98 @@ -8372,7 +8372,7 @@ setns W - TTT_TT_____ + _T_________ aso rexr rexx rexb 0f 99 @@ -8383,7 +8383,7 @@ setp W - TTT_TT_____ + ____T______ aso rexr rexx rexb 0f 9a @@ -8394,7 +8394,7 @@ setnp W - TTT_TT_____ + ____T______ aso rexr rexx rexb 0f 9b @@ -8405,7 +8405,7 @@ setl W - TTT_TT_____ + TT_________ aso rexr rexx rexb 0f 9c @@ -8416,7 +8416,7 @@ setge W - TTT_TT_____ + TT_________ aso rexr rexx rexb 0f 9d @@ -8427,7 +8427,7 @@ setle W - TTT_TT_____ + TTT________ aso rexr rexx rexb 0f 9e @@ -8438,7 +8438,7 @@ setg W - TTT_TT_____ + TTT________ aso rexr rexx rexb 0f 9f From e6b044f1683204e5550ac148c5c6a019645110aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Tue, 10 Dec 2013 10:04:16 +0100 Subject: [PATCH 11/20] Export information about registers implicitly used or modified. --- docs/x86/optable.xml | 4 ++-- libudis86/decode.h | 2 ++ libudis86/extern.h | 4 ++++ libudis86/udis86.c | 32 ++++++++++++++++++++++++++++++++ scripts/ud_itab.py | 15 +++++++++++++-- scripts/ud_opcode.py | 11 ++++++----- 6 files changed, 59 insertions(+), 9 deletions(-) diff --git a/docs/x86/optable.xml b/docs/x86/optable.xml index 20320ab..4dc5ee9 100644 --- a/docs/x86/optable.xml +++ b/docs/x86/optable.xml @@ -6651,7 +6651,7 @@ dx cx ax - rdp + rbp rsp ___________ @@ -6670,7 +6670,7 @@ edx ecx eax - rdp + rbp rsp ___________ diff --git a/libudis86/decode.h b/libudis86/decode.h index 1258049..82ca61a 100644 --- a/libudis86/decode.h +++ b/libudis86/decode.h @@ -180,6 +180,8 @@ struct ud_itab_entry uint8_t operand2_access; uint32_t prefix; struct ud_eflags eflags; + enum ud_type implicit_register_uses[32]; + enum ud_type implicit_register_defs[32]; }; struct ud_lookup_table_list_entry { diff --git a/libudis86/extern.h b/libudis86/extern.h index 69bad12..ba23cfd 100644 --- a/libudis86/extern.h +++ b/libudis86/extern.h @@ -96,6 +96,10 @@ extern LIBUDIS86_DLLEXTERN const char* ud_lookup_mnemonic(enum ud_mnemonic_code extern LIBUDIS86_DLLEXTERN const struct ud_eflags* ud_lookup_eflags(struct ud *u); +extern LIBUDIS86_DLLEXTERN const enum ud_type* ud_lookup_implicit_reg_used_list(struct ud *u); + +extern LIBUDIS86_DLLEXTERN const enum ud_type* ud_lookup_implicit_reg_defined_list(struct ud *u); + extern LIBUDIS86_DLLEXTERN void ud_set_user_opaque_data(struct ud*, void*); extern LIBUDIS86_DLLEXTERN void* ud_get_user_opaque_data(const struct ud*); diff --git a/libudis86/udis86.c b/libudis86/udis86.c index 489ed3b..20b914e 100644 --- a/libudis86/udis86.c +++ b/libudis86/udis86.c @@ -356,6 +356,38 @@ ud_lookup_eflags(struct ud *u) } } +/* ============================================================================= + * ud_lookup_implicit_reg_used_list + * Returns the list of register implicitly used. + * The list is terminated by UD_NONE. + * Returns NULL if invalid. + * ============================================================================= + */ +const enum ud_type* +ud_lookup_implicit_reg_used_list(struct ud *u) { + if (u == NULL || u->itab_entry == NULL) { + return NULL; + } else { + return u->itab_entry->implicit_register_uses; + } +} + +/* ============================================================================= + * ud_lookup_implicit_reg_used_list + * Returns the list of register implicitly modified. + * The list is terminated by UD_NONE. + * Returns NULL if invalid. + * ============================================================================= + */ +const enum ud_type* +ud_lookup_implicit_reg_defined_list(struct ud *u) { + if (u == NULL || u->itab_entry == NULL) { + return NULL; + } else { + return u->itab_entry->implicit_register_defs; + } +} + /* * ud_inp_init * Initializes the input system. diff --git a/scripts/ud_itab.py b/scripts/ud_itab.py index 4df9649..9c77516 100644 --- a/scripts/ud_itab.py +++ b/scripts/ud_itab.py @@ -301,9 +301,20 @@ def genInsnTable( self ): 'U': 'UD_FLAG_UNDEFINED', 'P': 'UD_FLAG_PRIOR'} eflags = ", ".join(map(lambda f: flag_map[f], [flag for flag in insn.eflags])) + + implicit_uses = ", ".join(map(lambda r: "UD_R_" + r.upper(), insn.implicitRegUse)) + implicit_defs = ", ".join(map(lambda r: "UD_R_" + r.upper(), insn.implicitRegDef)) - self.ItabC.write( " /* %04d */ { UD_I%s %s, %s, %s, %s, {%s} },\n" \ - % ( self.getInsnIndex(insn), insn.mnemonic + ',', opr, op1_access, op2_access, pfx, eflags ) ) + if len(implicit_uses) > 0: + implicit_uses += ", " + if len(implicit_defs) > 0: + implicit_defs += ", " + + implicit_uses += "UD_NONE" + implicit_defs += "UD_NONE" + + self.ItabC.write( " /* %04d */ { UD_I%s %s, %s, %s, %s, {%s}, {%s}, {%s} },\n" \ + % ( self.getInsnIndex(insn), insn.mnemonic + ',', opr, op1_access, op2_access, pfx, eflags, implicit_uses, implicit_defs ) ) self.ItabC.write( "};\n" ) diff --git a/scripts/ud_opcode.py b/scripts/ud_opcode.py index da93cfb..466682e 100644 --- a/scripts/ud_opcode.py +++ b/scripts/ud_opcode.py @@ -24,6 +24,7 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import os +import copy class UdInsnDef: """An x86 instruction definition @@ -664,11 +665,11 @@ def parseOptableXML(xml): for node in insnNode.childNodes: if node.localName == 'def': - eflags = global_eflags - firstOpAccess = global_firstOpAccess - secondOpAccess = global_secondOpAccess - implicitRegUse = global_implicitRegUse - implicitRegDef = global_implicitRegDef + eflags = copy.deepcopy(global_eflags) + firstOpAccess = copy.deepcopy(global_firstOpAccess) + secondOpAccess = copy.deepcopy(global_secondOpAccess) + implicitRegUse = copy.deepcopy(global_implicitRegUse) + implicitRegDef = copy.deepcopy(global_implicitRegDef) insnDef = { 'pfx' : [] } for node in node.childNodes: if not node.localName: From 9bf277c4dbbd610ff803eb385277ff86b69f4f10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Tue, 10 Dec 2013 10:33:15 +0100 Subject: [PATCH 12/20] Update the "udcli" utility to display more meta information. --- udcli/udcli.c | 82 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 65 insertions(+), 17 deletions(-) diff --git a/udcli/udcli.c b/udcli/udcli.c index 2b3d9e7..a75879c 100644 --- a/udcli/udcli.c +++ b/udcli/udcli.c @@ -60,27 +60,31 @@ static char help[] = { "Usage: %s [-option[s]] file\n" "Options:\n" - " -16 : Set the disassembly mode to 16 bits. \n" - " -32 : Set the disassembly mode to 32 bits. (default)\n" - " -64 : Set the disassembly mode to 64 bits.\n" - " -intel : Set the output to INTEL (NASM like) syntax. (default)\n" - " -att : Set the output to AT&T (GAS like) syntax.\n" - " -v : Set vendor. = {intel, amd}.\n" - " -o : Set the value of program counter to . (default = 0)\n" - " -s : Set the number of bytes to skip before disassembly to .\n" - " -c : Set the number of bytes to disassemble to .\n" - " -x : Set the input mode to whitespace separated 8-bit numbers in\n" - " hexadecimal representation. Example: 0f 01 ae 00\n" - " -noff : Do not display the offset of instructions.\n" - " -nohex : Do not display the hexadecimal code of instructions.\n" - " -eflags : Display information on EFLAGS register.\n" - " -h : Display this help message.\n" - " --version: Show version.\n" + " -16 : Set the disassembly mode to 16 bits. \n" + " -32 : Set the disassembly mode to 32 bits. (default)\n" + " -64 : Set the disassembly mode to 64 bits.\n" + " -intel : Set the output to INTEL (NASM like) syntax. (default)\n" + " -att : Set the output to AT&T (GAS like) syntax.\n" + " -v : Set vendor. = {intel, amd}.\n" + " -o : Set the value of program counter to . (default = 0)\n" + " -s : Set the number of bytes to skip before disassembly to .\n" + " -c : Set the number of bytes to disassemble to .\n" + " -x : Set the input mode to whitespace separated 8-bit numbers in\n" + " hexadecimal representation. Example: 0f 01 ae 00\n" + " -noff : Do not display the offset of instructions.\n" + " -nohex : Do not display the hexadecimal code of instructions.\n" + " -eflags : Display information on EFLAGS register.\n" + " -access : Display access information of operand.\n" + " -implicit : Display implicit registers used or modified by the instruction.\n" + " -h : Display this help message.\n" + " --version : Show version.\n" "\n" "Udcli is a front-end to the Udis86 Disassembler Library.\n" "http://udis86.sourceforge.net/\n" }; +extern const char* ud_reg_tab[]; + FILE* fptr = NULL; uint64_t o_skip = 0; uint64_t o_count = 0; @@ -89,6 +93,8 @@ unsigned char o_do_off = 1; unsigned char o_do_hex = 1; unsigned char o_do_x = 0; unsigned char o_do_eflags = 0; +unsigned char o_do_access = 0; +unsigned char o_do_implicit = 0; unsigned o_vendor = UD_VENDOR_AMD; int input_hook_x(ud_t* u); @@ -127,6 +133,7 @@ int main(int argc, char **argv) char *prog_path = *argv; char *s; ud_t ud_obj; + int i; /* initialize */ ud_init(&ud_obj); @@ -165,6 +172,10 @@ int main(int argc, char **argv) o_do_hex = 0; else if (strcmp(*argv,"-eflags") == 0) o_do_eflags = 1; + else if (strcmp(*argv,"-access") == 0) + o_do_access = 1; + else if (strcmp(*argv,"-implicit") == 0) + o_do_implicit = 1; else if (strcmp(*argv,"-x") == 0) o_do_x = 1; else if (strcmp(*argv,"-s") == 0) @@ -245,7 +256,7 @@ int main(int argc, char **argv) // other options in the future. Hence, o_do_meta holds // the information about if we have to display any // metadata. - unsigned char o_do_meta = o_do_eflags; + unsigned char o_do_meta = o_do_eflags | o_do_access | o_do_implicit; /* disassembly loop */ while (ud_disassemble(&ud_obj)) { @@ -271,6 +282,43 @@ int main(int argc, char **argv) const struct ud_eflags* eflags = ud_lookup_eflags(&ud_obj); print_eflags(eflags); } + if (o_do_access) { + o_do_access = 0; + for (i=0; i<4; i++) { + const struct ud_operand *op = ud_insn_opr(&ud_obj, i); + if (op != NULL) { + if (i == 0) { + if (o_do_eflags) printf(", "); + printf("access"); + o_do_access = 1; + } + printf(" op%d=", i); + if (op->access == UD_OP_ACCESS_READ) printf("R"); + else if (op->access == UD_OP_ACCESS_WRITE) printf("W"); + else if (op->access == (UD_OP_ACCESS_READ|UD_OP_ACCESS_WRITE)) printf("RW"); + else printf("-"); + } + } + } + if (o_do_implicit) { + if (o_do_eflags | o_do_access) printf(", "); + const enum ud_type *imp_used = ud_lookup_implicit_reg_used_list(&ud_obj); + const enum ud_type *imp_modified = ud_lookup_implicit_reg_defined_list(&ud_obj); + printf("implicit reg used:"); + if (imp_used == NULL || *imp_used == UD_NONE) { + printf(" none"); + } + while (*imp_used != UD_NONE) { + printf(" %s", ud_reg_tab[*imp_used++ - 1]); + } + printf(", implicit reg modified:"); + if (imp_modified == NULL || *imp_modified == UD_NONE) { + printf(" none"); + } + while (*imp_modified != UD_NONE) { + printf(" %s", ud_reg_tab[*imp_modified++ - 1]); + } + } } printf("\n"); From 7a2bbb73cbac7231f7b3951c8182e104f7d09fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Tue, 10 Dec 2013 13:39:45 +0100 Subject: [PATCH 13/20] Replace some conditional instructions by their synonym. --- docs/x86/optable.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/x86/optable.xml b/docs/x86/optable.xml index 4dc5ee9..89598c2 100644 --- a/docs/x86/optable.xml +++ b/docs/x86/optable.xml @@ -698,7 +698,7 @@ - cmovz + cmove W TTT_TT_____ @@ -709,7 +709,7 @@ - cmovnz + cmovne W TTT_TT_____ @@ -4345,7 +4345,7 @@ - jz + je rip __T________ @@ -4361,7 +4361,7 @@ - jnz + jne rip __T________ @@ -8315,7 +8315,7 @@ - setz + sete W __T________ @@ -8326,7 +8326,7 @@ - setnz + setne W __T________ From f4c68d55b30e4cedfca2a18016ac91b29444e106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Thu, 19 Dec 2013 14:50:23 +0100 Subject: [PATCH 14/20] Add CMake file. --- CMakeLists.txt | 6 +++ libudis86/CMakeLists.txt | 18 ++++++++ libudis86/udis86.c | 91 ++++++++++++++++++++-------------------- udcli/CMakeLists.txt | 4 ++ 4 files changed, 74 insertions(+), 45 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 libudis86/CMakeLists.txt create mode 100644 udcli/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..b486548 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,6 @@ +project(udis86) +cmake_minimum_required(VERSION 2.8) +include_directories("${PROJECT_SOURCE_DIR}") +add_subdirectory(libudis86) +add_subdirectory(udcli) + diff --git a/libudis86/CMakeLists.txt b/libudis86/CMakeLists.txt new file mode 100644 index 0000000..6257f9a --- /dev/null +++ b/libudis86/CMakeLists.txt @@ -0,0 +1,18 @@ +project(libudis86) +cmake_minimum_required(VERSION 2.8) + +set(FILES + decode.c + decode.h + extern.h + itab.c + itab.h + syn-att.c + syn-intel.c + syn.c + syn.h + types.h + udint.h + udis86.c) + +add_library(libudis86 STATIC ${FILES}) diff --git a/libudis86/udis86.c b/libudis86/udis86.c index 20b914e..b52cdf0 100644 --- a/libudis86/udis86.c +++ b/libudis86/udis86.c @@ -2,31 +2,32 @@ * * Copyright (c) 2002-2013 Vivek Thampi * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, + * + * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, + * + * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "udint.h" #include "extern.h" #include "decode.h" +#include #if !defined(__UD_STANDALONE__) # if HAVE_STRING_H @@ -41,7 +42,7 @@ static void ud_inp_init(struct ud *u); * Initializes ud_t object. * ============================================================================= */ -extern void +extern void ud_init(struct ud* u) { memset((void*)u, 0, sizeof(struct ud)); @@ -58,7 +59,7 @@ ud_init(struct ud* u) /* ============================================================================= * ud_disassemble - * Disassembles one instruction and returns the number of + * Disassembles one instruction and returns the number of * bytes disassembled. A zero means end of disassembly. * ============================================================================= */ @@ -83,7 +84,7 @@ ud_disassemble(struct ud* u) * ud_set_mode() - Set Disassemly Mode. * ============================================================================= */ -extern void +extern void ud_set_mode(struct ud* u, uint8_t m) { switch(m) { @@ -98,7 +99,7 @@ ud_set_mode(struct ud* u, uint8_t m) * ud_set_vendor() - Set vendor. * ============================================================================= */ -extern void +extern void ud_set_vendor(struct ud* u, unsigned v) { switch(v) { @@ -114,10 +115,10 @@ ud_set_vendor(struct ud* u, unsigned v) } /* ============================================================================= - * ud_set_pc() - Sets code origin. + * ud_set_pc() - Sets code origin. * ============================================================================= */ -extern void +extern void ud_set_pc(struct ud* u, uint64_t o) { u->pc = o; @@ -127,7 +128,7 @@ ud_set_pc(struct ud* u, uint64_t o) * ud_set_syntax() - Sets the output syntax. * ============================================================================= */ -extern void +extern void ud_set_syntax(struct ud* u, void (*t)(struct ud*)) { u->translator = t; @@ -137,8 +138,8 @@ ud_set_syntax(struct ud* u, void (*t)(struct ud*)) * ud_insn() - returns the disassembled instruction * ============================================================================= */ -const char* -ud_insn_asm(const struct ud* u) +const char* +ud_insn_asm(const struct ud* u) { return u->asm_buf; } @@ -148,7 +149,7 @@ ud_insn_asm(const struct ud* u) * ============================================================================= */ uint64_t -ud_insn_off(const struct ud* u) +ud_insn_off(const struct ud* u) { return u->insn_offset; } @@ -158,8 +159,8 @@ ud_insn_off(const struct ud* u) * ud_insn_hex() - Returns hex form of disassembled instruction. * ============================================================================= */ -const char* -ud_insn_hex(struct ud* u) +const char* +ud_insn_hex(struct ud* u) { u->insn_hexcode[0] = 0; if (!u->error) { @@ -184,10 +185,10 @@ ud_insn_hex(struct ud* u) * disassembled. * ============================================================================= */ -extern const uint8_t* -ud_insn_ptr(const struct ud* u) +extern const uint8_t* +ud_insn_ptr(const struct ud* u) { - return (u->inp_buf == NULL) ? + return (u->inp_buf == NULL) ? u->inp_sess : u->inp_buf + (u->inp_buf_index - u->inp_ctr); } @@ -197,8 +198,8 @@ ud_insn_ptr(const struct ud* u) * Returns the count of bytes disassembled. * ============================================================================= */ -extern unsigned int -ud_insn_len(const struct ud* u) +extern unsigned int +ud_insn_len(const struct ud* u) { return u->inp_ctr; } @@ -215,7 +216,7 @@ const struct ud_operand* ud_insn_opr(const struct ud *u, unsigned int n) { if (n > 3 || u->operand[n].type == UD_NONE) { - return NULL; + return NULL; } else { return &u->operand[n]; } @@ -230,7 +231,7 @@ ud_insn_opr(const struct ud *u, unsigned int n) int ud_opr_is_sreg(const struct ud_operand *opr) { - return opr->type == UD_OP_REG && + return opr->type == UD_OP_REG && opr->base >= UD_R_ES && opr->base <= UD_R_GS; } @@ -245,7 +246,7 @@ ud_opr_is_sreg(const struct ud_operand *opr) int ud_opr_is_gpr(const struct ud_operand *opr) { - return opr->type == UD_OP_REG && + return opr->type == UD_OP_REG && opr->base >= UD_R_AL && opr->base <= UD_R_R15; } @@ -304,7 +305,7 @@ ud_set_asm_buffer(struct ud *u, char *buf, size_t size) * ============================================================================= */ void -ud_set_sym_resolver(struct ud *u, const char* (*resolver)(struct ud*, +ud_set_sym_resolver(struct ud *u, const char* (*resolver)(struct ud*, uint64_t addr, int64_t *offset)) { @@ -388,7 +389,7 @@ ud_lookup_implicit_reg_defined_list(struct ud *u) { } } -/* +/* * ud_inp_init * Initializes the input system. */ @@ -412,7 +413,7 @@ ud_inp_init(struct ud *u) * Sets input hook. * ============================================================================= */ -void +void ud_set_input_hook(register struct ud* u, int (*hook)(struct ud*)) { ud_inp_init(u); @@ -424,7 +425,7 @@ ud_set_input_hook(register struct ud* u, int (*hook)(struct ud*)) * Set buffer as input. * ============================================================================= */ -void +void ud_set_input_buffer(register struct ud* u, const uint8_t* buf, size_t len) { ud_inp_init(u); @@ -440,13 +441,13 @@ ud_set_input_buffer(register struct ud* u, const uint8_t* buf, size_t len) * Set FILE as input. * ============================================================================= */ -static int +static int inp_file_hook(struct ud* u) { return fgetc(u->inp_file); } -void +void ud_set_input_file(register struct ud* u, FILE* f) { ud_inp_init(u); @@ -461,7 +462,7 @@ ud_set_input_file(register struct ud* u, FILE* f) * Skip n input bytes. * ============================================================================ */ -void +void ud_input_skip(struct ud* u, size_t n) { if (u->inp_end) { @@ -478,10 +479,10 @@ ud_input_skip(struct ud* u, size_t n) } else { if (n > u->inp_buf_size || u->inp_buf_index > u->inp_buf_size - n) { - u->inp_buf_index = u->inp_buf_size; + u->inp_buf_index = u->inp_buf_size; goto eoi; } - u->inp_buf_index += n; + u->inp_buf_index += n; return; } eoi: diff --git a/udcli/CMakeLists.txt b/udcli/CMakeLists.txt new file mode 100644 index 0000000..df5c3ec --- /dev/null +++ b/udcli/CMakeLists.txt @@ -0,0 +1,4 @@ +project(udcli) +cmake_minimum_required(VERSION 2.8) +add_executable(udcli udcli.c) +target_link_libraries(udcli libudis86) From 42e246874a1643bdad16e1a065e460e26017ded7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Be=CC=81nony?= Date: Wed, 21 May 2014 17:21:49 +0200 Subject: [PATCH 15/20] Fix issues revealed by radare project. --- libudis86/syn.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libudis86/syn.c b/libudis86/syn.c index 1b9e1d4..8e64fc2 100644 --- a/libudis86/syn.c +++ b/libudis86/syn.c @@ -91,10 +91,16 @@ const char* ud_reg_tab[] = uint64_t ud_syn_rel_target(struct ud *u, struct ud_operand *opr) { - const uint64_t trunc_mask = 0xffffffffffffffffull >> (64 - u->opr_mode); + uint64_t trunc_mask = 0xffffffffffffffffull; + if (u->dis_mode != 64) trunc_mask >>= (64 - u->opr_mode); switch (opr->size) { case 8 : return (u->pc + opr->lval.sbyte) & trunc_mask; - case 16: return (u->pc + opr->lval.sword) & trunc_mask; + case 16: { + int delta = (opr->lval.sword & trunc_mask); + if ((u->pc + delta) > 0xffff) + return (u->pc & 0xf0000) + ((u->pc + delta) & 0xffff); + return (u->pc + delta); + } case 32: return (u->pc + opr->lval.sdword) & trunc_mask; default: UD_ASSERT(!"invalid relative offset size."); return 0ull; From 85196b44650d4aed738a19e45314290a16420020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Be=CC=81nony?= Date: Wed, 21 May 2014 17:22:57 +0200 Subject: [PATCH 16/20] Add an Xcode project. --- xcode/udcli/sample_input | 1 + xcode/udcli/udcli.xcodeproj/project.pbxproj | 272 ++++++++++++++++ xcode/udis.xcodeproj/project.pbxproj | 307 ++++++++++++++++++ .../udis.xcworkspace/contents.xcworkspacedata | 10 + 4 files changed, 590 insertions(+) create mode 100644 xcode/udcli/sample_input create mode 100644 xcode/udcli/udcli.xcodeproj/project.pbxproj create mode 100644 xcode/udis.xcodeproj/project.pbxproj create mode 100644 xcode/udis.xcworkspace/contents.xcworkspacedata diff --git a/xcode/udcli/sample_input b/xcode/udcli/sample_input new file mode 100644 index 0000000..25b936d --- /dev/null +++ b/xcode/udcli/sample_input @@ -0,0 +1 @@ +90 90 90 \ No newline at end of file diff --git a/xcode/udcli/udcli.xcodeproj/project.pbxproj b/xcode/udcli/udcli.xcodeproj/project.pbxproj new file mode 100644 index 0000000..b59effe --- /dev/null +++ b/xcode/udcli/udcli.xcodeproj/project.pbxproj @@ -0,0 +1,272 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0750BF3A192CF9BB00F0FFA9 /* udcli.c in Sources */ = {isa = PBXBuildFile; fileRef = 0750BF39192CF9BB00F0FFA9 /* udcli.c */; }; + 0750BF3C192CFA6100F0FFA9 /* libudis.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0750BF3B192CFA6100F0FFA9 /* libudis.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 0750BF2B192CF98400F0FFA9 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /usr/share/man/man1/; + dstSubfolderSpec = 0; + files = ( + ); + runOnlyForDeploymentPostprocessing = 1; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0750BF2D192CF98400F0FFA9 /* udcli */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = udcli; sourceTree = BUILT_PRODUCTS_DIR; }; + 0750BF39192CF9BB00F0FFA9 /* udcli.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = udcli.c; path = ../../../udcli/udcli.c; sourceTree = ""; }; + 0750BF3B192CFA6100F0FFA9 /* libudis.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libudis.a; path = "../../../../Library/Developer/Xcode/DerivedData/udis-cxhtywlfqipmbpakmbnrzkfnbegd/Build/Products/Debug/libudis.a"; sourceTree = ""; }; + 0750BF3E192CFB0300F0FFA9 /* sample_input */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = sample_input; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 0750BF2A192CF98400F0FFA9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0750BF3C192CFA6100F0FFA9 /* libudis.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0750BF24192CF98400F0FFA9 = { + isa = PBXGroup; + children = ( + 0750BF3D192CFAEE00F0FFA9 /* sample */, + 0750BF3B192CFA6100F0FFA9 /* libudis.a */, + 0750BF2F192CF98400F0FFA9 /* udcli */, + 0750BF2E192CF98400F0FFA9 /* Products */, + ); + sourceTree = ""; + }; + 0750BF2E192CF98400F0FFA9 /* Products */ = { + isa = PBXGroup; + children = ( + 0750BF2D192CF98400F0FFA9 /* udcli */, + ); + name = Products; + sourceTree = ""; + }; + 0750BF2F192CF98400F0FFA9 /* udcli */ = { + isa = PBXGroup; + children = ( + 0750BF39192CF9BB00F0FFA9 /* udcli.c */, + ); + path = udcli; + sourceTree = ""; + }; + 0750BF3D192CFAEE00F0FFA9 /* sample */ = { + isa = PBXGroup; + children = ( + 0750BF3E192CFB0300F0FFA9 /* sample_input */, + ); + name = sample; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 0750BF2C192CF98400F0FFA9 /* udcli */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0750BF36192CF98400F0FFA9 /* Build configuration list for PBXNativeTarget "udcli" */; + buildPhases = ( + 0750BF29192CF98400F0FFA9 /* Sources */, + 0750BF2A192CF98400F0FFA9 /* Frameworks */, + 0750BF2B192CF98400F0FFA9 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = udcli; + productName = udcli; + productReference = 0750BF2D192CF98400F0FFA9 /* udcli */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0750BF25192CF98400F0FFA9 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0510; + ORGANIZATIONNAME = "Cryptic Apps"; + }; + buildConfigurationList = 0750BF28192CF98400F0FFA9 /* Build configuration list for PBXProject "udcli" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 0750BF24192CF98400F0FFA9; + productRefGroup = 0750BF2E192CF98400F0FFA9 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 0750BF2C192CF98400F0FFA9 /* udcli */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 0750BF29192CF98400F0FFA9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0750BF3A192CF9BB00F0FFA9 /* udcli.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 0750BF34192CF98400F0FFA9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + $PROJECT_DIR/../libudis86, + ); + MACOSX_DEPLOYMENT_TARGET = 10.9; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 0750BF35192CF98400F0FFA9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + $PROJECT_DIR/../libudis86, + ); + MACOSX_DEPLOYMENT_TARGET = 10.9; + SDKROOT = macosx; + }; + name = Release; + }; + 0750BF37192CF98400F0FFA9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + $PROJECT_DIR/../.., + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/udis-cxhtywlfqipmbpakmbnrzkfnbegd/Build/Products/Debug", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 0750BF38192CF98400F0FFA9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + $PROJECT_DIR/../.., + ); + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/udis-cxhtywlfqipmbpakmbnrzkfnbegd/Build/Products/Debug", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 0750BF28192CF98400F0FFA9 /* Build configuration list for PBXProject "udcli" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0750BF34192CF98400F0FFA9 /* Debug */, + 0750BF35192CF98400F0FFA9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0750BF36192CF98400F0FFA9 /* Build configuration list for PBXNativeTarget "udcli" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0750BF37192CF98400F0FFA9 /* Debug */, + 0750BF38192CF98400F0FFA9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0750BF25192CF98400F0FFA9 /* Project object */; +} diff --git a/xcode/udis.xcodeproj/project.pbxproj b/xcode/udis.xcodeproj/project.pbxproj new file mode 100644 index 0000000..172a70d --- /dev/null +++ b/xcode/udis.xcodeproj/project.pbxproj @@ -0,0 +1,307 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0750BF11192CF72B00F0FFA9 /* decode.c in Sources */ = {isa = PBXBuildFile; fileRef = 0750BF07192CF72B00F0FFA9 /* decode.c */; }; + 0750BF12192CF72B00F0FFA9 /* decode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0750BF08192CF72B00F0FFA9 /* decode.h */; }; + 0750BF13192CF72B00F0FFA9 /* extern.h in Headers */ = {isa = PBXBuildFile; fileRef = 0750BF09192CF72B00F0FFA9 /* extern.h */; }; + 0750BF14192CF72B00F0FFA9 /* syn-att.c in Sources */ = {isa = PBXBuildFile; fileRef = 0750BF0A192CF72B00F0FFA9 /* syn-att.c */; }; + 0750BF15192CF72B00F0FFA9 /* syn-intel.c in Sources */ = {isa = PBXBuildFile; fileRef = 0750BF0B192CF72B00F0FFA9 /* syn-intel.c */; }; + 0750BF16192CF72B00F0FFA9 /* syn.c in Sources */ = {isa = PBXBuildFile; fileRef = 0750BF0C192CF72B00F0FFA9 /* syn.c */; }; + 0750BF17192CF72B00F0FFA9 /* syn.h in Headers */ = {isa = PBXBuildFile; fileRef = 0750BF0D192CF72B00F0FFA9 /* syn.h */; }; + 0750BF18192CF72B00F0FFA9 /* types.h in Headers */ = {isa = PBXBuildFile; fileRef = 0750BF0E192CF72B00F0FFA9 /* types.h */; }; + 0750BF19192CF72B00F0FFA9 /* udint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0750BF0F192CF72B00F0FFA9 /* udint.h */; }; + 0750BF1A192CF72B00F0FFA9 /* udis86.c in Sources */ = {isa = PBXBuildFile; fileRef = 0750BF10192CF72B00F0FFA9 /* udis86.c */; }; + 0750BF21192CF93B00F0FFA9 /* itab.c in Sources */ = {isa = PBXBuildFile; fileRef = 0750BF1F192CF93B00F0FFA9 /* itab.c */; }; + 0750BF22192CF93B00F0FFA9 /* itab.h in Headers */ = {isa = PBXBuildFile; fileRef = 0750BF20192CF93B00F0FFA9 /* itab.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 0750BF00192CF6B300F0FFA9 /* libudis.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libudis.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 0750BF07192CF72B00F0FFA9 /* decode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = decode.c; path = ../libudis86/decode.c; sourceTree = ""; }; + 0750BF08192CF72B00F0FFA9 /* decode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = decode.h; path = ../libudis86/decode.h; sourceTree = ""; }; + 0750BF09192CF72B00F0FFA9 /* extern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = extern.h; path = ../libudis86/extern.h; sourceTree = ""; }; + 0750BF0A192CF72B00F0FFA9 /* syn-att.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "syn-att.c"; path = "../libudis86/syn-att.c"; sourceTree = ""; }; + 0750BF0B192CF72B00F0FFA9 /* syn-intel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "syn-intel.c"; path = "../libudis86/syn-intel.c"; sourceTree = ""; }; + 0750BF0C192CF72B00F0FFA9 /* syn.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = syn.c; path = ../libudis86/syn.c; sourceTree = ""; }; + 0750BF0D192CF72B00F0FFA9 /* syn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = syn.h; path = ../libudis86/syn.h; sourceTree = ""; }; + 0750BF0E192CF72B00F0FFA9 /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = types.h; path = ../libudis86/types.h; sourceTree = ""; }; + 0750BF0F192CF72B00F0FFA9 /* udint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = udint.h; path = ../libudis86/udint.h; sourceTree = ""; }; + 0750BF10192CF72B00F0FFA9 /* udis86.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = udis86.c; path = ../libudis86/udis86.c; sourceTree = ""; }; + 0750BF1C192CF75300F0FFA9 /* avx.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = avx.xml; path = ../docs/x86/avx.xml; sourceTree = ""; }; + 0750BF1D192CF75300F0FFA9 /* optable.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = optable.xml; path = ../docs/x86/optable.xml; sourceTree = ""; }; + 0750BF1F192CF93B00F0FFA9 /* itab.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = itab.c; path = ../libudis86/itab.c; sourceTree = ""; }; + 0750BF20192CF93B00F0FFA9 /* itab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = itab.h; path = ../libudis86/itab.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 0750BEFD192CF6B300F0FFA9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0750BEF7192CF6B300F0FFA9 = { + isa = PBXGroup; + children = ( + 0750BF1B192CF73F00F0FFA9 /* xml */, + 0750BF23192CF94100F0FFA9 /* generated */, + 0750BF07192CF72B00F0FFA9 /* decode.c */, + 0750BF08192CF72B00F0FFA9 /* decode.h */, + 0750BF09192CF72B00F0FFA9 /* extern.h */, + 0750BF0A192CF72B00F0FFA9 /* syn-att.c */, + 0750BF0B192CF72B00F0FFA9 /* syn-intel.c */, + 0750BF0C192CF72B00F0FFA9 /* syn.c */, + 0750BF0D192CF72B00F0FFA9 /* syn.h */, + 0750BF0E192CF72B00F0FFA9 /* types.h */, + 0750BF0F192CF72B00F0FFA9 /* udint.h */, + 0750BF10192CF72B00F0FFA9 /* udis86.c */, + 0750BF01192CF6B300F0FFA9 /* Products */, + ); + sourceTree = ""; + }; + 0750BF01192CF6B300F0FFA9 /* Products */ = { + isa = PBXGroup; + children = ( + 0750BF00192CF6B300F0FFA9 /* libudis.a */, + ); + name = Products; + sourceTree = ""; + }; + 0750BF1B192CF73F00F0FFA9 /* xml */ = { + isa = PBXGroup; + children = ( + 0750BF1C192CF75300F0FFA9 /* avx.xml */, + 0750BF1D192CF75300F0FFA9 /* optable.xml */, + ); + name = xml; + sourceTree = ""; + }; + 0750BF23192CF94100F0FFA9 /* generated */ = { + isa = PBXGroup; + children = ( + 0750BF1F192CF93B00F0FFA9 /* itab.c */, + 0750BF20192CF93B00F0FFA9 /* itab.h */, + ); + name = generated; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 0750BEFE192CF6B300F0FFA9 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 0750BF17192CF72B00F0FFA9 /* syn.h in Headers */, + 0750BF13192CF72B00F0FFA9 /* extern.h in Headers */, + 0750BF22192CF93B00F0FFA9 /* itab.h in Headers */, + 0750BF19192CF72B00F0FFA9 /* udint.h in Headers */, + 0750BF18192CF72B00F0FFA9 /* types.h in Headers */, + 0750BF12192CF72B00F0FFA9 /* decode.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 0750BEFF192CF6B300F0FFA9 /* udis */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0750BF04192CF6B300F0FFA9 /* Build configuration list for PBXNativeTarget "udis" */; + buildPhases = ( + 0750BF1E192CF76100F0FFA9 /* ShellScript */, + 0750BEFC192CF6B300F0FFA9 /* Sources */, + 0750BEFD192CF6B300F0FFA9 /* Frameworks */, + 0750BEFE192CF6B300F0FFA9 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = udis; + productName = udis; + productReference = 0750BF00192CF6B300F0FFA9 /* libudis.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0750BEF8192CF6B300F0FFA9 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0510; + ORGANIZATIONNAME = "Cryptic Apps"; + }; + buildConfigurationList = 0750BEFB192CF6B300F0FFA9 /* Build configuration list for PBXProject "udis" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 0750BEF7192CF6B300F0FFA9; + productRefGroup = 0750BF01192CF6B300F0FFA9 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 0750BEFF192CF6B300F0FFA9 /* udis */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXShellScriptBuildPhase section */ + 0750BF1E192CF76100F0FFA9 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + $PROJECT_DIR/../docs/x86/optable.xml, + $PROJECT_DIR/../docs/x86/avx.xml, + ); + outputPaths = ( + $PROJECT_DIR/../itab.c, + $PROJECT_DIR/../itab.h, + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "python \"${PROJECT_DIR}/../scripts\"/ud_itab.py \"${PROJECT_DIR}/../docs/x86/optable.xml\" \"${PROJECT_DIR}/../libudis86\"\npython \"${PROJECT_DIR}/../scripts\"/ud_opcode.py\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 0750BEFC192CF6B300F0FFA9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0750BF16192CF72B00F0FFA9 /* syn.c in Sources */, + 0750BF21192CF93B00F0FFA9 /* itab.c in Sources */, + 0750BF14192CF72B00F0FFA9 /* syn-att.c in Sources */, + 0750BF15192CF72B00F0FFA9 /* syn-intel.c in Sources */, + 0750BF1A192CF72B00F0FFA9 /* udis86.c in Sources */, + 0750BF11192CF72B00F0FFA9 /* decode.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 0750BF02192CF6B300F0FFA9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.9; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 0750BF03192CF6B300F0FFA9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.9; + SDKROOT = macosx; + }; + name = Release; + }; + 0750BF05192CF6B300F0FFA9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + EXECUTABLE_PREFIX = lib; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 0750BF06192CF6B300F0FFA9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + EXECUTABLE_PREFIX = lib; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 0750BEFB192CF6B300F0FFA9 /* Build configuration list for PBXProject "udis" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0750BF02192CF6B300F0FFA9 /* Debug */, + 0750BF03192CF6B300F0FFA9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0750BF04192CF6B300F0FFA9 /* Build configuration list for PBXNativeTarget "udis" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0750BF05192CF6B300F0FFA9 /* Debug */, + 0750BF06192CF6B300F0FFA9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0750BEF8192CF6B300F0FFA9 /* Project object */; +} diff --git a/xcode/udis.xcworkspace/contents.xcworkspacedata b/xcode/udis.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..94f744d --- /dev/null +++ b/xcode/udis.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + From 07271f87d30317054ce1dff129302b4e7de08cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Be=CC=81nony?= Date: Wed, 21 May 2014 17:25:36 +0200 Subject: [PATCH 17/20] Fix the udcli.c file path. --- xcode/udcli/udcli.xcodeproj/project.pbxproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xcode/udcli/udcli.xcodeproj/project.pbxproj b/xcode/udcli/udcli.xcodeproj/project.pbxproj index b59effe..330e821 100644 --- a/xcode/udcli/udcli.xcodeproj/project.pbxproj +++ b/xcode/udcli/udcli.xcodeproj/project.pbxproj @@ -25,7 +25,7 @@ /* Begin PBXFileReference section */ 0750BF2D192CF98400F0FFA9 /* udcli */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = udcli; sourceTree = BUILT_PRODUCTS_DIR; }; - 0750BF39192CF9BB00F0FFA9 /* udcli.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = udcli.c; path = ../../../udcli/udcli.c; sourceTree = ""; }; + 0750BF39192CF9BB00F0FFA9 /* udcli.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = udcli.c; path = ../../udcli/udcli.c; sourceTree = SOURCE_ROOT; }; 0750BF3B192CFA6100F0FFA9 /* libudis.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libudis.a; path = "../../../../Library/Developer/Xcode/DerivedData/udis-cxhtywlfqipmbpakmbnrzkfnbegd/Build/Products/Debug/libudis.a"; sourceTree = ""; }; 0750BF3E192CFB0300F0FFA9 /* sample_input */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = sample_input; sourceTree = ""; }; /* End PBXFileReference section */ @@ -265,6 +265,7 @@ 0750BF38192CF98400F0FFA9 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; From 1c8dd143807a4bccacc4d9328da20e13dbdf64df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Be=CC=81nony?= Date: Wed, 21 May 2014 18:33:03 +0200 Subject: [PATCH 18/20] Change sample file with an AVX2 instruction. --- xcode/udcli/sample_input | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xcode/udcli/sample_input b/xcode/udcli/sample_input index 25b936d..f204a83 100644 --- a/xcode/udcli/sample_input +++ b/xcode/udcli/sample_input @@ -1 +1 @@ -90 90 90 \ No newline at end of file +C4 E2 7D 18 C0 \ No newline at end of file From 6dae47f7884ca4ef1f9a9cfcd62057c1fd6dee56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Thu, 2 Apr 2015 10:47:18 +0200 Subject: [PATCH 19/20] Fix an error on SSE movsd implicit register list. --- docs/x86/optable.xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/x86/optable.xml b/docs/x86/optable.xml index 89598c2..71bf407 100644 --- a/docs/x86/optable.xml +++ b/docs/x86/optable.xml @@ -5509,6 +5509,8 @@ W rsi rsi + rdi + rdi ________T__ rep seg @@ -5521,6 +5523,8 @@ W rsi rsi + rdi + rdi ________T__ rep seg oso rexw @@ -5531,10 +5535,12 @@ movsd W - rsi - rsi ________T__ + rsi + rsi + rdi + rdi rep seg oso rexw a5 /o=32 @@ -5557,6 +5563,8 @@ W rsi rsi + rdi + rdi ________T__ rep seg oso rexw From a9efff534e0c327a244f4172e5e3e4fc10f8bcaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9nony?= Date: Thu, 2 Apr 2015 10:47:46 +0200 Subject: [PATCH 20/20] Misc fixes --- libudis86/decode.c | 4 +- libudis86/syn.c | 2 +- libudis86/udis86.c | 2 +- xcode/udcli/udcli.xcodeproj/project.pbxproj | 10 +---- .../xcshareddata/udis.xccheckout | 41 +++++++++++++++++++ 5 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 xcode/udis.xcworkspace/xcshareddata/udis.xccheckout diff --git a/libudis86/decode.c b/libudis86/decode.c index 841924c..0929cca 100644 --- a/libudis86/decode.c +++ b/libudis86/decode.c @@ -668,7 +668,7 @@ decode_modrm_rm(struct ud *u, } if (offset) { - decode_mem_disp(u, offset, op); + decode_mem_disp(u, (unsigned int) offset, op); } else { op->offset = 0; } @@ -1276,7 +1276,7 @@ ud_decode(struct ud *u) u->pc += u->inp_ctr; /* move program counter by bytes decoded */ /* return number of bytes disassembled. */ - return u->inp_ctr; + return (unsigned int) u->inp_ctr; } /* diff --git a/libudis86/syn.c b/libudis86/syn.c index 8e64fc2..b32e32b 100644 --- a/libudis86/syn.c +++ b/libudis86/syn.c @@ -122,7 +122,7 @@ ud_asmprintf(struct ud *u, const char *fmt, ...) int avail; va_list ap; va_start(ap, fmt); - avail = u->asm_buf_size - u->asm_buf_fill - 1 /* nullchar */; + avail = (int) (u->asm_buf_size - u->asm_buf_fill - 1 /* nullchar */); ret = vsnprintf((char*) u->asm_buf + u->asm_buf_fill, avail, fmt, ap); if (ret < 0 || ret > avail) { u->asm_buf_fill = u->asm_buf_size - 1; diff --git a/libudis86/udis86.c b/libudis86/udis86.c index b52cdf0..0b92570 100644 --- a/libudis86/udis86.c +++ b/libudis86/udis86.c @@ -201,7 +201,7 @@ ud_insn_ptr(const struct ud* u) extern unsigned int ud_insn_len(const struct ud* u) { - return u->inp_ctr; + return (unsigned int) u->inp_ctr; } diff --git a/xcode/udcli/udcli.xcodeproj/project.pbxproj b/xcode/udcli/udcli.xcodeproj/project.pbxproj index 330e821..e528d0a 100644 --- a/xcode/udcli/udcli.xcodeproj/project.pbxproj +++ b/xcode/udcli/udcli.xcodeproj/project.pbxproj @@ -222,10 +222,7 @@ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, $PROJECT_DIR/../.., ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/udis-cxhtywlfqipmbpakmbnrzkfnbegd/Build/Products/Debug", - ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -238,10 +235,7 @@ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, $PROJECT_DIR/../.., ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(USER_LIBRARY_DIR)/Developer/Xcode/DerivedData/udis-cxhtywlfqipmbpakmbnrzkfnbegd/Build/Products/Debug", - ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; diff --git a/xcode/udis.xcworkspace/xcshareddata/udis.xccheckout b/xcode/udis.xcworkspace/xcshareddata/udis.xccheckout new file mode 100644 index 0000000..d3f87e1 --- /dev/null +++ b/xcode/udis.xcworkspace/xcshareddata/udis.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + 980919F3-84FE-4C51-AF58-3EA27FDB10DC + IDESourceControlProjectName + udis + IDESourceControlProjectOriginsDictionary + + 47C64E3B-8DF9-411A-AF46-BDA10C0F0122 + file:///Users/bsr/Dropbox/GIT/repos/udis86.git/ + + IDESourceControlProjectPath + xcode/udis.xcworkspace + IDESourceControlProjectRelativeInstallPathDictionary + + 47C64E3B-8DF9-411A-AF46-BDA10C0F0122 + ../.. + + IDESourceControlProjectURL + file:///Users/bsr/Dropbox/GIT/repos/udis86.git/ + IDESourceControlProjectVersion + 110 + IDESourceControlProjectWCCIdentifier + 47C64E3B-8DF9-411A-AF46-BDA10C0F0122 + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + 47C64E3B-8DF9-411A-AF46-BDA10C0F0122 + IDESourceControlWCCName + udis86 + + + +