Merge pull request #3013 from WojciechMula/simplify-asm

Simplify HUF_decompress4X2_usingDTable_internal_bmi2_asm_loop
This commit is contained in:
Nick Terrell 2022-01-21 11:13:40 -08:00 committed by GitHub
commit 2f03c1996f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -427,41 +427,30 @@ HUF_decompress4X2_usingDTable_internal_bmi2_asm_loop:
/* r15 = (ip0 - ilimit) / 7 */ /* r15 = (ip0 - ilimit) / 7 */
movq %rdx, %r15 movq %rdx, %r15
movabsq $-3689348814741910323, %rdx /* r15 = min(r15, min(oend0 - op0, oend1 - op1, oend2 - op2, oend3 - op3) / 10) */
movq 8(%rsp), %rax /* rax = oend0 */ movq 8(%rsp), %rax /* rax = oend0 */
subq %op0, %rax /* rax = oend0 - op0 */ subq %op0, %rax /* rax = oend0 - op0 */
mulq %rdx movq 16(%rsp), %rdx /* rdx = oend1 */
shrq $3, %rdx /* rdx = rax / 10 */ subq %op1, %rdx /* rdx = oend1 - op1 */
/* r15 = min(%rdx, %r15) */ cmpq %rax, %rdx
cmpq %rdx, %r15 cmova %rax, %rdx /* rdx = min(%rdx, %rax) */
cmova %rdx, %r15
movabsq $-3689348814741910323, %rdx
movq 16(%rsp), %rax /* rax = oend1 */
subq %op1, %rax /* rax = oend1 - op1 */
mulq %rdx
shrq $3, %rdx /* rdx = rax / 10 */
/* r15 = min(%rdx, %r15) */
cmpq %rdx, %r15
cmova %rdx, %r15
movabsq $-3689348814741910323, %rdx
movq 24(%rsp), %rax /* rax = oend2 */ movq 24(%rsp), %rax /* rax = oend2 */
subq %op2, %rax /* rax = oend2 - op2 */ subq %op2, %rax /* rax = oend2 - op2 */
mulq %rdx
shrq $3, %rdx /* rdx = rax / 10 */
/* r15 = min(%rdx, %r15) */ cmpq %rax, %rdx
cmpq %rdx, %r15 cmova %rax, %rdx /* rdx = min(%rdx, %rax) */
cmova %rdx, %r15
movabsq $-3689348814741910323, %rdx
movq 32(%rsp), %rax /* rax = oend3 */ movq 32(%rsp), %rax /* rax = oend3 */
subq %op3, %rax /* rax = oend3 - op3 */ subq %op3, %rax /* rax = oend3 - op3 */
cmpq %rax, %rdx
cmova %rax, %rdx /* rdx = min(%rdx, %rax) */
movabsq $-3689348814741910323, %rax
mulq %rdx mulq %rdx
shrq $3, %rdx /* rdx = rax / 10 */ shrq $3, %rdx /* rdx = rdx / 10 */
/* r15 = min(%rdx, %r15) */ /* r15 = min(%rdx, %r15) */
cmpq %rdx, %r15 cmpq %rdx, %r15