| OLD | NEW |
| 1 #!/usr/local/bin/perl | 1 #!/usr/local/bin/perl |
| 2 | 2 |
| 3 # void des_ncbc_encrypt(input, output, length, schedule, ivec, enc) | 3 # void des_ncbc_encrypt(input, output, length, schedule, ivec, enc) |
| 4 # des_cblock (*input); | 4 # des_cblock (*input); |
| 5 # des_cblock (*output); | 5 # des_cblock (*output); |
| 6 # long length; | 6 # long length; |
| 7 # des_key_schedule schedule; | 7 # des_key_schedule schedule; |
| 8 # des_cblock (*ivec); | 8 # des_cblock (*ivec); |
| 9 # int enc; | 9 # int enc; |
| 10 # | 10 # |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 &blindpop("edx"); | 151 &blindpop("edx"); |
| 152 &lea("ecx",&DWP(&label("cbc_enc_jmp_table")."-".&label("PIC_point"),"edx
")); | 152 &lea("ecx",&DWP(&label("cbc_enc_jmp_table")."-".&label("PIC_point"),"edx
")); |
| 153 &mov($count,&DWP(0,"ecx",$count,4)) | 153 &mov($count,&DWP(0,"ecx",$count,4)) |
| 154 &add($count,"edx"); | 154 &add($count,"edx"); |
| 155 &xor("ecx","ecx"); | 155 &xor("ecx","ecx"); |
| 156 &xor("edx","edx"); | 156 &xor("edx","edx"); |
| 157 #&mov($count,&DWP(&label("cbc_enc_jmp_table"),"",$count,4)); | 157 #&mov($count,&DWP(&label("cbc_enc_jmp_table"),"",$count,4)); |
| 158 &jmp_ptr($count); | 158 &jmp_ptr($count); |
| 159 | 159 |
| 160 &set_label("ej7"); | 160 &set_label("ej7"); |
| 161 &xor("edx", "edx") if $ppro; # ppro friendly | |
| 162 &movb(&HB("edx"), &BP(6,$in,"",0)); | 161 &movb(&HB("edx"), &BP(6,$in,"",0)); |
| 163 &shl("edx",8); | 162 &shl("edx",8); |
| 164 &set_label("ej6"); | 163 &set_label("ej6"); |
| 165 &movb(&HB("edx"), &BP(5,$in,"",0)); | 164 &movb(&HB("edx"), &BP(5,$in,"",0)); |
| 166 &set_label("ej5"); | 165 &set_label("ej5"); |
| 167 &movb(&LB("edx"), &BP(4,$in,"",0)); | 166 &movb(&LB("edx"), &BP(4,$in,"",0)); |
| 168 &set_label("ej4"); | 167 &set_label("ej4"); |
| 169 &mov("ecx", &DWP(0,$in,"",0)); | 168 &mov("ecx", &DWP(0,$in,"",0)); |
| 170 &jmp(&label("ejend")); | 169 &jmp(&label("ejend")); |
| 171 &set_label("ej3"); | 170 &set_label("ej3"); |
| 172 &movb(&HB("ecx"), &BP(2,$in,"",0)); | 171 &movb(&HB("ecx"), &BP(2,$in,"",0)); |
| 173 &xor("ecx", "ecx") if $ppro; # ppro friendly | |
| 174 &shl("ecx",8); | 172 &shl("ecx",8); |
| 175 &set_label("ej2"); | 173 &set_label("ej2"); |
| 176 &movb(&HB("ecx"), &BP(1,$in,"",0)); | 174 &movb(&HB("ecx"), &BP(1,$in,"",0)); |
| 177 &set_label("ej1"); | 175 &set_label("ej1"); |
| 178 &movb(&LB("ecx"), &BP(0,$in,"",0)); | 176 &movb(&LB("ecx"), &BP(0,$in,"",0)); |
| 179 &set_label("ejend"); | 177 &set_label("ejend"); |
| 180 | 178 |
| 181 &xor("eax", "ecx"); | 179 &xor("eax", "ecx"); |
| 182 &xor("ebx", "edx"); | 180 &xor("ebx", "edx"); |
| 183 | 181 |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 #&data_word(&label("dj5")."-".&label("PIC_point")); | 340 #&data_word(&label("dj5")."-".&label("PIC_point")); |
| 343 #&data_word(&label("dj6")."-".&label("PIC_point")); | 341 #&data_word(&label("dj6")."-".&label("PIC_point")); |
| 344 #&data_word(&label("dj7")."-".&label("PIC_point")); | 342 #&data_word(&label("dj7")."-".&label("PIC_point")); |
| 345 &align(64); | 343 &align(64); |
| 346 | 344 |
| 347 &function_end_B($name); | 345 &function_end_B($name); |
| 348 | 346 |
| 349 } | 347 } |
| 350 | 348 |
| 351 1; | 349 1; |
| OLD | NEW |