test/ccmp.asm
raw| 1 | bits 64 |
| 2 | |
| 3 | %macro cxx 1 |
| 4 | %1 dl,sil |
| 5 | %1 dx,si |
| 6 | %1 edx,esi |
| 7 | %1 rdx,rsi |
| 8 | %1 rdx,r14 |
| 9 | %1 rdx,r30 |
| 10 | %1 cl,[rbx] |
| 11 | %1 cx,[rbx] |
| 12 | %1 ecx,[rbx] |
| 13 | %1 rcx,[rbx] |
| 14 | %1 cl, 0x10 |
| 15 | %1 cx, 0x10 |
| 16 | %1 cx, 0x1000 |
| 17 | %1 ecx, 0x10 |
| 18 | %1 ecx, 0x1000 |
| 19 | %1 rcx, 0x10 |
| 20 | %1 rcx, 0x1000 |
| 21 | %endmacro |
| 22 | |
| 23 | %macro cxdfv 1-2+ |
| 24 | cxx {%1 {dfv=%2}} |
| 25 | %endmacro |
| 26 | |
| 27 | %macro cx 1 |
| 28 | cxdfv %1 |
| 29 | cxdfv %1,cf |
| 30 | cxdfv %1,zf |
| 31 | cxdfv %1,cf,zf |
| 32 | cxdfv %1,sf |
| 33 | cxdfv %1,sf,cf |
| 34 | cxdfv %1,sf,zf |
| 35 | cxdfv %1,sf,cf,zf |
| 36 | cxdfv %1,of |
| 37 | cxdfv %1,of,cf |
| 38 | cxdfv %1,of,zf |
| 39 | cxdfv %1,of,cf,zf |
| 40 | cxdfv %1,of,sf |
| 41 | cxdfv %1,of,sf,cf |
| 42 | cxdfv %1,of,sf,zf |
| 43 | cxdfv %1,of,sf,cf,zf |
| 44 | %endmacro |
| 45 | |
| 46 | %macro cxi 1 |
| 47 | %assign n 0 |
| 48 | %rep 16 |
| 49 | cxx {%1 n,} |
| 50 | %assign n n+1 |
| 51 | %endrep |
| 52 | %endmacro |
| 53 | |
| 54 | %macro mkequ 1-2+ |
| 55 | dfv%1 equ {dfv=%2} |
| 56 | %endmacro |
| 57 | |
| 58 | %macro cxe 1 |
| 59 | %assign n 0 |
| 60 | %rep 16 |
| 61 | cxx {%1 dfv %+ n,} |
| 62 | %assign n n+1 |
| 63 | %endrep |
| 64 | %endmacro |
| 65 | |
| 66 | |
| 67 | %macro c 2 |
| 68 | %1 %{2}o |
| 69 | %1 %{2}no |
| 70 | %1 %{2}c |
| 71 | %1 %{2}nc |
| 72 | %1 %{2}z |
| 73 | %1 %{2}nz |
| 74 | %1 %{2}na |
| 75 | %1 %{2}a |
| 76 | %1 %{2}s |
| 77 | %1 %{2}ns |
| 78 | %1 %{2}f |
| 79 | %1 %{2}t |
| 80 | %1 %{2}l |
| 81 | %1 %{2}nl |
| 82 | %1 %{2}ng |
| 83 | %1 %{2}g |
| 84 | %endmacro |
| 85 | |
| 86 | mkequ 0 |
| 87 | mkequ 1,cf |
| 88 | mkequ 2,zf |
| 89 | mkequ 3,cf,zf |
| 90 | mkequ 4,sf |
| 91 | mkequ 5,sf,cf |
| 92 | mkequ 6,sf,zf |
| 93 | mkequ 7,sf,cf,zf |
| 94 | mkequ 8,of |
| 95 | mkequ 9,of,cf |
| 96 | mkequ 10,of,zf |
| 97 | mkequ 11,of,cf,zf |
| 98 | mkequ 12,of,sf |
| 99 | mkequ 13,of,sf,cf |
| 100 | mkequ 14,of,sf,zf |
| 101 | mkequ 15,of,sf,cf,zf |
| 102 | |
| 103 | c cxdfv, ccmp |
| 104 | c cxi, ccmp |
| 105 | c cxe, ccmp |
| 106 | |
| 107 | nop |
| 108 | nop |
| 109 | nop |
| 110 | |
| 111 | db 0xb0, {dfv=of,sf}&~{dfv=cf,sf} |
| 112 | mov al, ({dfv=of,sf}&~{dfv=cf,sf}) |