Changeset 95221 in vbox for trunk/src/libs/openssl-3.0.3/crypto/genasm-nasm/x86_64-mont.S
- Timestamp:
- Jun 8, 2022 8:35:57 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/openssl-3.0.3/crypto/genasm-nasm/x86_64-mont.S
r95219 r95221 32 32 cmp r9d,8 33 33 jb NEAR $L$mul_enter 34 mov r11d,DWORD[((OPENSSL_ia32cap_P+8))]35 34 cmp rdx,rsi 36 35 jne NEAR $L$mul4x_enter … … 295 294 296 295 $L$mul4x_enter: 297 and r11d,0x80100298 cmp r11d,0x80100299 je NEAR $L$mulx4x_enter300 296 push rbx 301 297 … … 723 719 724 720 $L$SEH_end_bn_mul4x_mont: 725 EXTERN bn_sqrx8x_internal726 721 EXTERN bn_sqr8x_internal 727 722 … … 819 814 DB 102,72,15,110,207 820 815 DB 102,73,15,110,218 821 mov eax,DWORD[((OPENSSL_ia32cap_P+8))]822 and eax,0x80100823 cmp eax,0x80100824 jne NEAR $L$sqr8x_nox825 826 call bn_sqrx8x_internal827 828 829 830 831 lea rbx,[rcx*1+r8]832 mov r9,rcx833 mov rdx,rcx834 DB 102,72,15,126,207835 sar rcx,3+2836 jmp NEAR $L$sqr8x_sub837 838 ALIGN 32839 $L$sqr8x_nox:840 816 call bn_sqr8x_internal 841 817 … … 927 903 928 904 $L$SEH_end_bn_sqr8x_mont: 929 930 ALIGN 32931 bn_mulx4x_mont:932 mov QWORD[8+rsp],rdi ;WIN64 prologue933 mov QWORD[16+rsp],rsi934 mov rax,rsp935 $L$SEH_begin_bn_mulx4x_mont:936 mov rdi,rcx937 mov rsi,rdx938 mov rdx,r8939 mov rcx,r9940 mov r8,QWORD[40+rsp]941 mov r9,QWORD[48+rsp]942 943 944 945 mov rax,rsp946 947 $L$mulx4x_enter:948 push rbx949 950 push rbp951 952 push r12953 954 push r13955 956 push r14957 958 push r15959 960 $L$mulx4x_prologue:961 962 shl r9d,3963 xor r10,r10964 sub r10,r9965 mov r8,QWORD[r8]966 lea rbp,[((-72))+r10*1+rsp]967 and rbp,-128968 mov r11,rsp969 sub r11,rbp970 and r11,-4096971 lea rsp,[rbp*1+r11]972 mov r10,QWORD[rsp]973 cmp rsp,rbp974 ja NEAR $L$mulx4x_page_walk975 jmp NEAR $L$mulx4x_page_walk_done976 977 ALIGN 16978 $L$mulx4x_page_walk:979 lea rsp,[((-4096))+rsp]980 mov r10,QWORD[rsp]981 cmp rsp,rbp982 ja NEAR $L$mulx4x_page_walk983 $L$mulx4x_page_walk_done:984 985 lea r10,[r9*1+rdx]986 987 988 989 990 991 992 993 994 995 996 997 998 mov QWORD[rsp],r9999 shr r9,51000 mov QWORD[16+rsp],r101001 sub r9,11002 mov QWORD[24+rsp],r81003 mov QWORD[32+rsp],rdi1004 mov QWORD[40+rsp],rax1005 1006 mov QWORD[48+rsp],r91007 jmp NEAR $L$mulx4x_body1008 1009 ALIGN 321010 $L$mulx4x_body:1011 lea rdi,[8+rdx]1012 mov rdx,QWORD[rdx]1013 lea rbx,[((64+32))+rsp]1014 mov r9,rdx1015 1016 mulx rax,r8,QWORD[rsi]1017 mulx r14,r11,QWORD[8+rsi]1018 add r11,rax1019 mov QWORD[8+rsp],rdi1020 mulx r13,r12,QWORD[16+rsi]1021 adc r12,r141022 adc r13,01023 1024 mov rdi,r81025 imul r8,QWORD[24+rsp]1026 xor rbp,rbp1027 1028 mulx r14,rax,QWORD[24+rsi]1029 mov rdx,r81030 lea rsi,[32+rsi]1031 adcx r13,rax1032 adcx r14,rbp1033 1034 mulx r10,rax,QWORD[rcx]1035 adcx rdi,rax1036 adox r10,r111037 mulx r11,rax,QWORD[8+rcx]1038 adcx r10,rax1039 adox r11,r121040 DB 0xc4,0x62,0xfb,0xf6,0xa1,0x10,0x00,0x00,0x001041 mov rdi,QWORD[48+rsp]1042 mov QWORD[((-32))+rbx],r101043 adcx r11,rax1044 adox r12,r131045 mulx r15,rax,QWORD[24+rcx]1046 mov rdx,r91047 mov QWORD[((-24))+rbx],r111048 adcx r12,rax1049 adox r15,rbp1050 lea rcx,[32+rcx]1051 mov QWORD[((-16))+rbx],r121052 1053 jmp NEAR $L$mulx4x_1st1054 1055 ALIGN 321056 $L$mulx4x_1st:1057 adcx r15,rbp1058 mulx rax,r10,QWORD[rsi]1059 adcx r10,r141060 mulx r14,r11,QWORD[8+rsi]1061 adcx r11,rax1062 mulx rax,r12,QWORD[16+rsi]1063 adcx r12,r141064 mulx r14,r13,QWORD[24+rsi]1065 DB 0x67,0x671066 mov rdx,r81067 adcx r13,rax1068 adcx r14,rbp1069 lea rsi,[32+rsi]1070 lea rbx,[32+rbx]1071 1072 adox r10,r151073 mulx r15,rax,QWORD[rcx]1074 adcx r10,rax1075 adox r11,r151076 mulx r15,rax,QWORD[8+rcx]1077 adcx r11,rax1078 adox r12,r151079 mulx r15,rax,QWORD[16+rcx]1080 mov QWORD[((-40))+rbx],r101081 adcx r12,rax1082 mov QWORD[((-32))+rbx],r111083 adox r13,r151084 mulx r15,rax,QWORD[24+rcx]1085 mov rdx,r91086 mov QWORD[((-24))+rbx],r121087 adcx r13,rax1088 adox r15,rbp1089 lea rcx,[32+rcx]1090 mov QWORD[((-16))+rbx],r131091 1092 dec rdi1093 jnz NEAR $L$mulx4x_1st1094 1095 mov rax,QWORD[rsp]1096 mov rdi,QWORD[8+rsp]1097 adc r15,rbp1098 add r14,r151099 sbb r15,r151100 mov QWORD[((-8))+rbx],r141101 jmp NEAR $L$mulx4x_outer1102 1103 ALIGN 321104 $L$mulx4x_outer:1105 mov rdx,QWORD[rdi]1106 lea rdi,[8+rdi]1107 sub rsi,rax1108 mov QWORD[rbx],r151109 lea rbx,[((64+32))+rsp]1110 sub rcx,rax1111 1112 mulx r11,r8,QWORD[rsi]1113 xor ebp,ebp1114 mov r9,rdx1115 mulx r12,r14,QWORD[8+rsi]1116 adox r8,QWORD[((-32))+rbx]1117 adcx r11,r141118 mulx r13,r15,QWORD[16+rsi]1119 adox r11,QWORD[((-24))+rbx]1120 adcx r12,r151121 adox r12,QWORD[((-16))+rbx]1122 adcx r13,rbp1123 adox r13,rbp1124 1125 mov QWORD[8+rsp],rdi1126 mov r15,r81127 imul r8,QWORD[24+rsp]1128 xor ebp,ebp1129 1130 mulx r14,rax,QWORD[24+rsi]1131 mov rdx,r81132 adcx r13,rax1133 adox r13,QWORD[((-8))+rbx]1134 adcx r14,rbp1135 lea rsi,[32+rsi]1136 adox r14,rbp1137 1138 mulx r10,rax,QWORD[rcx]1139 adcx r15,rax1140 adox r10,r111141 mulx r11,rax,QWORD[8+rcx]1142 adcx r10,rax1143 adox r11,r121144 mulx r12,rax,QWORD[16+rcx]1145 mov QWORD[((-32))+rbx],r101146 adcx r11,rax1147 adox r12,r131148 mulx r15,rax,QWORD[24+rcx]1149 mov rdx,r91150 mov QWORD[((-24))+rbx],r111151 lea rcx,[32+rcx]1152 adcx r12,rax1153 adox r15,rbp1154 mov rdi,QWORD[48+rsp]1155 mov QWORD[((-16))+rbx],r121156 1157 jmp NEAR $L$mulx4x_inner1158 1159 ALIGN 321160 $L$mulx4x_inner:1161 mulx rax,r10,QWORD[rsi]1162 adcx r15,rbp1163 adox r10,r141164 mulx r14,r11,QWORD[8+rsi]1165 adcx r10,QWORD[rbx]1166 adox r11,rax1167 mulx rax,r12,QWORD[16+rsi]1168 adcx r11,QWORD[8+rbx]1169 adox r12,r141170 mulx r14,r13,QWORD[24+rsi]1171 mov rdx,r81172 adcx r12,QWORD[16+rbx]1173 adox r13,rax1174 adcx r13,QWORD[24+rbx]1175 adox r14,rbp1176 lea rsi,[32+rsi]1177 lea rbx,[32+rbx]1178 adcx r14,rbp1179 1180 adox r10,r151181 mulx r15,rax,QWORD[rcx]1182 adcx r10,rax1183 adox r11,r151184 mulx r15,rax,QWORD[8+rcx]1185 adcx r11,rax1186 adox r12,r151187 mulx r15,rax,QWORD[16+rcx]1188 mov QWORD[((-40))+rbx],r101189 adcx r12,rax1190 adox r13,r151191 mulx r15,rax,QWORD[24+rcx]1192 mov rdx,r91193 mov QWORD[((-32))+rbx],r111194 mov QWORD[((-24))+rbx],r121195 adcx r13,rax1196 adox r15,rbp1197 lea rcx,[32+rcx]1198 mov QWORD[((-16))+rbx],r131199 1200 dec rdi1201 jnz NEAR $L$mulx4x_inner1202 1203 mov rax,QWORD[rsp]1204 mov rdi,QWORD[8+rsp]1205 adc r15,rbp1206 sub rbp,QWORD[rbx]1207 adc r14,r151208 sbb r15,r151209 mov QWORD[((-8))+rbx],r141210 1211 cmp rdi,QWORD[16+rsp]1212 jne NEAR $L$mulx4x_outer1213 1214 lea rbx,[64+rsp]1215 sub rcx,rax1216 neg r151217 mov rdx,rax1218 shr rax,3+21219 mov rdi,QWORD[32+rsp]1220 jmp NEAR $L$mulx4x_sub1221 1222 ALIGN 321223 $L$mulx4x_sub:1224 mov r11,QWORD[rbx]1225 mov r12,QWORD[8+rbx]1226 mov r13,QWORD[16+rbx]1227 mov r14,QWORD[24+rbx]1228 lea rbx,[32+rbx]1229 sbb r11,QWORD[rcx]1230 sbb r12,QWORD[8+rcx]1231 sbb r13,QWORD[16+rcx]1232 sbb r14,QWORD[24+rcx]1233 lea rcx,[32+rcx]1234 mov QWORD[rdi],r111235 mov QWORD[8+rdi],r121236 mov QWORD[16+rdi],r131237 mov QWORD[24+rdi],r141238 lea rdi,[32+rdi]1239 dec rax1240 jnz NEAR $L$mulx4x_sub1241 1242 sbb r15,01243 lea rbx,[64+rsp]1244 sub rdi,rdx1245 1246 DB 102,73,15,110,2071247 pxor xmm0,xmm01248 pshufd xmm1,xmm1,01249 mov rsi,QWORD[40+rsp]1250 1251 jmp NEAR $L$mulx4x_cond_copy1252 1253 ALIGN 321254 $L$mulx4x_cond_copy:1255 movdqa xmm2,XMMWORD[rbx]1256 movdqa xmm3,XMMWORD[16+rbx]1257 lea rbx,[32+rbx]1258 movdqu xmm4,XMMWORD[rdi]1259 movdqu xmm5,XMMWORD[16+rdi]1260 lea rdi,[32+rdi]1261 movdqa XMMWORD[(-32)+rbx],xmm01262 movdqa XMMWORD[(-16)+rbx],xmm01263 pcmpeqd xmm0,xmm11264 pand xmm2,xmm11265 pand xmm3,xmm11266 pand xmm4,xmm01267 pand xmm5,xmm01268 pxor xmm0,xmm01269 por xmm4,xmm21270 por xmm5,xmm31271 movdqu XMMWORD[(-32)+rdi],xmm41272 movdqu XMMWORD[(-16)+rdi],xmm51273 sub rdx,321274 jnz NEAR $L$mulx4x_cond_copy1275 1276 mov QWORD[rbx],rdx1277 1278 mov rax,11279 mov r15,QWORD[((-48))+rsi]1280 1281 mov r14,QWORD[((-40))+rsi]1282 1283 mov r13,QWORD[((-32))+rsi]1284 1285 mov r12,QWORD[((-24))+rsi]1286 1287 mov rbp,QWORD[((-16))+rsi]1288 1289 mov rbx,QWORD[((-8))+rsi]1290 1291 lea rsp,[rsi]1292 1293 $L$mulx4x_epilogue:1294 mov rdi,QWORD[8+rsp] ;WIN64 epilogue1295 mov rsi,QWORD[16+rsp]1296 DB 0F3h,0C3h ;repret1297 1298 $L$SEH_end_bn_mulx4x_mont:1299 905 DB 77,111,110,116,103,111,109,101,114,121,32,77,117,108,116,105 1300 906 DB 112,108,105,99,97,116,105,111,110,32,102,111,114,32,120,56 … … 1448 1054 DD $L$SEH_end_bn_sqr8x_mont wrt ..imagebase 1449 1055 DD $L$SEH_info_bn_sqr8x_mont wrt ..imagebase 1450 DD $L$SEH_begin_bn_mulx4x_mont wrt ..imagebase1451 DD $L$SEH_end_bn_mulx4x_mont wrt ..imagebase1452 DD $L$SEH_info_bn_mulx4x_mont wrt ..imagebase1453 1056 section .xdata rdata align=8 1454 1057 ALIGN 8 … … 1466 1069 DD $L$sqr8x_prologue wrt ..imagebase,$L$sqr8x_body wrt ..imagebase,$L$sqr8x_epilogue wrt ..imagebase 1467 1070 ALIGN 8 1468 $L$SEH_info_bn_mulx4x_mont:1469 DB 9,0,0,01470 DD sqr_handler wrt ..imagebase1471 DD $L$mulx4x_prologue wrt ..imagebase,$L$mulx4x_body wrt ..imagebase,$L$mulx4x_epilogue wrt ..imagebase1472 ALIGN 8
Note:
See TracChangeset
for help on using the changeset viewer.