travis/test/xchg.asm
raw| 1 | ;Testname=unoptimized; Arguments=-fbin -oxchg.bin -O0; Files=stdout stderr xchg.bin |
| 2 | ;Testname=optimized; Arguments=-fbin -oxchg.bin -Ox; Files=stdout stderr xchg.bin |
| 3 | |
| 4 | %macro x 2 |
| 5 | xchg %1,%2 |
| 6 | xchg %2,%1 |
| 7 | xchg %2,%2 |
| 8 | xchg %2,MEM |
| 9 | xchg MEM,%2 |
| 10 | %endmacro |
| 11 | |
| 12 | bits 16 |
| 13 | %define MEM [bx] |
| 14 | x al,al |
| 15 | x al,cl |
| 16 | x al,dl |
| 17 | x al,bl |
| 18 | x al,ah |
| 19 | x al,ch |
| 20 | x al,dh |
| 21 | x al,bh |
| 22 | x ax,ax |
| 23 | x ax,cx |
| 24 | x ax,dx |
| 25 | x ax,bx |
| 26 | x ax,sp |
| 27 | x ax,bp |
| 28 | x ax,si |
| 29 | x ax,di |
| 30 | x bx,dx |
| 31 | x cx,dx |
| 32 | x eax,eax |
| 33 | x eax,ecx |
| 34 | x eax,edx |
| 35 | x eax,ebx |
| 36 | x eax,esp |
| 37 | x eax,ebp |
| 38 | x eax,esi |
| 39 | x eax,edi |
| 40 | x ebx,edx |
| 41 | x ecx,edx |
| 42 | |
| 43 | bits 32 |
| 44 | %define MEM [ebx] |
| 45 | align 64 |
| 46 | x al,al |
| 47 | x al,cl |
| 48 | x al,dl |
| 49 | x al,bl |
| 50 | x al,ah |
| 51 | x al,ch |
| 52 | x al,dh |
| 53 | x al,bh |
| 54 | x ax,ax |
| 55 | x ax,cx |
| 56 | x ax,dx |
| 57 | x ax,bx |
| 58 | x ax,sp |
| 59 | x ax,bp |
| 60 | x ax,si |
| 61 | x ax,di |
| 62 | x bx,dx |
| 63 | x cx,dx |
| 64 | x eax,eax |
| 65 | x eax,ecx |
| 66 | x eax,edx |
| 67 | x eax,ebx |
| 68 | x eax,esp |
| 69 | x eax,ebp |
| 70 | x eax,esi |
| 71 | x eax,edi |
| 72 | x ebx,edx |
| 73 | x ecx,edx |
| 74 | |
| 75 | bits 64 |
| 76 | %define MEM [rbx] |
| 77 | align 64 |
| 78 | x al,al |
| 79 | x al,cl |
| 80 | x al,dl |
| 81 | x al,bl |
| 82 | x al,ah |
| 83 | x al,ch |
| 84 | x al,dh |
| 85 | x al,bh |
| 86 | x al,spl |
| 87 | x al,bpl |
| 88 | x al,sil |
| 89 | x al,dil |
| 90 | x al,r8b |
| 91 | x al,r9b |
| 92 | x al,r10b |
| 93 | x al,r11b |
| 94 | x al,r12b |
| 95 | x al,r13b |
| 96 | x al,r14b |
| 97 | x al,r15b |
| 98 | x ax,ax |
| 99 | x ax,cx |
| 100 | x ax,dx |
| 101 | x ax,bx |
| 102 | x ax,sp |
| 103 | x ax,bp |
| 104 | x ax,si |
| 105 | x ax,di |
| 106 | x ax,r8w |
| 107 | x ax,r9w |
| 108 | x ax,r10w |
| 109 | x ax,r11w |
| 110 | x ax,r12w |
| 111 | x ax,r13w |
| 112 | x ax,r14w |
| 113 | x ax,r15w |
| 114 | x bx,dx |
| 115 | x cx,dx |
| 116 | x eax,eax |
| 117 | x eax,ecx |
| 118 | x eax,edx |
| 119 | x eax,ebx |
| 120 | x eax,esp |
| 121 | x eax,ebp |
| 122 | x eax,esi |
| 123 | x eax,edi |
| 124 | x eax,r8d |
| 125 | x eax,r9d |
| 126 | x eax,r10d |
| 127 | x eax,r11d |
| 128 | x eax,r12d |
| 129 | x eax,r13d |
| 130 | x eax,r14d |
| 131 | x eax,r15d |
| 132 | x ebx,edx |
| 133 | x ecx,edx |
| 134 | x rax,rax |
| 135 | x rax,rcx |
| 136 | x rax,rdx |
| 137 | x rax,rbx |
| 138 | x rax,rsp |
| 139 | x rax,rbp |
| 140 | x rax,rsi |
| 141 | x rax,rdi |
| 142 | x rax,r8 |
| 143 | x rax,r9 |
| 144 | x rax,r10 |
| 145 | x rax,r11 |
| 146 | x rax,r12 |
| 147 | x rax,r13 |
| 148 | x rax,r14 |
| 149 | x rax,r15 |
| 150 | x rbx,rdx |
| 151 | x rcx,rdx |