From d99af8c51e118696e243bd99ca859480d48e3d7e Mon Sep 17 00:00:00 2001 From: tevador Date: Fri, 30 Aug 2019 10:16:11 +0200 Subject: [PATCH] Update documentation --- README.md | 7 +- doc/program.asm | 1446 ++++++++++++++++++++++++----------------------- doc/specs.md | 4 +- 3 files changed, 731 insertions(+), 726 deletions(-) diff --git a/README.md b/README.md index 0c4e9012..5c5ae22e 100644 --- a/README.md +++ b/README.md @@ -107,14 +107,15 @@ The reference implementation has been validated on the following platforms: * PPC64 (64-bit, big-endian) ## Acknowledgements +* [tevador](https://github.com/tevador) - author * [SChernykh](https://github.com/SChernykh) - contributed significantly to the design of RandomX * [hyc](https://github.com/hyc) - original idea of using random code execution for PoW -* Other contributors: [nioroso-x3](https://github.com/nioroso-x3), [jtgrassie](https://github.com/jtgrassie) +* [Other contributors](https://github.com/tevador/RandomX/graphs/contributors) RandomX uses some source code from the following 3rd party repositories: * Argon2d, Blake2b hashing functions: https://github.com/P-H-C/phc-winner-argon2 -The author of RandomX declares no competing financial interest in RandomX adoption, other than being a holder of Monero. The development of RandomX was funded from the author's own pocket with only the help listed above. +The author of RandomX declares no competing financial interest. ## Donations @@ -124,4 +125,4 @@ Author's XMR address: ``` 845xHUh5GvfHwc2R8DVJCE7BT2sd4YEcmjG8GNSdmeNsP5DTEjXd1CNgxTcjHjiFuthRHAoVEJjM7GyKzQKLJtbd56xbh7V ``` -Total donations received: ~3.74 XMR (as of 9th July 2019). Thanks to all contributors. +Total donations received: ~3.86 XMR (as of 30th August 2019). Thanks to all contributors. diff --git a/doc/program.asm b/doc/program.asm index f68e8b65..93c32f8a 100644 --- a/doc/program.asm +++ b/doc/program.asm @@ -1,981 +1,985 @@ randomx_isn_0: - ; IROR_R r6, r1 - mov ecx, r9d - ror r14, cl + ; ISMULH_R r0, r3 + mov rax, r8 + imul r11 + mov r8, rdx randomx_isn_1: - ; IMUL_R r6, r0 - imul r14, r8 + ; IROR_R r0, r6 + mov ecx, r14d + ror r8, cl randomx_isn_2: - ; IADD_RS r1, r5, SHFT 3 - lea r9, [r9+r13*8] + ; FADD_R f1, a2 + addpd xmm1, xmm10 randomx_isn_3: - ; CBRANCH r7, 1640213454, COND 13 - add r15, 1642310606 - test r15, 534773760 - jz randomx_isn_0 -randomx_isn_4: - ; FADD_M f1, L1[r5+47767428] - lea eax, [r13d+47767428] + ; IXOR_M r1, L1[r5+1954652011] + lea eax, [r13d+1954652011] and eax, 16376 - cvtdq2pd xmm12, qword ptr [rsi+rax] - addpd xmm1, xmm12 + xor r9, qword ptr [rsi+rax] +randomx_isn_4: + ; FMUL_R e2, a3 + mulpd xmm6, xmm11 randomx_isn_5: - ; IXOR_M r3, L1[r0+142785922] - lea eax, [r8d+142785922] - and eax, 16376 - xor r11, qword ptr [rsi+rax] + ; FADD_M f0, L2[r0-772804104] + lea eax, [r8d-772804104] + and eax, 262136 + cvtdq2pd xmm12, qword ptr [rsi+rax] + addpd xmm0, xmm12 randomx_isn_6: - ; IMUL_RCP r4, 107807738 - mov rax, 11482849582516797401 - imul r12, rax + ; IMUL_R r6, r4 + imul r14, r12 randomx_isn_7: - ; FMUL_R e2, a1 - mulpd xmm6, xmm9 + ; CBRANCH r5, 1674196118, COND 2 + add r13, 1674196118 + test r13, 261120 + jz randomx_isn_0 randomx_isn_8: - ; ISUB_R r3, -349499415 - sub r11, -349499415 + ; ISWAP_R r7, r6 + xchg r15, r14 randomx_isn_9: - ; FSCAL_R f0 - xorps xmm0, xmm15 -randomx_isn_10: - ; FADD_M f2, L1[r0+141880309] - lea eax, [r8d+141880309] + ; ISTORE L1[r1-439821682], r3 + lea eax, [r9d-439821682] and eax, 16376 - cvtdq2pd xmm12, qword ptr [rsi+rax] - addpd xmm2, xmm12 + mov qword ptr [rsi+rax], r11 +randomx_isn_10: + ; IXOR_R r2, r4 + xor r10, r12 randomx_isn_11: - ; ISWAP_R r5, r5 + ; FADD_R f2, a1 + addpd xmm2, xmm9 randomx_isn_12: - ; CBRANCH r4, -1547477139, COND 7 - add r12, -1547460755 - test r12, 8355840 - jz randomx_isn_7 + ; IXOR_M r0, L1[r1+952699079] + lea eax, [r9d+952699079] + and eax, 16376 + xor r8, qword ptr [rsi+rax] randomx_isn_13: - ; IADD_RS r3, r4, SHFT 2 - lea r11, [r11+r12*4] + ; ISMULH_R r5, r2 + mov rax, r13 + imul r10 + mov r13, rdx randomx_isn_14: - ; FMUL_R e1, a1 - mulpd xmm5, xmm9 + ; INEG_R r4 + neg r12 randomx_isn_15: - ; FMUL_R e1, a0 - mulpd xmm5, xmm8 + ; INEG_R r1 + neg r9 randomx_isn_16: - ; IADD_M r3, L3[1242616] - add r11, qword ptr [rsi+1242616] + ; IMUL_M r3, L1[r2+620091535] + lea eax, [r10d+620091535] + and eax, 16376 + imul r11, qword ptr [rsi+rax] randomx_isn_17: - ; FADD_R f0, a0 - addpd xmm0, xmm8 + ; FADD_R f1, a0 + addpd xmm1, xmm8 randomx_isn_18: - ; ISMULH_R r2, r3 - mov rax, r10 - imul r11 - mov r10, rdx + ; IMUL_RCP r5, 2611385784 + mov rax, 15169754503470242065 + imul r13, rax randomx_isn_19: - ; FSUB_R f1, a3 - subpd xmm1, xmm11 + ; IXOR_R r2, 922368940 + xor r10, 922368940 randomx_isn_20: - ; FADD_R f2, a1 - addpd xmm2, xmm9 + ; FADD_R f3, a1 + addpd xmm3, xmm9 randomx_isn_21: - ; FMUL_R e1, a2 - mulpd xmm5, xmm10 + ; IXOR_R r3, r6 + xor r11, r14 randomx_isn_22: - ; CBRANCH r5, 1217943740, COND 2 - add r13, 1217944764 - test r13, 261120 - jz randomx_isn_13 + ; FSWAP_R e1 + shufpd xmm5, xmm5, 1 randomx_isn_23: - ; FADD_R f2, a2 - addpd xmm2, xmm10 + ; ISUB_R r0, r5 + sub r8, r13 randomx_isn_24: - ; ISUB_R r3, r4 - sub r11, r12 + ; ISTORE L1[r6-1574415460], r7 + lea eax, [r14d-1574415460] + and eax, 16376 + mov qword ptr [rsi+rax], r15 randomx_isn_25: - ; IADD_M r6, L2[r0+507902624] - lea eax, [r8d+507902624] - and eax, 262136 - add r14, qword ptr [rsi+rax] -randomx_isn_26: - ; ISTORE L1[r6+994770102], r3 - lea eax, [r14d+994770102] + ; FADD_M f3, L1[r3+1766115210] + lea eax, [r11d+1766115210] and eax, 16376 - mov qword ptr [rsi+rax], r11 + cvtdq2pd xmm12, qword ptr [rsi+rax] + addpd xmm3, xmm12 +randomx_isn_26: + ; FSCAL_R f1 + xorps xmm1, xmm15 randomx_isn_27: - ; FSUB_R f0, a0 - subpd xmm0, xmm8 + ; CBRANCH r2, 1731738265, COND 6 + add r10, 1731746457 + test r10, 4177920 + jz randomx_isn_20 randomx_isn_28: - ; IMUL_R r6, r2 - imul r14, r10 + ; IXOR_R r4, r1 + xor r12, r9 randomx_isn_29: - ; FSQRT_R e0 - sqrtpd xmm4, xmm4 + ; CBRANCH r4, 1937048537, COND 3 + add r12, 1937050585 + test r12, 522240 + jz randomx_isn_29 randomx_isn_30: - ; IXOR_R r6, r7 - xor r14, r15 + ; ISWAP_R r3, r5 + xchg r11, r13 randomx_isn_31: - ; IROL_R r3, 34 - rol r11, 34 + ; ISMULH_R r7, r5 + mov rax, r15 + imul r13 + mov r15, rdx randomx_isn_32: - ; ISUB_R r1, r0 - sub r9, r8 + ; IMULH_M r6, L1[r2+1879111790] + lea ecx, [r10d+1879111790] + and ecx, 16376 + mov rax, r14 + mul qword ptr [rsi+rcx] + mov r14, rdx randomx_isn_33: - ; ISTORE L2[r3-11196796], r2 - lea eax, [r11d-11196796] - and eax, 262136 - mov qword ptr [rsi+rax], r10 + ; IMUL_R r5, r0 + imul r13, r8 randomx_isn_34: - ; IMUL_R r1, r5 - imul r9, r13 + ; ISWAP_R r5, r0 + xchg r13, r8 randomx_isn_35: - ; FSUB_R f3, a0 - subpd xmm3, xmm8 + ; CBRANCH r4, 1174490916, COND 5 + add r12, 1174499108 + test r12, 2088960 + jz randomx_isn_30 randomx_isn_36: - ; FSWAP_R f3 - shufpd xmm3, xmm3, 1 + ; CBRANCH r6, -1852457840, COND 8 + add r14, -1852490608 + test r14, 16711680 + jz randomx_isn_36 randomx_isn_37: - ; IMUL_M r5, L1[r1+292730526] - lea eax, [r9d+292730526] - and eax, 16376 - imul r13, qword ptr [rsi+rax] + ; ISMULH_R r2, r0 + mov rax, r10 + imul r8 + mov r10, rdx randomx_isn_38: - ; ISUB_R r2, r3 - sub r10, r11 + ; ISUB_R r2, r0 + sub r10, r8 randomx_isn_39: - ; FSUB_R f1, a1 - subpd xmm1, xmm9 -randomx_isn_40: - ; ISTORE L1[r5-1314552015], r1 - lea eax, [r13d-1314552015] + ; ISTORE L1[r0-38118463], r5 + lea eax, [r8d-38118463] and eax, 16376 - mov qword ptr [rsi+rax], r9 + mov qword ptr [rsi+rax], r13 +randomx_isn_40: + ; IXOR_R r0, r1 + xor r8, r9 randomx_isn_41: - ; FSUB_M f3, L1[r4+1497617497] - lea eax, [r12d+1497617497] - and eax, 16376 - cvtdq2pd xmm12, qword ptr [rsi+rax] - subpd xmm3, xmm12 + ; IMUL_R r6, r4 + imul r14, r12 randomx_isn_42: - ; IADD_RS r4, r7, SHFT 0 - lea r12, [r12+r15*1] + ; ISUB_R r7, r5 + sub r15, r13 randomx_isn_43: - ; IADD_M r1, L1[r5+1803177253] - lea eax, [r13d+1803177253] + ; FDIV_M e0, L1[r2+1052956160] + lea eax, [r10d+1052956160] and eax, 16376 - add r9, qword ptr [rsi+rax] + cvtdq2pd xmm12, qword ptr [rsi+rax] + andps xmm12, xmm13 + orps xmm12, xmm14 + divpd xmm4, xmm12 randomx_isn_44: - ; IADD_RS r5, r2, 818119872, SHFT 1 - lea r13, [r13+r10*2+818119872] + ; CBRANCH r1, 1870241002, COND 11 + add r9, 1870241002 + test r9, 133693440 + jz randomx_isn_37 randomx_isn_45: - ; IROL_R r1, r2 - mov ecx, r10d - rol r9, cl + ; IXOR_R r1, r4 + xor r9, r12 randomx_isn_46: - ; IXOR_R r4, r2 - xor r12, r10 + ; FMUL_R e3, a1 + mulpd xmm7, xmm9 randomx_isn_47: - ; FMUL_R e1, a1 - mulpd xmm5, xmm9 + ; IXOR_M r0, L1[r2+839895331] + lea eax, [r10d+839895331] + and eax, 16376 + xor r8, qword ptr [rsi+rax] randomx_isn_48: - ; IMUL_RCP r2, 3470537647 - mov rax, 11414393182386408729 - imul r10, rax + ; CBRANCH r2, -2128896196, COND 6 + add r10, -2128879812 + test r10, 4177920 + jz randomx_isn_45 randomx_isn_49: - ; FMUL_R e3, a2 - mulpd xmm7, xmm10 + ; CFROUND r1, 13 + mov rax, r9 + and eax, 24576 + or eax, 40896 + push rax + ldmxcsr dword ptr [rsp] + pop rax randomx_isn_50: - ; FADD_R f1, a2 - addpd xmm1, xmm10 + ; ISWAP_R r3, r1 + xchg r11, r9 randomx_isn_51: - ; ISUB_R r2, r5 - sub r10, r13 + ; IMUL_RCP r1, 4205062916 + mov rax, 9420568026795290117 + imul r9, rax randomx_isn_52: - ; FADD_M f0, L2[r0-1471265265] - lea eax, [r8d-1471265265] - and eax, 262136 - cvtdq2pd xmm12, qword ptr [rsi+rax] - addpd xmm0, xmm12 + ; FSUB_R f0, a0 + subpd xmm0, xmm8 randomx_isn_53: - ; IADD_RS r5, r7, 1775830425, SHFT 1 - lea r13, [r13+r15*2+1775830425] + ; IMUL_R r7, r6 + imul r15, r14 randomx_isn_54: - ; ISUB_R r1, r3 - sub r9, r11 + ; IADD_RS r1, r2, SHFT 3 + lea r9, [r9+r10*8] randomx_isn_55: - ; IROL_R r7, r0 - mov ecx, r8d - rol r15, cl + ; FSQRT_R e3 + sqrtpd xmm7, xmm7 randomx_isn_56: - ; FMUL_R e0, a3 - mulpd xmm4, xmm11 + ; FMUL_R e1, a0 + mulpd xmm5, xmm8 randomx_isn_57: - ; IMUL_R r6, r4 - imul r14, r12 + ; IMUL_RCP r3, 303101651 + mov rax, 16336962008634921950 + imul r11, rax randomx_isn_58: - ; FMUL_R e3, a3 - mulpd xmm7, xmm11 + ; IMUL_RCP r1, 3375482677 + mov rax, 11735827153567160432 + imul r9, rax randomx_isn_59: - ; ISTORE L1[r7-1893493599], r3 - lea eax, [r15d-1893493599] - and eax, 16376 - mov qword ptr [rsi+rax], r11 + ; CBRANCH r6, 2116776661, COND 12 + add r14, 2117300949 + test r14, 267386880 + jz randomx_isn_49 randomx_isn_60: - ; ISMULH_R r5, r2 - mov rax, r13 - imul r10 - mov r13, rdx + ; IMUL_R r3, r4 + imul r11, r12 randomx_isn_61: - ; IADD_RS r1, r1, SHFT 1 - lea r9, [r9+r9*2] + ; FMUL_R e3, a0 + mulpd xmm7, xmm8 randomx_isn_62: - ; IMUL_RCP r3, 2733088411 - mov rax, 14494255325841403524 - imul r11, rax + ; ISUB_R r3, 1514378938 + sub r11, 1514378938 randomx_isn_63: - ; ISUB_R r6, r3 - sub r14, r11 + ; FMUL_R e2, a0 + mulpd xmm6, xmm8 randomx_isn_64: - ; FMUL_R e1, a0 - mulpd xmm5, xmm8 + ; ISUB_R r4, r6 + sub r12, r14 randomx_isn_65: - ; IADD_RS r2, r6, SHFT 3 - lea r10, [r10+r14*8] + ; FDIV_M e2, L1[r0+1496571595] + lea eax, [r8d+1496571595] + and eax, 16376 + cvtdq2pd xmm12, qword ptr [rsi+rax] + andps xmm12, xmm13 + orps xmm12, xmm14 + divpd xmm6, xmm12 randomx_isn_66: - ; FSUB_R f3, a0 - subpd xmm3, xmm8 + ; FSUB_R f0, a2 + subpd xmm0, xmm10 randomx_isn_67: - ; CBRANCH r4, 1930797839, COND 5 - add r12, 1930797839 - test r12, 2088960 - jz randomx_isn_47 + ; FDIV_M e3, L2[r7-2139079025] + lea eax, [r15d-2139079025] + and eax, 262136 + cvtdq2pd xmm12, qword ptr [rsi+rax] + andps xmm12, xmm13 + orps xmm12, xmm14 + divpd xmm7, xmm12 randomx_isn_68: - ; ISUB_R r3, r4 - sub r11, r12 + ; FSUB_R f2, a2 + subpd xmm2, xmm10 randomx_isn_69: - ; IROR_R r1, r4 - mov ecx, r12d - ror r9, cl + ; CBRANCH r3, -1165095866, COND 7 + add r11, -1165063098 + test r11, 8355840 + jz randomx_isn_63 randomx_isn_70: - ; IADD_RS r0, r4, SHFT 2 - lea r8, [r8+r12*4] + ; IMULH_R r0, r7 + mov rax, r8 + mul r15 + mov r8, rdx randomx_isn_71: - ; FSUB_M f0, L1[r2+1122756483] - lea eax, [r10d+1122756483] - and eax, 16376 - cvtdq2pd xmm12, qword ptr [rsi+rax] - subpd xmm0, xmm12 + ; FMUL_R e2, a0 + mulpd xmm6, xmm8 randomx_isn_72: - ; IMUL_R r4, r6 - imul r12, r14 + ; FMUL_R e0, a3 + mulpd xmm4, xmm11 randomx_isn_73: - ; ISTORE L1[r0-1218068599], r0 - lea eax, [r8d-1218068599] - and eax, 16376 - mov qword ptr [rsi+rax], r8 + ; IMUL_RCP r6, 1636610180 + mov rax, 12102479179596746977 + imul r14, rax randomx_isn_74: - ; IXOR_R r7, r3 - xor r15, r11 + ; FMUL_R e2, a2 + mulpd xmm6, xmm10 randomx_isn_75: - ; ISTORE L2[r6+1269773314], r7 - lea eax, [r14d+1269773314] + ; ISTORE L2[r2+473418592], r3 + lea eax, [r10d+473418592] and eax, 262136 - mov qword ptr [rsi+rax], r15 + mov qword ptr [rsi+rax], r11 randomx_isn_76: - ; FSUB_R f1, a3 - subpd xmm1, xmm11 + ; IADD_M r1, L1[r3-989917936] + lea eax, [r11d-989917936] + and eax, 16376 + add r9, qword ptr [rsi+rax] randomx_isn_77: - ; ISUB_R r1, -869107550 - sub r9, -869107550 + ; CBRANCH r2, 1519854177, COND 7 + add r10, 1519886945 + test r10, 8355840 + jz randomx_isn_70 randomx_isn_78: - ; FMUL_R e0, a0 - mulpd xmm4, xmm8 + ; IMUL_R r2, r6 + imul r10, r14 randomx_isn_79: - ; ISUB_R r4, r0 - sub r12, r8 + ; IMUL_R r4, r1 + imul r12, r9 randomx_isn_80: - ; IROR_R r6, r5 - mov ecx, r13d - ror r14, cl + ; FMUL_R e2, a1 + mulpd xmm6, xmm9 randomx_isn_81: - ; FSUB_R f3, a0 - subpd xmm3, xmm8 + ; FSCAL_R f2 + xorps xmm2, xmm15 randomx_isn_82: - ; ISUB_R r5, r6 - sub r13, r14 + ; IXOR_M r2, L1[r1+192323103] + lea eax, [r9d+192323103] + and eax, 16376 + xor r10, qword ptr [rsi+rax] randomx_isn_83: - ; ISMULH_M r1, L1[r4-767260125] - lea ecx, [r12d-767260125] - and ecx, 16376 - mov rax, r9 - imul qword ptr [rsi+rcx] - mov r9, rdx + ; IMUL_R r7, r4 + imul r15, r12 randomx_isn_84: - ; IMULH_M r7, L1[r0+2131157979] - lea ecx, [r8d+2131157979] - and ecx, 16376 - mov rax, r15 - mul qword ptr [rsi+rcx] - mov r15, rdx + ; FADD_R f2, a0 + addpd xmm2, xmm8 randomx_isn_85: - ; FMUL_R e2, a3 - mulpd xmm6, xmm11 + ; FSUB_M f1, L2[r6-1549504487] + lea eax, [r14d-1549504487] + and eax, 262136 + cvtdq2pd xmm12, qword ptr [rsi+rax] + subpd xmm1, xmm12 randomx_isn_86: - ; IMUL_RCP r3, 1990691228 - mov rax, 9949830666841158350 - imul r11, rax + ; FSUB_R f0, a3 + subpd xmm0, xmm11 randomx_isn_87: - ; FADD_R f1, a1 - addpd xmm1, xmm9 + ; CFROUND r3, 31 + mov rax, r11 + rol rax, 46 + and eax, 24576 + or eax, 40896 + push rax + ldmxcsr dword ptr [rsp] + pop rax randomx_isn_88: - ; FMUL_R e3, a2 - mulpd xmm7, xmm10 + ; IXOR_R r5, r6 + xor r13, r14 randomx_isn_89: - ; CBRANCH r4, -1169509022, COND 2 - add r12, -1169509022 - test r12, 261120 - jz randomx_isn_80 + ; FADD_R f3, a2 + addpd xmm3, xmm10 randomx_isn_90: - ; ISMULH_R r4, r6 - mov rax, r12 - imul r14 - mov r12, rdx + ; FADD_R f3, a0 + addpd xmm3, xmm8 randomx_isn_91: - ; IROR_R r3, r1 - mov ecx, r9d - ror r11, cl + ; FSQRT_R e1 + sqrtpd xmm5, xmm5 randomx_isn_92: - ; ISUB_R r7, r5 - sub r15, r13 + ; ISUB_R r6, r2 + sub r14, r10 randomx_isn_93: - ; IXOR_R r3, r1 - xor r11, r9 + ; ISUB_R r0, r4 + sub r8, r12 randomx_isn_94: - ; FSUB_M f1, L1[r5-1131822026] - lea eax, [r13d-1131822026] - and eax, 16376 - cvtdq2pd xmm12, qword ptr [rsi+rax] - subpd xmm1, xmm12 + ; FADD_R f1, a2 + addpd xmm1, xmm10 randomx_isn_95: - ; FADD_R f2, a1 - addpd xmm2, xmm9 + ; IMUL_R r1, r2 + imul r9, r10 randomx_isn_96: - ; IMUL_M r1, L1[r4-1513325359] - lea eax, [r12d-1513325359] - and eax, 16376 - imul r9, qword ptr [rsi+rax] + ; FSCAL_R f1 + xorps xmm1, xmm15 randomx_isn_97: - ; FSUB_R f1, a1 - subpd xmm1, xmm9 + ; ISTORE L1[r7-1901001017], r7 + lea eax, [r15d-1901001017] + and eax, 16376 + mov qword ptr [rsi+rax], r15 randomx_isn_98: - ; FADD_R f3, a0 - addpd xmm3, xmm8 + ; FADD_R f1, a3 + addpd xmm1, xmm11 randomx_isn_99: - ; FSUB_R f3, a2 - subpd xmm3, xmm10 + ; CBRANCH r2, -425599201, COND 9 + add r10, -425533665 + test r10, 33423360 + jz randomx_isn_83 randomx_isn_100: - ; ISUB_R r1, r5 - sub r9, r13 + ; IXOR_R r4, r6 + xor r12, r14 randomx_isn_101: - ; FMUL_R e3, a2 - mulpd xmm7, xmm10 + ; FMUL_R e0, a3 + mulpd xmm4, xmm11 randomx_isn_102: - ; FMUL_R e1, a0 - mulpd xmm5, xmm8 + ; FADD_M f0, L1[r0+1590646897] + lea eax, [r8d+1590646897] + and eax, 16376 + cvtdq2pd xmm12, qword ptr [rsi+rax] + addpd xmm0, xmm12 randomx_isn_103: - ; IROR_R r0, r4 - mov ecx, r12d - ror r8, cl + ; FMUL_R e0, a1 + mulpd xmm4, xmm9 randomx_isn_104: - ; IMUL_R r2, r0 - imul r10, r8 + ; IMUL_R r4, r7 + imul r12, r15 randomx_isn_105: - ; ISUB_M r2, L3[858120] - sub r10, qword ptr [rsi+858120] + ; ISUB_R r1, r0 + sub r9, r8 randomx_isn_106: - ; FSCAL_R f1 - xorps xmm1, xmm15 + ; FSUB_R f1, a2 + subpd xmm1, xmm10 randomx_isn_107: - ; CFROUND r5, 15 - mov rax, r13 - rol rax, 62 - and eax, 24576 - or eax, 40896 - push rax - ldmxcsr dword ptr [rsp] - pop rax + ; FMUL_R e1, a1 + mulpd xmm5, xmm9 randomx_isn_108: - ; CBRANCH r5, 1726686711, COND 12 - add r13, 1727210999 - test r13, 267386880 - jz randomx_isn_90 + ; FMUL_R e1, a2 + mulpd xmm5, xmm10 randomx_isn_109: - ; ISTORE L1[r5-1659809127], r2 - lea eax, [r13d-1659809127] - and eax, 16376 - mov qword ptr [rsi+rax], r10 + ; FADD_R f3, a2 + addpd xmm3, xmm10 randomx_isn_110: - ; ISUB_R r6, r3 - sub r14, r11 + ; IXOR_R r0, r3 + xor r8, r11 randomx_isn_111: - ; FMUL_R e0, a3 - mulpd xmm4, xmm11 + ; IMUL_R r0, 1421329412 + imul r8, 1421329412 randomx_isn_112: + ; FSUB_R f0, a2 + subpd xmm0, xmm10 +randomx_isn_113: ; IMUL_R r5, r4 imul r13, r12 -randomx_isn_113: - ; FSUB_M f3, L2[r7-1773511057] - lea eax, [r15d-1773511057] - and eax, 262136 - cvtdq2pd xmm12, qword ptr [rsi+rax] - subpd xmm3, xmm12 randomx_isn_114: - ; FMUL_R e0, a3 - mulpd xmm4, xmm11 + ; IADD_RS r7, r3, SHFT 2 + lea r15, [r15+r11*4] randomx_isn_115: - ; IADD_RS r0, r6, SHFT 2 - lea r8, [r8+r14*4] + ; FADD_R f3, a3 + addpd xmm3, xmm11 randomx_isn_116: - ; IADD_M r6, L1[r5+1159120461] - lea eax, [r13d+1159120461] + ; ISTORE L1[r3-160363922], r0 + lea eax, [r11d-160363922] and eax, 16376 - add r14, qword ptr [rsi+rax] + mov qword ptr [rsi+rax], r8 randomx_isn_117: - ; ISUB_R r3, 1826659015 - sub r11, 1826659015 + ; IMULH_R r0, r6 + mov rax, r8 + mul r14 + mov r8, rdx randomx_isn_118: - ; IADD_RS r1, r2, SHFT 0 - lea r9, [r9+r10*1] + ; FSWAP_R f2 + shufpd xmm2, xmm2, 1 randomx_isn_119: - ; CBRANCH r5, 684384225, COND 8 - add r13, 684416993 - test r13, 16711680 - jz randomx_isn_113 + ; FMUL_R e1, a0 + mulpd xmm5, xmm8 randomx_isn_120: - ; FSUB_R f0, a2 - subpd xmm0, xmm10 + ; IROR_R r0, 12 + ror r8, 12 randomx_isn_121: - ; FSQRT_R e3 - sqrtpd xmm7, xmm7 + ; FADD_M f0, L1[r0+282806289] + lea eax, [r8d+282806289] + and eax, 16376 + cvtdq2pd xmm12, qword ptr [rsi+rax] + addpd xmm0, xmm12 randomx_isn_122: - ; FADD_R f0, a0 - addpd xmm0, xmm8 + ; FADD_M f3, L1[r7+1601529113] + lea eax, [r15d+1601529113] + and eax, 16376 + cvtdq2pd xmm12, qword ptr [rsi+rax] + addpd xmm3, xmm12 randomx_isn_123: - ; IMULH_R r4, r6 - mov rax, r12 - mul r14 - mov r12, rdx + ; IMUL_RCP r2, 2522040806 + mov rax, 15707153176462985744 + imul r10, rax randomx_isn_124: - ; IADD_RS r0, r2, SHFT 2 - lea r8, [r8+r10*4] + ; ISUB_M r0, L1[r3+974906597] + lea eax, [r11d+974906597] + and eax, 16376 + sub r8, qword ptr [rsi+rax] randomx_isn_125: - ; FMUL_R e1, a2 - mulpd xmm5, xmm10 + ; CBRANCH r2, 1508706439, COND 14 + add r10, 1506609287 + test r10, 1069547520 + jz randomx_isn_124 randomx_isn_126: - ; IMULH_R r7, r3 - mov rax, r15 - mul r11 - mov r15, rdx + ; IXOR_R r4, r5 + xor r12, r13 randomx_isn_127: - ; IMULH_R r4, r4 - mov rax, r12 - mul r12 - mov r12, rdx + ; IMUL_R r7, r2 + imul r15, r10 randomx_isn_128: - ; IADD_RS r5, r3, -1705157619, SHFT 0 - lea r13, [r13+r11*1-1705157619] + ; IROR_R r4, r0 + mov ecx, r8d + ror r12, cl randomx_isn_129: - ; CBRANCH r5, -1470853628, COND 7 - add r13, -1470853628 - test r13, 8355840 - jz randomx_isn_129 + ; CBRANCH r0, -497803311, COND 3 + add r8, -497804335 + test r8, 522240 + jz randomx_isn_126 randomx_isn_130: - ; FMUL_R e2, a2 - mulpd xmm6, xmm10 -randomx_isn_131: - ; IMUL_M r6, L1[r1+2122146383] - lea eax, [r9d+2122146383] + ; FSUB_M f0, L1[r3+1789853646] + lea eax, [r11d+1789853646] and eax, 16376 - imul r14, qword ptr [rsi+rax] + cvtdq2pd xmm12, qword ptr [rsi+rax] + subpd xmm0, xmm12 +randomx_isn_131: + ; ISMULH_R r6, r3 + mov rax, r14 + imul r11 + mov r14, rdx randomx_isn_132: - ; CBRANCH r2, -303744735, COND 14 - add r10, -305841887 - test r10, 1069547520 - jz randomx_isn_130 + ; FMUL_R e0, a3 + mulpd xmm4, xmm11 randomx_isn_133: - ; FSQRT_R e2 - sqrtpd xmm6, xmm6 + ; FSUB_R f2, a1 + subpd xmm2, xmm9 randomx_isn_134: - ; IADD_RS r5, r2, -1473186449, SHFT 0 - lea r13, [r13+r10*1-1473186449] + ; CBRANCH r3, -1567551204, COND 11 + add r11, -1567026916 + test r11, 133693440 + jz randomx_isn_130 randomx_isn_135: - ; ISUB_R r7, -463214201 - sub r15, -463214201 + ; FSUB_M f2, L2[r5+1167508659] + lea eax, [r13d+1167508659] + and eax, 262136 + cvtdq2pd xmm12, qword ptr [rsi+rax] + subpd xmm2, xmm12 randomx_isn_136: - ; IROR_R r3, 41 - ror r11, 41 + ; IMUL_R r4, r0 + imul r12, r8 randomx_isn_137: - ; ISUB_R r4, r1 - sub r12, r9 + ; IMULH_R r7, r6 + mov rax, r15 + mul r14 + mov r15, rdx randomx_isn_138: - ; IADD_M r3, L1[r5-1849564621] - lea eax, [r13d-1849564621] - and eax, 16376 - add r11, qword ptr [rsi+rax] + ; FMUL_R e3, a2 + mulpd xmm7, xmm10 randomx_isn_139: - ; IADD_RS r3, r2, SHFT 2 - lea r11, [r11+r10*4] + ; IMUL_R r2, r6 + imul r10, r14 randomx_isn_140: - ; FSUB_M f0, L2[r2+1957946605] - lea eax, [r10d+1957946605] - and eax, 262136 - cvtdq2pd xmm12, qword ptr [rsi+rax] - subpd xmm0, xmm12 + ; ISTORE L1[r0+1277653290], r3 + lea eax, [r8d+1277653290] + and eax, 16376 + mov qword ptr [rsi+rax], r11 randomx_isn_141: - ; FMUL_R e0, a3 - mulpd xmm4, xmm11 + ; IXOR_M r0, L1[r6-2131931958] + lea eax, [r14d-2131931958] + and eax, 16376 + xor r8, qword ptr [rsi+rax] randomx_isn_142: - ; IMUL_M r2, L3[1791912] - imul r10, qword ptr [rsi+1791912] + ; FSUB_R f3, a3 + subpd xmm3, xmm11 randomx_isn_143: - ; FADD_R f3, a1 - addpd xmm3, xmm9 + ; IROL_R r6, r1 + mov ecx, r9d + rol r14, cl randomx_isn_144: - ; CBRANCH r1, 594167468, COND 0 - add r9, 594167596 - test r9, 65280 - jz randomx_isn_133 + ; FADD_R f1, a3 + addpd xmm1, xmm11 randomx_isn_145: - ; IXOR_M r2, L2[r3-1801032485] - lea eax, [r11d-1801032485] - and eax, 262136 - xor r10, qword ptr [rsi+rax] + ; FMUL_R e0, a3 + mulpd xmm4, xmm11 randomx_isn_146: - ; FADD_R f3, a1 - addpd xmm3, xmm9 + ; FSQRT_R e0 + sqrtpd xmm4, xmm4 randomx_isn_147: - ; ISMULH_R r1, r2 - mov rax, r9 - imul r10 - mov r9, rdx + ; IADD_RS r7, r4, SHFT 0 + lea r15, [r15+r12*1] randomx_isn_148: - ; FADD_M f3, L1[r1-1305269425] - lea eax, [r9d-1305269425] - and eax, 16376 - cvtdq2pd xmm12, qword ptr [rsi+rax] - addpd xmm3, xmm12 + ; FSUB_R f3, a1 + subpd xmm3, xmm9 randomx_isn_149: - ; ISMULH_R r6, r7 - mov rax, r14 - imul r15 - mov r14, rdx + ; ISTORE L2[r1-1073333533], r3 + lea eax, [r9d-1073333533] + and eax, 262136 + mov qword ptr [rsi+rax], r11 randomx_isn_150: - ; IXOR_R r1, r3 - xor r9, r11 + ; FMUL_R e3, a3 + mulpd xmm7, xmm11 randomx_isn_151: - ; IMUL_RCP r7, 3727394819 - mov rax, 10627820013915238743 - imul r15, rax + ; ISUB_R r6, r3 + sub r14, r11 randomx_isn_152: - ; FADD_R f1, a1 - addpd xmm1, xmm9 + ; IMULH_M r7, L2[r1+1647843648] + lea ecx, [r9d+1647843648] + and ecx, 262136 + mov rax, r15 + mul qword ptr [rsi+rcx] + mov r15, rdx randomx_isn_153: - ; ISTORE L1[r3-1650006450], r2 - lea eax, [r11d-1650006450] - and eax, 16376 - mov qword ptr [rsi+rax], r10 + ; FMUL_R e0, a0 + mulpd xmm4, xmm8 randomx_isn_154: - ; IMUL_R r1, r4 - imul r9, r12 + ; IROR_R r3, r0 + mov ecx, r8d + ror r11, cl randomx_isn_155: - ; IADD_RS r7, r4, SHFT 1 - lea r15, [r15+r12*2] + ; IADD_M r3, L1[r7-1322060518] + lea eax, [r15d-1322060518] + and eax, 16376 + add r11, qword ptr [rsi+rax] randomx_isn_156: - ; FADD_R f3, a0 - addpd xmm3, xmm8 + ; CBRANCH r3, 608981196, COND 1 + add r11, 608981708 + test r11, 130560 + jz randomx_isn_156 randomx_isn_157: - ; IROL_R r3, r7 - mov ecx, r15d - rol r11, cl + ; FSUB_M f0, L2[r7-252644586] + lea eax, [r15d-252644586] + and eax, 262136 + cvtdq2pd xmm12, qword ptr [rsi+rax] + subpd xmm0, xmm12 randomx_isn_158: - ; ISUB_M r1, L1[r5+1870274033] - lea eax, [r13d+1870274033] - and eax, 16376 - sub r9, qword ptr [rsi+rax] + ; CBRANCH r2, 868397474, COND 15 + add r10, 864203170 + test r10, 2139095040 + jz randomx_isn_157 randomx_isn_159: - ; FADD_M f1, L1[r1+676754587] - lea eax, [r9d+676754587] - and eax, 16376 - cvtdq2pd xmm12, qword ptr [rsi+rax] - addpd xmm1, xmm12 + ; ISUB_R r5, r3 + sub r13, r11 randomx_isn_160: - ; IXOR_M r2, L1[r4+314141089] - lea eax, [r12d+314141089] - and eax, 16376 - xor r10, qword ptr [rsi+rax] + ; FMUL_R e0, a0 + mulpd xmm4, xmm8 randomx_isn_161: - ; FMUL_R e2, a0 - mulpd xmm6, xmm8 + ; FMUL_R e2, a1 + mulpd xmm6, xmm9 randomx_isn_162: - ; IXOR_R r4, r1 - xor r12, r9 + ; CBRANCH r0, 887338591, COND 6 + add r8, 887346783 + test r8, 4177920 + jz randomx_isn_159 randomx_isn_163: - ; FMUL_R e0, a2 - mulpd xmm4, xmm10 + ; IADD_RS r3, r3, SHFT 3 + lea r11, [r11+r11*8] randomx_isn_164: - ; ISUB_M r2, L1[r6-869755487] - lea eax, [r14d-869755487] - and eax, 16376 - sub r10, qword ptr [rsi+rax] + ; IMUL_RCP r7, 3593878304 + mov rax, 11022655166993703745 + imul r15, rax randomx_isn_165: - ; IMUL_RCP r6, 476974378 - mov rax, 10381606194246184644 - imul r14, rax + ; CBRANCH r0, 1452880957, COND 13 + add r8, 1453929533 + test r8, 534773760 + jz randomx_isn_163 randomx_isn_166: - ; IADD_RS r6, r7, SHFT 0 - lea r14, [r14+r15*1] + ; ISUB_M r6, L2[r3+1539038396] + lea eax, [r11d+1539038396] + and eax, 262136 + sub r14, qword ptr [rsi+rax] randomx_isn_167: - ; ISTORE L1[r3-310360520], r1 - lea eax, [r11d-310360520] - and eax, 16376 - mov qword ptr [rsi+rax], r9 + ; IMUL_RCP r3, 1202036339 + mov rax, 16477905023274079568 + imul r11, rax randomx_isn_168: - ; CBRANCH r7, 770321039, COND 7 - add r15, 770353807 - test r15, 8355840 - jz randomx_isn_156 + ; CBRANCH r1, -1295757940, COND 13 + add r9, -1293660788 + test r9, 534773760 + jz randomx_isn_166 randomx_isn_169: - ; FMUL_R e2, a3 - mulpd xmm6, xmm11 + ; FADD_M f2, L1[r2+876697387] + lea eax, [r10d+876697387] + and eax, 16376 + cvtdq2pd xmm12, qword ptr [rsi+rax] + addpd xmm2, xmm12 randomx_isn_170: - ; ISUB_R r2, r7 - sub r10, r15 + ; IMUL_R r0, r6 + imul r8, r14 randomx_isn_171: - ; IADD_RS r7, r6, SHFT 0 - lea r15, [r15+r14*1] + ; FMUL_R e1, a3 + mulpd xmm5, xmm11 randomx_isn_172: - ; IADD_M r4, L2[r5+590482146] - lea eax, [r13d+590482146] - and eax, 262136 - add r12, qword ptr [rsi+rax] + ; FMUL_R e0, a2 + mulpd xmm4, xmm10 randomx_isn_173: - ; FSCAL_R f2 - xorps xmm2, xmm15 + ; FSUB_M f3, L1[r2-1083472792] + lea eax, [r10d-1083472792] + and eax, 16376 + cvtdq2pd xmm12, qword ptr [rsi+rax] + subpd xmm3, xmm12 randomx_isn_174: - ; IXOR_M r0, L2[r3+725959150] - lea eax, [r11d+725959150] - and eax, 262136 - xor r8, qword ptr [rsi+rax] + ; CBRANCH r1, -1476890738, COND 14 + add r9, -1478987890 + test r9, 1069547520 + jz randomx_isn_169 randomx_isn_175: - ; IXOR_M r4, L2[r2-819951646] - lea eax, [r10d-819951646] - and eax, 262136 - xor r12, qword ptr [rsi+rax] + ; ISUB_R r4, r7 + sub r12, r15 randomx_isn_176: - ; IADD_RS r0, r6, SHFT 2 - lea r8, [r8+r14*4] + ; ISUB_R r0, 1685118604 + sub r8, 1685118604 randomx_isn_177: - ; IMUL_M r1, L1[r0+298863646] - lea eax, [r8d+298863646] - and eax, 16376 - imul r9, qword ptr [rsi+rax] + ; FMUL_R e0, a1 + mulpd xmm4, xmm9 randomx_isn_178: - ; CBRANCH r3, -1056632893, COND 10 - add r11, -1056632893 - test r11, 66846720 - jz randomx_isn_169 + ; ISUB_M r0, L1[r7-1897974312] + lea eax, [r15d-1897974312] + and eax, 16376 + sub r8, qword ptr [rsi+rax] randomx_isn_179: - ; FMUL_R e3, a1 - mulpd xmm7, xmm9 + ; IXOR_R r4, r0 + xor r12, r8 randomx_isn_180: - ; IXOR_R r0, r1 - xor r8, r9 + ; IXOR_R r7, r2 + xor r15, r10 randomx_isn_181: - ; FMUL_R e0, a2 - mulpd xmm4, xmm10 + ; FSCAL_R f1 + xorps xmm1, xmm15 randomx_isn_182: - ; ISMULH_M r0, L2[r3-482376086] - lea ecx, [r11d-482376086] - and ecx, 262136 - mov rax, r8 - imul qword ptr [rsi+rcx] - mov r8, rdx + ; ISWAP_R r6, r2 + xchg r14, r10 randomx_isn_183: - ; ISTORE L1[r0-1702778580], r3 - lea eax, [r8d-1702778580] - and eax, 16376 - mov qword ptr [rsi+rax], r11 + ; IADD_RS r3, r1, SHFT 3 + lea r11, [r11+r9*8] randomx_isn_184: - ; FMUL_R e0, a1 - mulpd xmm4, xmm9 + ; ISTORE L1[r6-1997634426], r7 + lea eax, [r14d-1997634426] + and eax, 16376 + mov qword ptr [rsi+rax], r15 randomx_isn_185: - ; ISUB_M r1, L3[570848] - sub r9, qword ptr [rsi+570848] + ; IXOR_R r2, r7 + xor r10, r15 randomx_isn_186: - ; FMUL_R e0, a2 - mulpd xmm4, xmm10 + ; IMUL_R r4, r3 + imul r12, r11 randomx_isn_187: - ; ISTORE L3[r1-861015354], r1 - lea eax, [r9d-861015354] - and eax, 2097144 - mov qword ptr [rsi+rax], r9 + ; IMUL_RCP r7, 1830833174 + mov rax, 10818593911149047378 + imul r15, rax randomx_isn_188: - ; ISWAP_R r6, r5 - xchg r14, r13 + ; FMUL_R e0, a2 + mulpd xmm4, xmm10 randomx_isn_189: - ; ISUB_M r5, L1[r2-416275812] - lea eax, [r10d-416275812] - and eax, 16376 - sub r13, qword ptr [rsi+rax] + ; FADD_R f1, a3 + addpd xmm1, xmm11 randomx_isn_190: - ; IADD_M r2, L3[218936] - add r10, qword ptr [rsi+218936] + ; CBRANCH r7, 121030040, COND 15 + add r15, 129418648 + test r15, 2139095040 + jz randomx_isn_188 randomx_isn_191: - ; FSCAL_R f1 - xorps xmm1, xmm15 + ; IADD_RS r6, r1, SHFT 0 + lea r14, [r14+r9*1] randomx_isn_192: - ; ISTORE L1[r7+537126793], r5 - lea eax, [r15d+537126793] - and eax, 16376 - mov qword ptr [rsi+rax], r13 + ; FSUB_R f3, a2 + subpd xmm3, xmm10 randomx_isn_193: - ; IADD_RS r7, r1, SHFT 3 - lea r15, [r15+r9*8] + ; CBRANCH r5, 1139434462, COND 11 + add r13, 1139434462 + test r13, 133693440 + jz randomx_isn_191 randomx_isn_194: - ; FDIV_M e1, L1[r7+1919976255] - lea eax, [r15d+1919976255] - and eax, 16376 - cvtdq2pd xmm12, qword ptr [rsi+rax] - andps xmm12, xmm13 - orps xmm12, xmm14 - divpd xmm5, xmm12 + ; FMUL_R e2, a0 + mulpd xmm6, xmm8 randomx_isn_195: - ; IADD_RS r5, r7, -837273506, SHFT 2 - lea r13, [r13+r15*4-837273506] + ; FMUL_R e2, a3 + mulpd xmm6, xmm11 randomx_isn_196: - ; IMUL_R r2, r1 - imul r10, r9 + ; CBRANCH r4, 429294077, COND 2 + add r12, 429295101 + test r12, 261120 + jz randomx_isn_194 randomx_isn_197: - ; ISTORE L1[r3-403444018], r0 - lea eax, [r11d-403444018] - and eax, 16376 - mov qword ptr [rsi+rax], r8 + ; IMUL_R r1, r2 + imul r9, r10 randomx_isn_198: - ; IADD_RS r4, r5, SHFT 3 - lea r12, [r12+r13*8] + ; FMUL_R e3, a0 + mulpd xmm7, xmm8 randomx_isn_199: - ; FMUL_R e2, a1 - mulpd xmm6, xmm9 + ; IMUL_R r2, r3 + imul r10, r11 randomx_isn_200: - ; FADD_R f0, a0 - addpd xmm0, xmm8 + ; IMUL_RCP r1, 193535702 + mov rax, 12792885514067893012 + imul r9, rax randomx_isn_201: - ; ISUB_R r3, r6 - sub r11, r14 + ; IMUL_R r0, r5 + imul r8, r13 randomx_isn_202: - ; FSUB_M f1, L1[r6-819374177] - lea eax, [r14d-819374177] - and eax, 16376 - cvtdq2pd xmm12, qword ptr [rsi+rax] - subpd xmm1, xmm12 + ; ISUB_R r1, r2 + sub r9, r10 randomx_isn_203: - ; CBRANCH r3, -1519877904, COND 8 - add r11, -1519845136 - test r11, 16711680 - jz randomx_isn_202 + ; FSUB_R f0, a3 + subpd xmm0, xmm11 randomx_isn_204: - ; FADD_M f3, L1[r3+1945283935] - lea eax, [r11d+1945283935] - and eax, 16376 - cvtdq2pd xmm12, qword ptr [rsi+rax] - addpd xmm3, xmm12 + ; FSQRT_R e3 + sqrtpd xmm7, xmm7 randomx_isn_205: - ; IMUL_R r7, r4 - imul r15, r12 + ; FMUL_R e0, a3 + mulpd xmm4, xmm11 randomx_isn_206: - ; ISWAP_R r5, r4 - xchg r13, r12 + ; IMUL_R r2, r1 + imul r10, r9 randomx_isn_207: - ; IROR_R r1, r0 - mov ecx, r8d - ror r9, cl + ; IADD_RS r1, r1, SHFT 3 + lea r9, [r9+r9*8] randomx_isn_208: - ; FSUB_R f0, a0 - subpd xmm0, xmm8 + ; ISUB_R r6, r4 + sub r14, r12 randomx_isn_209: - ; IXOR_M r3, L1[r2-287183674] - lea eax, [r10d-287183674] - and eax, 16376 - xor r11, qword ptr [rsi+rax] + ; ISUB_R r0, r7 + sub r8, r15 randomx_isn_210: - ; IMUL_R r6, r0 - imul r14, r8 + ; IADD_M r6, L1[r1+313140284] + lea eax, [r9d+313140284] + and eax, 16376 + add r14, qword ptr [rsi+rax] randomx_isn_211: - ; CBRANCH r6, -966126914, COND 13 - add r14, -966126914 - test r14, 534773760 - jz randomx_isn_211 + ; CBRANCH r4, 1358359929, COND 11 + add r12, 1358622073 + test r12, 133693440 + jz randomx_isn_197 randomx_isn_212: - ; IXOR_R r0, r1 - xor r8, r9 + ; FSQRT_R e0 + sqrtpd xmm4, xmm4 randomx_isn_213: - ; IADD_M r3, L2[r6-2121250186] - lea eax, [r14d-2121250186] - and eax, 262136 - add r11, qword ptr [rsi+rax] + ; ISTORE L1[r3+18641493], r5 + lea eax, [r11d+18641493] + and eax, 16376 + mov qword ptr [rsi+rax], r13 randomx_isn_214: - ; FMUL_R e1, a0 - mulpd xmm5, xmm8 + ; CBRANCH r2, 1232471888, COND 7 + add r10, 1232504656 + test r10, 8355840 + jz randomx_isn_212 randomx_isn_215: - ; FMUL_R e1, a3 - mulpd xmm5, xmm11 -randomx_isn_216: - ; IXOR_M r3, L1[r0-1234645306] - lea eax, [r8d-1234645306] + ; IADD_M r1, L1[r3+1138069575] + lea eax, [r11d+1138069575] and eax, 16376 - xor r11, qword ptr [rsi+rax] + add r9, qword ptr [rsi+rax] +randomx_isn_216: + ; FSQRT_R e0 + sqrtpd xmm4, xmm4 randomx_isn_217: - ; ISUB_M r7, L1[r1+2057705359] - lea eax, [r9d+2057705359] - and eax, 16376 - sub r15, qword ptr [rsi+rax] + ; IMUL_R r3, r4 + imul r11, r12 randomx_isn_218: - ; CBRANCH r2, -908784770, COND 0 - add r10, -908784770 - test r10, 65280 - jz randomx_isn_212 + ; FMUL_R e3, a3 + mulpd xmm7, xmm11 randomx_isn_219: - ; IROR_R r4, r0 - mov ecx, r8d - ror r12, cl + ; IROL_R r7, r1 + mov ecx, r9d + rol r15, cl randomx_isn_220: - ; IADD_RS r2, r5, SHFT 0 - lea r10, [r10+r13*1] + ; FMUL_R e2, a1 + mulpd xmm6, xmm9 randomx_isn_221: - ; FMUL_R e1, a3 - mulpd xmm5, xmm11 + ; IXOR_M r2, L3[697832] + xor r10, qword ptr [rsi+697832] randomx_isn_222: - ; FADD_R f0, a0 - addpd xmm0, xmm8 + ; IADD_RS r1, r6, SHFT 2 + lea r9, [r9+r14*4] randomx_isn_223: - ; IADD_RS r1, r5, SHFT 2 - lea r9, [r9+r13*4] + ; ISWAP_R r6, r2 + xchg r14, r10 randomx_isn_224: - ; FSUB_R f1, a0 - subpd xmm1, xmm8 + ; ISUB_R r0, r1 + sub r8, r9 randomx_isn_225: - ; FSUB_R f2, a3 - subpd xmm2, xmm11 -randomx_isn_226: - ; ISTORE L1[r0+351187172], r6 - lea eax, [r8d+351187172] - and eax, 16376 - mov qword ptr [rsi+rax], r14 -randomx_isn_227: ; FSQRT_R e3 sqrtpd xmm7, xmm7 +randomx_isn_226: + ; ISUB_R r5, r1 + sub r13, r9 +randomx_isn_227: + ; ISTORE L1[r0+238217802], r2 + lea eax, [r8d+238217802] + and eax, 16376 + mov qword ptr [rsi+rax], r10 randomx_isn_228: - ; CBRANCH r7, 1435877143, COND 3 - add r15, 1435876119 - test r15, 522240 - jz randomx_isn_219 + ; IMUL_RCP r5, 324261767 + mov rax, 15270872674734795667 + imul r13, rax randomx_isn_229: - ; IROR_R r5, r4 - mov ecx, r12d - ror r13, cl + ; FSCAL_R f0 + xorps xmm0, xmm15 randomx_isn_230: - ; IADD_M r5, L1[r2-914219843] - lea eax, [r10d-914219843] - and eax, 16376 - add r13, qword ptr [rsi+rax] + ; FSQRT_R e3 + sqrtpd xmm7, xmm7 randomx_isn_231: - ; FSCAL_R f3 - xorps xmm3, xmm15 + ; IROL_R r1, r5 + mov ecx, r13d + rol r9, cl randomx_isn_232: - ; IADD_RS r3, r7, SHFT 3 - lea r11, [r11+r15*8] + ; ISUB_R r6, r1 + sub r14, r9 randomx_isn_233: - ; IXOR_R r0, r1 - xor r8, r9 + ; FADD_R f2, a0 + addpd xmm2, xmm8 randomx_isn_234: - ; IADD_RS r3, r5, SHFT 1 - lea r11, [r11+r13*2] + ; FADD_R f1, a3 + addpd xmm1, xmm11 randomx_isn_235: - ; CBRANCH r3, 805071420, COND 9 - add r11, 805202492 - test r11, 33423360 - jz randomx_isn_235 + ; IXOR_R r3, 1240450588 + xor r11, 1240450588 randomx_isn_236: - ; ISTORE L2[r1-1424908761], r5 - lea eax, [r9d-1424908761] - and eax, 262136 - mov qword ptr [rsi+rax], r13 + ; FSUB_R f1, a2 + subpd xmm1, xmm10 randomx_isn_237: - ; ISUB_R r7, r3 - sub r15, r11 + ; IMULH_R r6, r3 + mov rax, r14 + mul r11 + mov r14, rdx randomx_isn_238: - ; IADD_RS r6, r3, SHFT 1 - lea r14, [r14+r11*2] + ; FSUB_R f1, a3 + subpd xmm1, xmm11 randomx_isn_239: - ; ISUB_M r2, L2[r7+1703163549] - lea eax, [r15d+1703163549] - and eax, 262136 - sub r10, qword ptr [rsi+rax] + ; FSUB_R f1, a2 + subpd xmm1, xmm10 randomx_isn_240: - ; IADD_RS r2, r7, SHFT 2 - lea r10, [r10+r15*4] + ; FSUB_M f1, L1[r7+1330184615] + lea eax, [r15d+1330184615] + and eax, 16376 + cvtdq2pd xmm12, qword ptr [rsi+rax] + subpd xmm1, xmm12 randomx_isn_241: - ; FMUL_R e0, a2 - mulpd xmm4, xmm10 + ; FMUL_R e2, a3 + mulpd xmm6, xmm11 randomx_isn_242: - ; IROL_R r6, r0 - mov ecx, r8d - rol r14, cl + ; CBRANCH r3, -427325404, COND 11 + add r11, -427063260 + test r11, 133693440 + jz randomx_isn_236 randomx_isn_243: - ; ISUB_R r6, r0 - sub r14, r8 + ; IMUL_R r5, r7 + imul r13, r15 randomx_isn_244: - ; FMUL_R e2, a3 - mulpd xmm6, xmm11 + ; FMUL_R e3, a3 + mulpd xmm7, xmm11 randomx_isn_245: - ; FMUL_R e0, a1 - mulpd xmm4, xmm9 + ; ISMULH_M r7, L1[r0-84959236] + lea ecx, [r8d-84959236] + and ecx, 16376 + mov rax, r15 + imul qword ptr [rsi+rcx] + mov r15, rdx randomx_isn_246: - ; CBRANCH r7, -1953056568, COND 7 - add r15, -1953056568 - test r15, 8355840 - jz randomx_isn_238 + ; IMUL_R r6, r1 + imul r14, r9 randomx_isn_247: - ; FSUB_M f2, L1[r2-853114604] - lea eax, [r10d-853114604] - and eax, 16376 - cvtdq2pd xmm12, qword ptr [rsi+rax] - subpd xmm2, xmm12 + ; FMUL_R e2, a1 + mulpd xmm6, xmm9 randomx_isn_248: - ; FADD_R f2, a0 - addpd xmm2, xmm8 + ; IADD_M r1, L2[r3+1223504721] + lea eax, [r11d+1223504721] + and eax, 262136 + add r9, qword ptr [rsi+rax] randomx_isn_249: - ; ISMULH_R r0, r5 - mov rax, r8 - imul r13 - mov r8, rdx + ; FADD_R f1, a2 + addpd xmm1, xmm10 randomx_isn_250: - ; INEG_R r0 - neg r8 -randomx_isn_251: - ; ISTORE L1[r0+466701967], r3 - lea eax, [r8d+466701967] + ; IXOR_M r4, L1[r2-1447740505] + lea eax, [r10d-1447740505] and eax, 16376 - mov qword ptr [rsi+rax], r11 + xor r12, qword ptr [rsi+rax] +randomx_isn_251: + ; IXOR_R r0, r5 + xor r8, r13 randomx_isn_252: - ; IADD_M r6, L1[r3-866791909] - lea eax, [r11d-866791909] - and eax, 16376 - add r14, qword ptr [rsi+rax] + ; CBRANCH r4, -1337905977, COND 4 + add r12, -1337903929 + test r12, 1044480 + jz randomx_isn_251 randomx_isn_253: - ; ISUB_R r4, r3 - sub r12, r11 + ; FSUB_R f1, a1 + subpd xmm1, xmm9 randomx_isn_254: - ; IMUL_R r0, -1948340729 - imul r8, -1948340729 + ; FMUL_R e0, a0 + mulpd xmm4, xmm8 randomx_isn_255: - ; IXOR_R r3, r1 - xor r11, r9 + ; CBRANCH r5, 437071043, COND 11 + add r13, 436808899 + test r13, 133693440 + jz randomx_isn_253 diff --git a/doc/specs.md b/doc/specs.md index 6952db0d..8790d9e2 100644 --- a/doc/specs.md +++ b/doc/specs.md @@ -553,7 +553,7 @@ For integer instructions, the destination is always an integer register (registe |frequency|instruction|dst|src|`src == dst ?`|operation| |-|-|-|-|-|-| -|25/256|IADD_RS|R|R|`src = dst`|`dst = dst + (src << mod.shift) (+ imm32)`| +|16/256|IADD_RS|R|R|`src = dst`|`dst = dst + (src << mod.shift) (+ imm32)`| |7/256|IADD_M|R|R|`src = 0`|`dst = dst + [mem]`| |16/256|ISUB_R|R|R|`src = imm32`|`dst = dst - src`| |7/256|ISUB_M|R|R|`src = 0`|`dst = dst - [mem]`| @@ -664,7 +664,7 @@ There are 2 control instructions. |frequency|instruction|dst|src|operation| |-|-|-|-|-| |1/256|CFROUND|-|R|`fprc = src >>> imm32` -|16/256|CBRANCH|R|-|`dst = dst + cimm`, conditional jump +|25/256|CBRANCH|R|-|`dst = dst + cimm`, conditional jump #### 5.4.1 CFROUND This instruction calculates a 2-bit value by rotating the source register right by `imm32` bits and taking the 2 least significant bits (the value of the source register is unaffected). The result is stored in the `fprc` register. This changes the rounding mode of all subsequent floating point instructions.