| 1 |
From Coq Require Import String List. |
| 2 |
Import ListNotations. |
| 3 |
Local Open Scope string_scope. |
| 4 |
Local Open Scope list_scope. |
| 5 |
Example example : list string := [ |
| 6 |
"SECTION .text"; |
| 7 |
" GLOBAL fiat_25519_carry_square_optimised"; |
| 8 |
""; |
| 9 |
"fiat_25519_carry_square_optimised:"; |
| 10 |
" sub rsp, 0x38 "; |
| 11 |
" mov [rsp + 0x08 * 0 ], rbx; saving to stack"; |
| 12 |
" mov [rsp + 0x08 * 1 ], rbp; saving to stack"; |
| 13 |
" mov [rsp + 0x08 * 2 ], r12; saving to stack"; |
| 14 |
" mov [rsp + 0x08 * 3 ], r13; saving to stack"; |
| 15 |
" mov [rsp + 0x08 * 4 ], r14; saving to stack"; |
| 16 |
" mov [rsp + 0x08 * 5 ], r15; saving to stack"; |
| 17 |
" ; rdi contains out1"; |
| 18 |
" ; rsi contains arg1"; |
| 19 |
" ; fr:rax,r10,r11,rbx,rbp,r12,r13,r14,r15,rdx,rcx,r8,r9"; |
| 20 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi""]"; |
| 21 |
" ;chose >>RANDOMLY<< r10 from candidates :rax, r10, r11, rbx, rbp, r12, r13, r14, r15, rdx, rcx, r8, r9[1]."; |
| 22 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10""]"; |
| 23 |
" imul r10, [rsi + 0x08 * 4 ], 0x13; x1 <- arg1[4] * 0x13"; |
| 24 |
" ;CF: KILLED,OF: KILLED"; |
| 25 |
" ; fr:rax,r11,rbx,rbp,r12,r13,r14,r15,rdx,rcx,r8,r9"; |
| 26 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10""]"; |
| 27 |
" ;chose >>RANDOMLY<< rbx from candidates :rax, r11, rbx, rbp, r12, r13, r14, r15, rdx, rcx, r8, r9[2]."; |
| 28 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbx""]"; |
| 29 |
" imul rbx, r10, 0x2; x2 <- x1 * 0x2"; |
| 30 |
" ;CF: KILLED,OF: KILLED"; |
| 31 |
" ;chose >>saved<< x2 from:arg1[1], x2[1] and candidates: arg1[1], x2"; |
| 32 |
" mov rdx, rbx; x2 to rdx"; |
| 33 |
" ; fr:rax,r11,rbx,rbp,r12,r13,r14,r15,rcx,r8,r9"; |
| 34 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rdx""]"; |
| 35 |
" ;chose >>RANDOMLY<< r14 from candidates :rax, r11, rbx, rbp, r12, r13, r14, r15, rcx, r8, r9[6]."; |
| 36 |
" ; fr:rax,r11,rbx,rbp,r12,r13,r15,rcx,r8,r9"; |
| 37 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rdx"",""x22:r14""]"; |
| 38 |
" ;chose >>RANDOMLY<< r15 from candidates :rax, r11, rbx, rbp, r12, r13, r15, rcx, r8, r9[6]."; |
| 39 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rdx"",""x22:r14"",""x21:r15""]"; |
| 40 |
" mulx r14, r15, [rsi + 0x08 * 1 ]; x22, x21<- arg1[1] * x2"; |
| 41 |
" ;chose >>saved<< arg1[0] from:arg1[0], arg1[0][1] and candidates: arg1[0], arg1[0]"; |
| 42 |
" ; fr:rax,r11,rbx,rbp,r12,r13,rcx,r8,r9"; |
| 43 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rdx"",""x22:r14"",""x21:r15"",""arg1[0]:rdx""]"; |
| 44 |
" ;chose >>RANDOMLY<< rbp from candidates :rax, r11, rbx, rbp, r12, r13, rcx, r8, r9[3]."; |
| 45 |
" mov rbp, rdx; preserving value of x2 into a new reg"; |
| 46 |
" mov rdx, [rsi + 0x08 * 0 ]; saving arg1[0] in rdx."; |
| 47 |
" ; fr:rax,r11,rbx,r12,r13,rcx,r8,r9"; |
| 48 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x22:r14"",""x21:r15"",""arg1[0]:rdx""]"; |
| 49 |
" ;chose >>RANDOMLY<< r9 from candidates :rax, r11, rbx, r12, r13, rcx, r8, r9[7]."; |
| 50 |
" ; fr:rax,r11,rbx,r12,r13,rcx,r8"; |
| 51 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x22:r14"",""x21:r15"",""arg1[0]:rdx"",""x38:r9""]"; |
| 52 |
" ;chose >>RANDOMLY<< r12 from candidates :rax, r11, rbx, r12, r13, rcx, r8[3]."; |
| 53 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x22:r14"",""x21:r15"",""arg1[0]:rdx"",""x38:r9"",""x37:r12""]"; |
| 54 |
" mulx r9, r12, [rsi + 0x08 * 0 ]; x38, x37<- arg1[0] * arg1[0]"; |
| 55 |
" ; fr:rax,r11,rbx,r13,rcx,r8"; |
| 56 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x22:r14"",""x21:r15"",""arg1[0]:rdx"",""x38:r9"",""x37:r12""]"; |
| 57 |
" ;chose >>RANDOMLY<< rbx from candidates :rax, r11, rbx, r13, rcx, r8[2]."; |
| 58 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x22:r14"",""x21:r15"",""arg1[0]:rdx"",""x38:r9"",""x37:r12"",""x4:rbx""]"; |
| 59 |
" imul rbx, [rsi + 0x08 * 3 ], 0x13; x4 <- arg1[3] * 0x13"; |
| 60 |
" ;CF: KILLED,OF: KILLED"; |
| 61 |
" ; fr:rax,r11,r13,rcx,r8"; |
| 62 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x22:r14"",""x21:r15"",""arg1[0]:rdx"",""x38:r9"",""x37:r12"",""x4:rbx""]"; |
| 63 |
" ;chose >>RANDOMLY<< r11 from candidates :rax, r11, r13, rcx, r8[1]."; |
| 64 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x22:r14"",""x21:r15"",""arg1[0]:rdx"",""x38:r9"",""x37:r12"",""x4:rbx"",""x5:r11""]"; |
| 65 |
" imul r11, rbx, 0x2; x5 <- x4 * 0x2"; |
| 66 |
" ;CF: KILLED,OF: KILLED"; |
| 67 |
" ;chose >>saved<< x5 from:arg1[2], x5[1] and candidates: arg1[2], x5"; |
| 68 |
" mov rdx, r11; x5 to rdx"; |
| 69 |
" ; fr:rax,r11,r13,rcx,r8"; |
| 70 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x22:r14"",""x21:r15"",""x38:r9"",""x37:r12"",""x4:rbx"",""x18:rdx""]"; |
| 71 |
" ;chose >>RANDOMLY<< rax from candidates :rax, r11, r13, rcx, r8[0]."; |
| 72 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x22:r14"",""x21:r15"",""x38:r9"",""x37:r12"",""x4:rbx"",""x18:rdx"",""x17:rax""]"; |
| 73 |
" mulx rdx, rax, [rsi + 0x08 * 2 ]; x18, x17<- arg1[2] * x5"; |
| 74 |
" "; |
| 75 |
""; |
| 76 |
" ; add:"; |
| 77 |
" ; r:x39,f:x40<-add(0x0,x21,x17)"; |
| 78 |
" ; CF: KILLED,OF: KILLED"; |
| 79 |
" ;chose >>saved<< c_xor_adx from:c_add, c_xor_adx, c_test_adx[1] and candidates: c_add, c_xor_adx, c_test_adx"; |
| 80 |
" ; fr:r11,r13,rcx,r8"; |
| 81 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x22:r14"",""x38:r9"",""x37:r12"",""x4:rbx"",""x18:rdx"",""x17:rax"",""x39:r15""]"; |
| 82 |
" ;chose >>RANDOMLY<< r13 from candidates :r11, r13, rcx, r8[1]."; |
| 83 |
" xor r13, r13"; |
| 84 |
" ;chose >>saved<< OF from:CF, OF[1] and candidates: CF, OF"; |
| 85 |
" adox r15, rax"; |
| 86 |
" "; |
| 87 |
""; |
| 88 |
" ; add:"; |
| 89 |
" ; r:x41,f:_<-add(x40,x22,x18)"; |
| 90 |
" ; CF: ZERO,OF: ALIVE"; |
| 91 |
" adox r14, rdx"; |
| 92 |
" "; |
| 93 |
""; |
| 94 |
" ; add:"; |
| 95 |
" ; r:x43,f:x44<-add(0x0,x37,x39)"; |
| 96 |
" ; CF: ZERO,OF: KILLED"; |
| 97 |
" adcx r12, r15"; |
| 98 |
" "; |
| 99 |
""; |
| 100 |
" ; add:"; |
| 101 |
" ; r:x45,f:_<-add(x44,x38,x41)"; |
| 102 |
" ; CF: ALIVE,OF: KILLED"; |
| 103 |
" adcx r9, r14"; |
| 104 |
" ; fr:r11,rcx,r8"; |
| 105 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x4:rbx"",""x18:rdx"",""x17:rax"",""x39:r15"",""0x0:r13"",""x40:OF"",""x41:r14"",""x43:r12"",""x44:CF"",""x45:r9""]"; |
| 106 |
" ;chose >>RANDOMLY<< rcx from candidates :r11, rcx, r8[1]."; |
| 107 |
" mov rcx, r12; x47, copying x43 here, cause x43 is needed in a reg for other than x47, namely all: , x47, x48, size: 2"; |
| 108 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x4:rbx"",""x18:rdx"",""x17:rax"",""x39:r15"",""0x0:r13"",""x40:OF"",""x41:r14"",""x43:r12"",""x44:CF"",""x45:r9"",""x47:rcx""]"; |
| 109 |
" shrd rcx, r9, 51; x47 <- x45||x43 >> 51"; |
| 110 |
" ; fr:r11,r8"; |
| 111 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x4:rbx"",""x18:rdx"",""x17:rax"",""x39:r15"",""0x0:r13"",""x40:OF"",""x41:r14"",""x43:r12"",""x44:CF"",""x45:r9"",""x47:rcx""]"; |
| 112 |
" ;chose >>RANDOMLY<< r8 from candidates :r11, r8[1]."; |
| 113 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x4:rbx"",""x18:rdx"",""x17:rax"",""x39:r15"",""0x0:r13"",""x40:OF"",""x41:r14"",""x43:r12"",""x44:CF"",""x45:r9"",""x47:rcx"",""x8:r8""]"; |
| 114 |
" imul r8, [rsi + 0x08 * 1 ], 0x2; x8 <- arg1[1] * 0x2"; |
| 115 |
" ;CF: KILLED,OF: KILLED"; |
| 116 |
" ;chose >>saved<< arg1[0] from:arg1[0], x8[0] and candidates: arg1[0], x8"; |
| 117 |
" mov rdx, [rsi + 0x08 * 0 ]; arg1[0] to rdx"; |
| 118 |
" ; fr:r11"; |
| 119 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x4:rbx"",""x17:rax"",""x39:r15"",""0x0:r13"",""x40:OF"",""x41:r14"",""x43:r12"",""x44:CF"",""x45:r9"",""x47:rcx"",""arg1[0]:rdx"",""x36:r8""]"; |
| 120 |
" ;chose >>RANDOMLY<< r11 from candidates :r11[0]."; |
| 121 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rbp"",""x4:rbx"",""x17:rax"",""x39:r15"",""0x0:r13"",""x40:OF"",""x41:r14"",""x43:r12"",""x44:CF"",""x45:r9"",""x47:rcx"",""arg1[0]:rdx"",""x36:r8"",""x35:r11""]"; |
| 122 |
" mulx r8, r11, r8; x36, x35<- arg1[0] * x8"; |
| 123 |
" ;chose >>saved<< x2 from:arg1[2], x2[1] and candidates: arg1[2], x2"; |
| 124 |
" mov rdx, rbp; x2 to rdx"; |
| 125 |
" ; fr:rbp"; |
| 126 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rdx"",""x4:rbx"",""x17:rax"",""x39:r15"",""0x0:r13"",""x40:OF"",""x41:r14"",""x43:r12"",""x44:CF"",""x45:r9"",""x47:rcx"",""x36:r8"",""x35:r11""]"; |
| 127 |
" ;chose >>RANDOMLY<< rbp from candidates :rbp[0]."; |
| 128 |
" ; fr:"; |
| 129 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rdx"",""x4:rbx"",""x17:rax"",""x39:r15"",""0x0:r13"",""x40:OF"",""x41:r14"",""x43:r12"",""x44:CF"",""x45:r9"",""x47:rcx"",""x36:r8"",""x35:r11"",""x16:rbp""]"; |
| 130 |
" ; freeing x17 (rax) no dependants anymore"; |
| 131 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rdx"",""x4:rbx"",""x39:r15"",""0x0:r13"",""x40:OF"",""x41:r14"",""x43:r12"",""x44:CF"",""x45:r9"",""x47:rcx"",""x36:r8"",""x35:r11"",""x16:rbp"",""x15:rax""]"; |
| 132 |
" mulx rbp, rax, [rsi + 0x08 * 2 ]; x16, x15<- arg1[2] * x2"; |
| 133 |
" ;chose >>saved<< arg1[3] from:arg1[3], x4[0] and candidates: arg1[3], x4"; |
| 134 |
" ; fr:"; |
| 135 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:rdx"",""x4:rbx"",""x39:r15"",""0x0:r13"",""x40:OF"",""x41:r14"",""x43:r12"",""x44:CF"",""x45:r9"",""x47:rcx"",""x36:r8"",""x35:r11"",""x16:rbp"",""x15:rax"",""arg1[3]:rdx""]"; |
| 136 |
" ; freeing x39 (r15) no dependants anymore"; |
| 137 |
" mov r15, rdx; preserving value of x2 into a new reg"; |
| 138 |
" mov rdx, [rsi + 0x08 * 3 ]; saving arg1[3] in rdx."; |
| 139 |
" ; fr:"; |
| 140 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:r15"",""0x0:r13"",""x40:OF"",""x41:r14"",""x43:r12"",""x44:CF"",""x45:r9"",""x47:rcx"",""x36:r8"",""x35:r11"",""x16:rbp"",""x15:rax"",""arg1[3]:rdx"",""x14:rbx""]"; |
| 141 |
" ; freeing x41 (r14) no dependants anymore"; |
| 142 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:r15"",""0x0:r13"",""x40:OF"",""x43:r12"",""x44:CF"",""x45:r9"",""x47:rcx"",""x36:r8"",""x35:r11"",""x16:rbp"",""x15:rax"",""arg1[3]:rdx"",""x14:rbx"",""x13:r14""]"; |
| 143 |
" mulx rbx, r14, rbx; x14, x13<- arg1[3] * x4"; |
| 144 |
" "; |
| 145 |
""; |
| 146 |
" ; add:"; |
| 147 |
" ; r:x73,f:x74<-add(0x0,x15,x13)"; |
| 148 |
" ; CF: KILLED,OF: KILLED"; |
| 149 |
" ;chose >>saved<< c_add from:c_add, c_xor_adx, c_test_adx[0] and candidates: c_add, c_xor_adx, c_test_adx"; |
| 150 |
" add rax, r14; could be done better, if r0 has been u8 as well"; |
| 151 |
" "; |
| 152 |
""; |
| 153 |
" ; add:"; |
| 154 |
" ; r:x77,f:x78<-add(0x0,x35,x73)"; |
| 155 |
" ; CF: ALIVE,OF: KILLED"; |
| 156 |
" dec r13; OF<-0x0, preserve CF 3"; |
| 157 |
" adox r11, rax"; |
| 158 |
" "; |
| 159 |
""; |
| 160 |
" ; add:"; |
| 161 |
" ; r:x75,f:_<-add(x74,x16,x14)"; |
| 162 |
" ; CF: ALIVE,OF: ALIVE"; |
| 163 |
" adcx rbp, rbx"; |
| 164 |
" "; |
| 165 |
""; |
| 166 |
" ; add:"; |
| 167 |
" ; r:x79,f:_<-add(x78,x36,x75)"; |
| 168 |
" ; CF: KILLED,OF: ALIVE"; |
| 169 |
" adox r8, rbp"; |
| 170 |
" "; |
| 171 |
""; |
| 172 |
" ; add:"; |
| 173 |
" ; r:x81,f:x82<-add(0x0,x47,x77)"; |
| 174 |
" ; CF: KILLED,OF: KILLED"; |
| 175 |
" ;chose >>saved<< c_add from:c_add, c_xor_adx, c_test_adx[0] and candidates: c_add, c_xor_adx, c_test_adx"; |
| 176 |
" add rcx, r11; could be done better, if r0 has been u8 as well"; |
| 177 |
" "; |
| 178 |
""; |
| 179 |
" ; add:"; |
| 180 |
" ; r:x83,f:_<-add(x82,x79)"; |
| 181 |
" ; CF: ALIVE,OF: KILLED"; |
| 182 |
" adc r8, 0x0"; |
| 183 |
" ; fr:"; |
| 184 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:r15"",""x43:r12"",""x45:r9"",""arg1[3]:rdx"",""x14:rbx"",""x13:r14"",""x73:rax"",""x77:r11"",""-0x1:r13"",""x78:OF"",""x75:rbp"",""x81:rcx"",""x82:CF"",""x83:r8""]"; |
| 185 |
" ; freeing x45 (r9) no dependants anymore"; |
| 186 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:r15"",""x43:r12"",""arg1[3]:rdx"",""x14:rbx"",""x13:r14"",""x73:rax"",""x77:r11"",""-0x1:r13"",""x78:OF"",""x75:rbp"",""x81:rcx"",""x82:CF"",""x83:r8"",""x7:r9""]"; |
| 187 |
" imul r9, [rsi + 0x08 * 2 ], 0x2; x7 <- arg1[2] * 0x2"; |
| 188 |
" ;CF: KILLED,OF: KILLED"; |
| 189 |
" ;chose >>saved<< arg1[0] from:arg1[0], x7[0] and candidates: arg1[0], x7"; |
| 190 |
" mov rdx, [rsi + 0x08 * 0 ]; arg1[0] to rdx"; |
| 191 |
" ; fr:"; |
| 192 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:r15"",""x43:r12"",""x14:rbx"",""x13:r14"",""x73:rax"",""x77:r11"",""-0x1:r13"",""x78:OF"",""x75:rbp"",""x81:rcx"",""x82:CF"",""x83:r8"",""x7:r9"",""arg1[0]:rdx""]"; |
| 193 |
" ; freeing x14 (rbx) no dependants anymore"; |
| 194 |
" ; fr:"; |
| 195 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:r15"",""x43:r12"",""x13:r14"",""x73:rax"",""x77:r11"",""-0x1:r13"",""x78:OF"",""x75:rbp"",""x81:rcx"",""x82:CF"",""x83:r8"",""x7:r9"",""arg1[0]:rdx"",""x34:rbx""]"; |
| 196 |
" ; freeing x13 (r14) no dependants anymore"; |
| 197 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:r15"",""x43:r12"",""x73:rax"",""x77:r11"",""-0x1:r13"",""x78:OF"",""x75:rbp"",""x81:rcx"",""x82:CF"",""x83:r8"",""x7:r9"",""arg1[0]:rdx"",""x34:rbx"",""x33:r14""]"; |
| 198 |
" mulx rbx, r14, r9; x34, x33<- arg1[0] * x7"; |
| 199 |
" ; fr:"; |
| 200 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:r15"",""x43:r12"",""x73:rax"",""x77:r11"",""-0x1:r13"",""x78:OF"",""x75:rbp"",""x81:rcx"",""x82:CF"",""x83:r8"",""x7:r9"",""arg1[0]:rdx"",""x34:rbx"",""x33:r14""]"; |
| 201 |
" ; freeing x73 (rax) no dependants anymore"; |
| 202 |
" mov rax, rcx; x84, copying x81 here, cause x81 is needed in a reg for other than x84, namely all: , x84, x85, size: 2"; |
| 203 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:r15"",""x43:r12"",""x77:r11"",""-0x1:r13"",""x78:OF"",""x75:rbp"",""x81:rcx"",""x82:CF"",""x83:r8"",""x7:r9"",""arg1[0]:rdx"",""x34:rbx"",""x33:r14"",""x84:rax""]"; |
| 204 |
" shrd rax, r8, 51; x84 <- x83||x81 >> 51"; |
| 205 |
" ;chose >>saved<< arg1[1] from:arg1[1], arg1[1][1] and candidates: arg1[1], arg1[1]"; |
| 206 |
" mov rdx, [rsi + 0x08 * 1 ]; arg1[1] to rdx"; |
| 207 |
" ; fr:"; |
| 208 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:r15"",""x43:r12"",""x77:r11"",""-0x1:r13"",""x78:OF"",""x75:rbp"",""x81:rcx"",""x82:CF"",""x83:r8"",""x7:r9"",""x34:rbx"",""x33:r14"",""x84:rax"",""arg1[1]:rdx""]"; |
| 209 |
" ; freeing x77 (r11) no dependants anymore"; |
| 210 |
" ; fr:"; |
| 211 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:r15"",""x43:r12"",""-0x1:r13"",""x78:OF"",""x75:rbp"",""x81:rcx"",""x82:CF"",""x83:r8"",""x7:r9"",""x34:rbx"",""x33:r14"",""x84:rax"",""arg1[1]:rdx"",""x28:r11""]"; |
| 212 |
" ; freeing x75 (rbp) no dependants anymore"; |
| 213 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x2:r15"",""x43:r12"",""-0x1:r13"",""x78:OF"",""x81:rcx"",""x82:CF"",""x83:r8"",""x7:r9"",""x34:rbx"",""x33:r14"",""x84:rax"",""arg1[1]:rdx"",""x28:r11"",""x27:rbp""]"; |
| 214 |
" mulx r11, rbp, [rsi + 0x08 * 1 ]; x28, x27<- arg1[1] * arg1[1]"; |
| 215 |
" ;chose >>saved<< x2 from:arg1[3], x2[1] and candidates: arg1[3], x2"; |
| 216 |
" mov rdx, r15; x2 to rdx"; |
| 217 |
" ; fr:r15"; |
| 218 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x43:r12"",""-0x1:r13"",""x78:OF"",""x81:rcx"",""x82:CF"",""x83:r8"",""x7:r9"",""x34:rbx"",""x33:r14"",""x84:rax"",""x28:r11"",""x27:rbp"",""x12:rdx""]"; |
| 219 |
" ;chose >>RANDOMLY<< r15 from candidates :r15[0]."; |
| 220 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x43:r12"",""-0x1:r13"",""x78:OF"",""x81:rcx"",""x82:CF"",""x83:r8"",""x7:r9"",""x34:rbx"",""x33:r14"",""x84:rax"",""x28:r11"",""x27:rbp"",""x12:rdx"",""x11:r15""]"; |
| 221 |
" mulx rdx, r15, [rsi + 0x08 * 3 ]; x12, x11<- arg1[3] * x2"; |
| 222 |
" "; |
| 223 |
""; |
| 224 |
" ; add:"; |
| 225 |
" ; r:x65,f:x66<-add(0x0,x27,x11)"; |
| 226 |
" ; CF: KILLED,OF: KILLED"; |
| 227 |
" ;chose >>saved<< c_xor_adx from:c_add, c_xor_adx, c_test_adx[1] and candidates: c_add, c_xor_adx, c_test_adx"; |
| 228 |
" ; fr:"; |
| 229 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x43:r12"",""-0x1:r13"",""x78:OF"",""x81:rcx"",""x82:CF"",""x83:r8"",""x7:r9"",""x34:rbx"",""x33:r14"",""x84:rax"",""x28:r11"",""x12:rdx"",""x11:r15"",""x65:rbp""]"; |
| 230 |
" ; freeing x83 (r8) no dependants anymore"; |
| 231 |
" xor r8, r8"; |
| 232 |
" ;chose >>saved<< CF from:CF, OF[0] and candidates: CF, OF"; |
| 233 |
" adox rbp, r15"; |
| 234 |
" "; |
| 235 |
""; |
| 236 |
" ; add:"; |
| 237 |
" ; r:x69,f:x70<-add(0x0,x33,x65)"; |
| 238 |
" ; CF: ZERO,OF: ALIVE"; |
| 239 |
" adcx r14, rbp"; |
| 240 |
" "; |
| 241 |
""; |
| 242 |
" ; add:"; |
| 243 |
" ; r:x67,f:_<-add(x66,x28,x12)"; |
| 244 |
" ; CF: ALIVE,OF: ALIVE"; |
| 245 |
" adox r11, rdx"; |
| 246 |
" "; |
| 247 |
""; |
| 248 |
" ; add:"; |
| 249 |
" ; r:x86,f:x87<-add(0x0,x84,x69)"; |
| 250 |
" ; CF: ALIVE,OF: KILLED"; |
| 251 |
" inc r13; OF<-0x0, preserve CF 1"; |
| 252 |
" adox rax, r14"; |
| 253 |
" "; |
| 254 |
""; |
| 255 |
" ; add:"; |
| 256 |
" ; r:x71,f:_<-add(x70,x34,x67)"; |
| 257 |
" ; CF: ALIVE,OF: ALIVE"; |
| 258 |
" adcx rbx, r11"; |
| 259 |
" "; |
| 260 |
""; |
| 261 |
" ; add:"; |
| 262 |
" ; r:x88,f:_<-add(x87,x71)"; |
| 263 |
" ; CF: KILLED,OF: ALIVE"; |
| 264 |
" adox rbx, r13"; |
| 265 |
" ; fr:r8"; |
| 266 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x43:r12"",""x81:rcx"",""x7:r9"",""x12:rdx"",""x11:r15"",""x65:rbp"",""0x0:r13"",""x69:r14"",""x70:CF"",""x67:r11"",""x86:rax"",""x87:OF"",""x88:rbx""]"; |
| 267 |
" ;chose >>RANDOMLY<< r8 from candidates :r8[0]."; |
| 268 |
" mov r8, 0x7ffffffffffff ; moving imm to reg"; |
| 269 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x81:rcx"",""x7:r9"",""x12:rdx"",""x11:r15"",""x65:rbp"",""0x0:r13"",""x69:r14"",""x70:CF"",""x67:r11"",""x86:rax"",""x87:OF"",""x88:rbx"",""0x7ffffffffffff:r8"",""x48:r12""]"; |
| 270 |
" and r12, r8; x48 <- x43& 0x7ffffffffffff"; |
| 271 |
" ; fr:"; |
| 272 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x81:rcx"",""x7:r9"",""x12:rdx"",""x11:r15"",""x65:rbp"",""0x0:r13"",""x69:r14"",""x70:CF"",""x67:r11"",""x86:rax"",""x87:OF"",""x88:rbx"",""0x7ffffffffffff:r8"",""x48:r12""]"; |
| 273 |
" ; freeing x12 (rdx) no dependants anymore"; |
| 274 |
" mov rdx, rax; x89, copying x86 here, cause x86 is needed in a reg for other than x89, namely all: , x89, x90, size: 2"; |
| 275 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x81:rcx"",""x7:r9"",""x11:r15"",""x65:rbp"",""0x0:r13"",""x69:r14"",""x70:CF"",""x67:r11"",""x86:rax"",""x87:OF"",""x88:rbx"",""0x7ffffffffffff:r8"",""x48:r12"",""x89:rdx""]"; |
| 276 |
" shrd rdx, rbx, 51; x89 <- x88||x86 >> 51"; |
| 277 |
" ; fr:"; |
| 278 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x81:rcx"",""x7:r9"",""x11:r15"",""x65:rbp"",""0x0:r13"",""x69:r14"",""x70:CF"",""x67:r11"",""x86:rax"",""x87:OF"",""x88:rbx"",""0x7ffffffffffff:r8"",""x48:r12"",""x89:rdx""]"; |
| 279 |
" ; freeing x11 (r15) no dependants anymore"; |
| 280 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x81:rcx"",""x7:r9"",""x65:rbp"",""0x0:r13"",""x69:r14"",""x70:CF"",""x67:r11"",""x86:rax"",""x87:OF"",""x88:rbx"",""0x7ffffffffffff:r8"",""x48:r12"",""x89:rdx"",""x6:r15""]"; |
| 281 |
" imul r15, [rsi + 0x08 * 3 ], 0x2; x6 <- arg1[3] * 0x2"; |
| 282 |
" ;CF: KILLED,OF: KILLED"; |
| 283 |
" ;chose >>saved<< arg1[0] from:arg1[0], x6[0] and candidates: arg1[0], x6"; |
| 284 |
" ; fr:"; |
| 285 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x81:rcx"",""x7:r9"",""x65:rbp"",""0x0:r13"",""x69:r14"",""x70:CF"",""x67:r11"",""x86:rax"",""x87:OF"",""x88:rbx"",""0x7ffffffffffff:r8"",""x48:r12"",""x89:rdx"",""x6:r15"",""arg1[0]:rdx""]"; |
| 286 |
" ; freeing x65 (rbp) no dependants anymore"; |
| 287 |
" mov rbp, rdx; preserving value of x89 into a new reg"; |
| 288 |
" mov rdx, [rsi + 0x08 * 0 ]; saving arg1[0] in rdx."; |
| 289 |
" ; fr:"; |
| 290 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x81:rcx"",""x7:r9"",""0x0:r13"",""x69:r14"",""x70:CF"",""x67:r11"",""x86:rax"",""x87:OF"",""x88:rbx"",""0x7ffffffffffff:r8"",""x48:r12"",""x89:rbp"",""x6:r15"",""arg1[0]:rdx""]"; |
| 291 |
" ; freeing x69 (r14) no dependants anymore"; |
| 292 |
" ; fr:"; |
| 293 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x81:rcx"",""x7:r9"",""0x0:r13"",""x70:CF"",""x67:r11"",""x86:rax"",""x87:OF"",""x88:rbx"",""0x7ffffffffffff:r8"",""x48:r12"",""x89:rbp"",""x6:r15"",""arg1[0]:rdx"",""x32:r14""]"; |
| 294 |
" ; freeing x67 (r11) no dependants anymore"; |
| 295 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x81:rcx"",""x7:r9"",""0x0:r13"",""x70:CF"",""x86:rax"",""x87:OF"",""x88:rbx"",""0x7ffffffffffff:r8"",""x48:r12"",""x89:rbp"",""x6:r15"",""arg1[0]:rdx"",""x32:r14"",""x31:r11""]"; |
| 296 |
" mulx r14, r11, r15; x32, x31<- arg1[0] * x6"; |
| 297 |
" ;chose >>saved<< arg1[1] from:arg1[1], x7[0] and candidates: arg1[1], x7"; |
| 298 |
" mov rdx, [rsi + 0x08 * 1 ]; arg1[1] to rdx"; |
| 299 |
" ; fr:"; |
| 300 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x81:rcx"",""0x0:r13"",""x70:CF"",""x86:rax"",""x87:OF"",""x88:rbx"",""0x7ffffffffffff:r8"",""x48:r12"",""x89:rbp"",""x6:r15"",""x32:r14"",""x31:r11"",""arg1[1]:rdx"",""x26:r9""]"; |
| 301 |
" ; freeing x88 (rbx) no dependants anymore"; |
| 302 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x1:r10"",""x81:rcx"",""0x0:r13"",""x70:CF"",""x86:rax"",""x87:OF"",""0x7ffffffffffff:r8"",""x48:r12"",""x89:rbp"",""x6:r15"",""x32:r14"",""x31:r11"",""arg1[1]:rdx"",""x26:r9"",""x25:rbx""]"; |
| 303 |
" mulx r9, rbx, r9; x26, x25<- arg1[1] * x7"; |
| 304 |
" ;chose >>saved<< x1 from:arg1[4], x1[1] and candidates: arg1[4], x1"; |
| 305 |
" mov rdx, r10; x1 to rdx"; |
| 306 |
" ; fr:r10"; |
| 307 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""0x0:r13"",""x70:CF"",""x86:rax"",""x87:OF"",""0x7ffffffffffff:r8"",""x48:r12"",""x89:rbp"",""x6:r15"",""x32:r14"",""x31:r11"",""x26:r9"",""x25:rbx"",""x10:rdx""]"; |
| 308 |
" ;chose >>RANDOMLY<< r10 from candidates :r10[0]."; |
| 309 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""0x0:r13"",""x70:CF"",""x86:rax"",""x87:OF"",""0x7ffffffffffff:r8"",""x48:r12"",""x89:rbp"",""x6:r15"",""x32:r14"",""x31:r11"",""x26:r9"",""x25:rbx"",""x10:rdx"",""x9:r10""]"; |
| 310 |
" mulx rdx, r10, [rsi + 0x08 * 4 ]; x10, x9<- arg1[4] * x1"; |
| 311 |
" "; |
| 312 |
""; |
| 313 |
" ; add:"; |
| 314 |
" ; r:x57,f:x58<-add(0x0,x25,x9)"; |
| 315 |
" ; CF: KILLED,OF: KILLED"; |
| 316 |
" ;chose >>saved<< c_add from:c_add, c_xor_adx, c_test_adx[0] and candidates: c_add, c_xor_adx, c_test_adx"; |
| 317 |
" add rbx, r10; could be done better, if r0 has been u8 as well"; |
| 318 |
" "; |
| 319 |
""; |
| 320 |
" ; add:"; |
| 321 |
" ; r:x61,f:x62<-add(0x0,x31,x57)"; |
| 322 |
" ; CF: ALIVE,OF: KILLED"; |
| 323 |
" dec r13; OF<-0x0, preserve CF 3"; |
| 324 |
" adox r11, rbx"; |
| 325 |
" "; |
| 326 |
""; |
| 327 |
" ; add:"; |
| 328 |
" ; r:x59,f:_<-add(x58,x26,x10)"; |
| 329 |
" ; CF: ALIVE,OF: ALIVE"; |
| 330 |
" adcx r9, rdx"; |
| 331 |
" "; |
| 332 |
""; |
| 333 |
" ; add:"; |
| 334 |
" ; r:x91,f:x92<-add(0x0,x89,x61)"; |
| 335 |
" ; CF: KILLED,OF: ALIVE"; |
| 336 |
" clc;"; |
| 337 |
" adcx rbp, r11"; |
| 338 |
" "; |
| 339 |
""; |
| 340 |
" ; add:"; |
| 341 |
" ; r:x63,f:_<-add(x62,x32,x59)"; |
| 342 |
" ; CF: ALIVE,OF: ALIVE"; |
| 343 |
" adox r14, r9"; |
| 344 |
" "; |
| 345 |
""; |
| 346 |
" ; add:"; |
| 347 |
" ; r:x93,f:_<-add(x92,x63)"; |
| 348 |
" ; CF: ALIVE,OF: KILLED"; |
| 349 |
" adc r14, 0x0"; |
| 350 |
" ; fr:"; |
| 351 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""0x7ffffffffffff:r8"",""x48:r12"",""x6:r15"",""x10:rdx"",""x9:r10"",""x57:rbx"",""x61:r11"",""-0x1:r13"",""x62:OF"",""x59:r9"",""x91:rbp"",""x92:CF"",""x93:r14""]"; |
| 352 |
" ; freeing x10 (rdx) no dependants anymore"; |
| 353 |
" mov rdx, rbp; x94, copying x91 here, cause x91 is needed in a reg for other than x94, namely all: , x95, x94, size: 2"; |
| 354 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""0x7ffffffffffff:r8"",""x48:r12"",""x6:r15"",""x9:r10"",""x57:rbx"",""x61:r11"",""-0x1:r13"",""x62:OF"",""x59:r9"",""x91:rbp"",""x92:CF"",""x93:r14"",""x94:rdx""]"; |
| 355 |
" shrd rdx, r14, 51; x94 <- x93||x91 >> 51"; |
| 356 |
" ; fr:"; |
| 357 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""0x7ffffffffffff:r8"",""x48:r12"",""x6:r15"",""x9:r10"",""x57:rbx"",""x61:r11"",""-0x1:r13"",""x62:OF"",""x59:r9"",""x91:rbp"",""x92:CF"",""x93:r14"",""x94:rdx""]"; |
| 358 |
" ; freeing x9 (r10) no dependants anymore"; |
| 359 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""0x7ffffffffffff:r8"",""x48:r12"",""x6:r15"",""x57:rbx"",""x61:r11"",""-0x1:r13"",""x62:OF"",""x59:r9"",""x91:rbp"",""x92:CF"",""x93:r14"",""x94:rdx"",""x3:r10""]"; |
| 360 |
" imul r10, [rsi + 0x08 * 4 ], 0x2; x3 <- arg1[4] * 0x2"; |
| 361 |
" ;CF: KILLED,OF: KILLED"; |
| 362 |
" ;chose >>saved<< arg1[0] from:arg1[0], x3[0] and candidates: arg1[0], x3"; |
| 363 |
" ; fr:"; |
| 364 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""0x7ffffffffffff:r8"",""x48:r12"",""x6:r15"",""x57:rbx"",""x61:r11"",""-0x1:r13"",""x62:OF"",""x59:r9"",""x91:rbp"",""x92:CF"",""x93:r14"",""x94:rdx"",""x3:r10"",""arg1[0]:rdx""]"; |
| 365 |
" ; freeing x57 (rbx) no dependants anymore"; |
| 366 |
" mov rbx, rdx; preserving value of x94 into a new reg"; |
| 367 |
" mov rdx, [rsi + 0x08 * 0 ]; saving arg1[0] in rdx."; |
| 368 |
" ; fr:"; |
| 369 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""0x7ffffffffffff:r8"",""x48:r12"",""x6:r15"",""x61:r11"",""-0x1:r13"",""x62:OF"",""x59:r9"",""x91:rbp"",""x92:CF"",""x93:r14"",""x94:rbx"",""arg1[0]:rdx"",""x30:r10""]"; |
| 370 |
" ; freeing x61 (r11) no dependants anymore"; |
| 371 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""0x7ffffffffffff:r8"",""x48:r12"",""x6:r15"",""-0x1:r13"",""x62:OF"",""x59:r9"",""x91:rbp"",""x92:CF"",""x93:r14"",""x94:rbx"",""arg1[0]:rdx"",""x30:r10"",""x29:r11""]"; |
| 372 |
" mulx r10, r11, r10; x30, x29<- arg1[0] * x3"; |
| 373 |
" ;chose >>saved<< arg1[1] from:arg1[1], x6[0] and candidates: arg1[1], x6"; |
| 374 |
" mov rdx, [rsi + 0x08 * 1 ]; arg1[1] to rdx"; |
| 375 |
" ; fr:"; |
| 376 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""0x7ffffffffffff:r8"",""x48:r12"",""-0x1:r13"",""x62:OF"",""x59:r9"",""x91:rbp"",""x92:CF"",""x93:r14"",""x94:rbx"",""x30:r10"",""x29:r11"",""arg1[1]:rdx"",""x24:r15""]"; |
| 377 |
" ; freeing x59 (r9) no dependants anymore"; |
| 378 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""0x7ffffffffffff:r8"",""x48:r12"",""-0x1:r13"",""x62:OF"",""x91:rbp"",""x92:CF"",""x93:r14"",""x94:rbx"",""x30:r10"",""x29:r11"",""arg1[1]:rdx"",""x24:r15"",""x23:r9""]"; |
| 379 |
" mulx r15, r9, r15; x24, x23<- arg1[1] * x6"; |
| 380 |
" ;chose >>saved<< arg1[2] from:arg1[2], arg1[2][1] and candidates: arg1[2], arg1[2]"; |
| 381 |
" mov rdx, [rsi + 0x08 * 2 ]; arg1[2] to rdx"; |
| 382 |
" ; fr:"; |
| 383 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""0x7ffffffffffff:r8"",""x48:r12"",""-0x1:r13"",""x62:OF"",""x91:rbp"",""x92:CF"",""x93:r14"",""x94:rbx"",""x30:r10"",""x29:r11"",""x24:r15"",""x23:r9"",""arg1[2]:rdx""]"; |
| 384 |
" ; freeing x93 (r14) no dependants anymore"; |
| 385 |
" ; fr:"; |
| 386 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""0x7ffffffffffff:r8"",""x48:r12"",""-0x1:r13"",""x62:OF"",""x91:rbp"",""x92:CF"",""x94:rbx"",""x30:r10"",""x29:r11"",""x24:r15"",""x23:r9"",""arg1[2]:rdx"",""x20:r14""]"; |
| 387 |
" ;chose 0x7ffffffffffff to spill because list of spills:arg1[1]Larg1[1]Larg1[1]L0x7ffffffffffffL0x7ffffffffffffL-0x1L-0x1 and candidates: 0x7ffffffffffff, -0x1"; |
| 388 |
" ; freeing, i.e. spilling 0x7ffffffffffff, because I am out of ideas"; |
| 389 |
" ; allocs: out1(rdi),arg1(rsi),x81(rcx),x86(rax),0x7ffffffffffff(r8),x48(r12),-0x1(r13),x91(rbp),x94(rbx),x30(r10),x29(r11),x24(r15),x23(r9),arg1[2](rdx),x20(r14); clobs x19,x20,arg1[2],arg1,arg1[2],arg1,x20; will spare: 0x7ffffffffffff "; |
| 390 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""x48:r12"",""-0x1:r13"",""x62:OF"",""x91:rbp"",""x92:CF"",""x94:rbx"",""x30:r10"",""x29:r11"",""x24:r15"",""x23:r9"",""arg1[2]:rdx"",""x20:r14"",""x19:r8""]"; |
| 391 |
" mulx r14, r8, [rsi + 0x08 * 2 ]; x20, x19<- arg1[2] * arg1[2]"; |
| 392 |
" "; |
| 393 |
""; |
| 394 |
" ; add:"; |
| 395 |
" ; r:x49,f:x50<-add(0x0,x23,x19)"; |
| 396 |
" ; CF: KILLED,OF: KILLED"; |
| 397 |
" ;chose >>saved<< c_add from:c_add, c_xor_adx, c_test_adx[0] and candidates: c_add, c_xor_adx, c_test_adx"; |
| 398 |
" add r9, r8; could be done better, if r0 has been u8 as well"; |
| 399 |
" "; |
| 400 |
""; |
| 401 |
" ; add:"; |
| 402 |
" ; r:x53,f:x54<-add(0x0,x29,x49)"; |
| 403 |
" ; CF: ALIVE,OF: KILLED"; |
| 404 |
" inc r13; OF<-0x0, preserve CF 2"; |
| 405 |
" adox r11, r9"; |
| 406 |
" "; |
| 407 |
""; |
| 408 |
" ; add:"; |
| 409 |
" ; r:x51,f:_<-add(x50,x24,x20)"; |
| 410 |
" ; CF: ALIVE,OF: ALIVE"; |
| 411 |
" adcx r15, r14"; |
| 412 |
" "; |
| 413 |
""; |
| 414 |
" ; add:"; |
| 415 |
" ; r:x96,f:x97<-add(0x0,x94,x53)"; |
| 416 |
" ; CF: KILLED,OF: ALIVE"; |
| 417 |
" clc;"; |
| 418 |
" adcx rbx, r11"; |
| 419 |
" "; |
| 420 |
""; |
| 421 |
" ; add:"; |
| 422 |
" ; r:x55,f:_<-add(x54,x30,x51)"; |
| 423 |
" ; CF: ALIVE,OF: ALIVE"; |
| 424 |
" adox r10, r15"; |
| 425 |
" "; |
| 426 |
""; |
| 427 |
" ; add:"; |
| 428 |
" ; r:x98,f:_<-add(x97,x55)"; |
| 429 |
" ; CF: ALIVE,OF: KILLED"; |
| 430 |
" adc r10, 0x0"; |
| 431 |
" ; fr:"; |
| 432 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""x48:r12"",""x91:rbp"",""arg1[2]:rdx"",""x20:r14"",""x19:r8"",""x49:r9"",""x53:r11"",""0x0:r13"",""x54:OF"",""x51:r15"",""x96:rbx"",""x97:CF"",""x98:r10""]"; |
| 433 |
" ; freeing x20 (r14) no dependants anymore"; |
| 434 |
" mov r14, rbx; x99, copying x96 here, cause x96 is needed in a reg for other than x99, namely all: , x100, x99, size: 2"; |
| 435 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""x48:r12"",""x91:rbp"",""arg1[2]:rdx"",""x19:r8"",""x49:r9"",""x53:r11"",""0x0:r13"",""x54:OF"",""x51:r15"",""x96:rbx"",""x97:CF"",""x98:r10"",""x99:r14""]"; |
| 436 |
" shrd r14, r10, 51; x99 <- x98||x96 >> 51"; |
| 437 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""x48:r12"",""x91:rbp"",""arg1[2]:rdx"",""x19:r8"",""x49:r9"",""x53:r11"",""0x0:r13"",""x54:OF"",""x51:r15"",""x96:rbx"",""x97:CF"",""x98:r10"",""x101:r14""]"; |
| 438 |
" imul r14, r14, 0x13; x101 <- x99 * 0x13"; |
| 439 |
" ;CF: KILLED,OF: KILLED"; |
| 440 |
" "; |
| 441 |
""; |
| 442 |
" ; add:"; |
| 443 |
" ; r:x102,f:_<-add(x48,x101)"; |
| 444 |
" ; CF: KILLED,OF: KILLED"; |
| 445 |
" lea r12, [r12+r14]"; |
| 446 |
" ; fr:"; |
| 447 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""x91:rbp"",""arg1[2]:rdx"",""x19:r8"",""x49:r9"",""x53:r11"",""0x0:r13"",""x54:OF"",""x51:r15"",""x96:rbx"",""x97:CF"",""x98:r10"",""x101:r14"",""x102:r12""]"; |
| 448 |
" ; freeing x19 (r8) no dependants anymore"; |
| 449 |
" mov r8, 0x7ffffffffffff ; moving imm to reg"; |
| 450 |
" ; fr:"; |
| 451 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""x91:rbp"",""arg1[2]:rdx"",""x49:r9"",""x53:r11"",""0x0:r13"",""x54:OF"",""x51:r15"",""x96:rbx"",""x97:CF"",""x98:r10"",""x101:r14"",""x102:r12"",""0x7ffffffffffff:r8""]"; |
| 452 |
" ; freeing x49 (r9) no dependants anymore"; |
| 453 |
" mov r9, r12; x104, copying x102 here, cause x102 is needed in a reg for other than x104, namely all: , x104, x103, size: 2"; |
| 454 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""x91:rbp"",""arg1[2]:rdx"",""x53:r11"",""0x0:r13"",""x54:OF"",""x51:r15"",""x96:rbx"",""x97:CF"",""x98:r10"",""x101:r14"",""x102:r12"",""0x7ffffffffffff:r8"",""x104:r9""]"; |
| 455 |
" and r9, r8; x104 <- x102& 0x7ffffffffffff"; |
| 456 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""arg1[2]:rdx"",""x53:r11"",""0x0:r13"",""x54:OF"",""x51:r15"",""x96:rbx"",""x97:CF"",""x98:r10"",""x101:r14"",""x102:r12"",""0x7ffffffffffff:r8"",""x104:r9"",""x95:rbp""]"; |
| 457 |
" and rbp, r8; x95 <- x91& 0x7ffffffffffff"; |
| 458 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x81:rcx"",""x86:rax"",""arg1[2]:rdx"",""x53:r11"",""0x0:r13"",""x54:OF"",""x51:r15"",""x96:rbx"",""x97:CF"",""x98:r10"",""x101:r14"",""0x7ffffffffffff:r8"",""x104:r9"",""x95:rbp"",""x103:r12""]"; |
| 459 |
" shr r12, 51; x103 <- x102>> 51"; |
| 460 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x86:rax"",""arg1[2]:rdx"",""x53:r11"",""0x0:r13"",""x54:OF"",""x51:r15"",""x96:rbx"",""x97:CF"",""x98:r10"",""x101:r14"",""0x7ffffffffffff:r8"",""x104:r9"",""x95:rbp"",""x103:r12"",""x85:rcx""]"; |
| 461 |
" and rcx, r8; x85 <- x81& 0x7ffffffffffff"; |
| 462 |
" "; |
| 463 |
""; |
| 464 |
" ; add:"; |
| 465 |
" ; r:x105,f:_<-add(x103,x85)"; |
| 466 |
" ; CF: KILLED,OF: KILLED"; |
| 467 |
" lea r12, [r12+rcx]"; |
| 468 |
" ; fr:"; |
| 469 |
" ; allocatedR: ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x86:rax"",""arg1[2]:rdx"",""x53:r11"",""0x0:r13"",""x54:OF"",""x51:r15"",""x96:rbx"",""x97:CF"",""x98:r10"",""x101:r14"",""0x7ffffffffffff:r8"",""x104:r9"",""x95:rbp"",""x85:rcx"",""x105:r12""]"; |
| 470 |
" ; freeing x53 (r11) no dependants anymore"; |
| 471 |
" mov r11, r12; x106, copying x105 here, cause x105 is needed in a reg for other than x106, namely all: , x106, x107, size: 2"; |
| 472 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""x86:rax"",""arg1[2]:rdx"",""0x0:r13"",""x54:OF"",""x51:r15"",""x96:rbx"",""x97:CF"",""x98:r10"",""x101:r14"",""0x7ffffffffffff:r8"",""x104:r9"",""x95:rbp"",""x85:rcx"",""x105:r12"",""x106:r11""]"; |
| 473 |
" shr r11, 51; x106 <- x105>> 51"; |
| 474 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""arg1[2]:rdx"",""0x0:r13"",""x54:OF"",""x51:r15"",""x96:rbx"",""x97:CF"",""x98:r10"",""x101:r14"",""0x7ffffffffffff:r8"",""x104:r9"",""x95:rbp"",""x85:rcx"",""x105:r12"",""x106:r11"",""x90:rax""]"; |
| 475 |
" and rax, r8; x90 <- x86& 0x7ffffffffffff"; |
| 476 |
" "; |
| 477 |
""; |
| 478 |
" ; add:"; |
| 479 |
" ; r:x108,f:_<-add(x106,x90)"; |
| 480 |
" ; CF: KILLED,OF: KILLED"; |
| 481 |
" lea r11, [r11+rax]"; |
| 482 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""arg1[2]:rdx"",""0x0:r13"",""x54:OF"",""x51:r15"",""x97:CF"",""x98:r10"",""x101:r14"",""0x7ffffffffffff:r8"",""x104:r9"",""x95:rbp"",""x85:rcx"",""x105:r12"",""x90:rax"",""x108:r11"",""x100:rbx""]"; |
| 483 |
" and rbx, r8; x100 <- x96& 0x7ffffffffffff"; |
| 484 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""arg1[2]:rdx"",""0x0:r13"",""x54:OF"",""x51:r15"",""x97:CF"",""x98:r10"",""x101:r14"",""0x7ffffffffffff:r8"",""x104:r9"",""x95:rbp"",""x85:rcx"",""x105:r12"",""x90:rax"",""x108:r11"",""x100:rbx""]"; |
| 485 |
" mov [rdi + 0x08 * 4 ], rbx; out1[4] = x100"; |
| 486 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""arg1[2]:rdx"",""0x0:r13"",""x54:OF"",""x51:r15"",""x97:CF"",""x98:r10"",""x101:r14"",""0x7ffffffffffff:r8"",""x95:rbp"",""x85:rcx"",""x105:r12"",""x90:rax"",""x108:r11"",""x100:rbx"",""x104:r9""]"; |
| 487 |
" mov [rdi + 0x08 * 0 ], r9; out1[0] = x104"; |
| 488 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""arg1[2]:rdx"",""0x0:r13"",""x54:OF"",""x51:r15"",""x97:CF"",""x98:r10"",""x101:r14"",""0x7ffffffffffff:r8"",""x95:rbp"",""x85:rcx"",""x90:rax"",""x108:r11"",""x100:rbx"",""x104:r9"",""x107:r12""]"; |
| 489 |
" and r12, r8; x107 <- x105& 0x7ffffffffffff"; |
| 490 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""arg1[2]:rdx"",""0x0:r13"",""x54:OF"",""x51:r15"",""x97:CF"",""x98:r10"",""x101:r14"",""0x7ffffffffffff:r8"",""x95:rbp"",""x85:rcx"",""x90:rax"",""x100:rbx"",""x104:r9"",""x107:r12"",""x108:r11""]"; |
| 491 |
" mov [rdi + 0x08 * 2 ], r11; out1[2] = x108"; |
| 492 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""arg1[2]:rdx"",""0x0:r13"",""x54:OF"",""x51:r15"",""x97:CF"",""x98:r10"",""x101:r14"",""0x7ffffffffffff:r8"",""x95:rbp"",""x85:rcx"",""x90:rax"",""x100:rbx"",""x104:r9"",""x108:r11"",""x107:r12""]"; |
| 493 |
" mov [rdi + 0x08 * 1 ], r12; out1[1] = x107"; |
| 494 |
" ;-- allocation: [""out1:rdi"",""arg1:rsi"",""arg1[2]:rdx"",""0x0:r13"",""x54:OF"",""x51:r15"",""x97:CF"",""x98:r10"",""x101:r14"",""0x7ffffffffffff:r8"",""x85:rcx"",""x90:rax"",""x100:rbx"",""x104:r9"",""x108:r11"",""x107:r12"",""x95:rbp""]"; |
| 495 |
" mov [rdi + 0x08 * 3 ], rbp; out1[3] = x95"; |
| 496 |
" mov rbx, [rsp + 0x08 * 0 ]; restoring from stack"; |
| 497 |
" mov rbp, [rsp + 0x08 * 1 ]; restoring from stack"; |
| 498 |
" mov r12, [rsp + 0x08 * 2 ]; restoring from stack"; |
| 499 |
" mov r13, [rsp + 0x08 * 3 ]; restoring from stack"; |
| 500 |
" mov r14, [rsp + 0x08 * 4 ]; restoring from stack"; |
| 501 |
" mov r15, [rsp + 0x08 * 5 ]; restoring from stack"; |
| 502 |
" add rsp, 0x38 "; |
| 503 |
" ret"; |
| 504 |
"; cyclecount: 207"; |
| 505 |
"; seed 20 "; |
| 506 |
"; time Needed: 419536 ms/ 10000 runs"; |
| 507 |
"; Time Spent By Invoking Make (measure): 359470 ms"; |
| 508 |
"; Ratio (time for make measure)/elapsed: 0.8568275428091987"; |
| 509 |
"; Reverts a mutation because test was slower: 9198"; |
| 510 |
"; number tried mutation Permutation: 3351"; |
| 511 |
"; number tried mutation Spill: 3276"; |
| 512 |
"; number tried mutation Decision: 3372"; |
| 513 |
"; FailedEvals (cannot swap because of edge to the next node): 2030"; |
| 514 |
""]. |